/*
 * Studywise website – aligned with app (COLORS.md + SignInView)
 * Indigo book, lavender Remind Me, cognitive-load pastels, system-like BG
 */
:root {
  /* Light – matches app */
  --color-bg: #f2f2f7;
  --color-bg-elevated: #ffffff;
  --color-text: #1c1c1e;
  --color-text-muted: #636366;
  --color-indigo: #5856d6;
  --color-indigo-hover: #4745b8;
  --color-lavender: #b3a6d1;
  --color-lavender-soft: #e8e6f5;
  --color-mint: #e3f2e8;
  --color-sky: #e0ebfa;
  --color-slate: #ebedef;
  --color-clay: #f2e6d9;
  --color-berry: #ebd9e6;
  --color-amber: #ffbf00;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --max-width: 720px;
  --spacing: 1.5rem;
  --radius: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-bg-elevated: #1c1c1e;
    --color-text: #f2f2f7;
    --color-text-muted: #98989d;
    --color-indigo: #7d7aff;
    --color-indigo-hover: #9b99ff;
    --color-lavender: #8c7ab8;
    --color-lavender-soft: #1f1c26;
    --color-mint: #1a2520;
    --color-sky: #1a1f28;
    --color-slate: #1e1e22;
    --color-clay: #221c18;
    --color-berry: #221a20;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

/* Decorative “schedule strip” – cognitive-load pastels */
.app-strip {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0 1rem;
  margin-bottom: 1.75rem;
}
.app-strip span {
  width: 36px;
  height: 8px;
  border-radius: 4px;
  opacity: 0.85;
}
.app-strip span:nth-child(1) { background: var(--color-mint); }
.app-strip span:nth-child(2) { background: var(--color-sky); }
.app-strip span:nth-child(3) { background: var(--color-slate); }
.app-strip span:nth-child(4) { background: var(--color-clay); }
.app-strip span:nth-child(5) { background: var(--color-berry); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing);
}

/* Landing */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Soft lavender glow behind hero (Remind Me zone feel) */
.landing::before {
  content: "";
  position: absolute;
  width: 140%;
  max-width: 520px;
  height: 280px;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--color-lavender-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.landing > *:not(.landing-watermark):not(.voice-examples-layer) {
  position: relative;
  z-index: 1;
}

/* Floating voice command examples – typewriter in random positions */
.voice-examples-layer {
  position: absolute;
  inset: 0;
  z-index: 0.5;
  pointer-events: none;
  overflow: hidden;
}

.voice-example-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: min(280px, 85vw);
  padding: 0.65rem 0.9rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  background: var(--color-bg-elevated);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 1;
  transition: opacity 0.6s ease;
}

@media (prefers-color-scheme: dark) {
  .voice-example-bubble {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

/* Large blurred app icon — atmospheric layer */
.landing-watermark {
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  width: min(100vw, 420px);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  opacity: 0.07;
  filter: blur(28px);
}

@media (prefers-color-scheme: dark) {
  .landing-watermark {
    opacity: 0.12;
    filter: blur(32px);
  }
}

.landing-watermark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* SignInView.systemGroupedBackground echo */
.login-hero-panel {
  background: var(--color-bg-elevated);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem;
  max-width: 340px;
  width: 100%;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(88, 86, 214, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .login-hero-panel {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06),
      0 8px 32px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.06);
  }
}

.hero-icon-stack {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* iOS home-screen style mask (~22.37% radius) */
.app-icon-squircle {
  width: 120px;
  height: 120px;
  border-radius: 26.88px;
  display: block;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 12px 40px rgba(88, 86, 214, 0.18);
}

@media (prefers-color-scheme: dark) {
  .app-icon-squircle {
    box-shadow:
      0 4px 20px rgba(0, 0, 0, 0.5),
      0 12px 36px rgba(125, 122, 255, 0.2);
  }
}

.landing h1 {
  font-size: 2.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.landing .tagline {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  max-width: 340px;
  line-height: 1.45;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-indigo);
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 2px 8px rgba(88, 86, 214, 0.35);
}

.cta:hover {
  background: var(--color-indigo-hover);
  transform: translateY(-1px);
}

.cta.secondary {
  background: var(--color-bg-elevated);
  color: var(--color-indigo);
  border: 2px solid var(--color-lavender);
  box-shadow: none;
  margin-top: 0.75rem;
}

.cta.secondary:hover {
  background: var(--color-lavender-soft);
  transform: none;
}

.landing .ctas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* App Store / Google Play – official badge images (Wikimedia Commons, Google Play badge SVG) */
.ctas-badges {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.store-badge {
  display: block;
  width: 135px;
  height: 40px;
  line-height: 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, box-shadow 0.2s;
  overflow: hidden;
}

.store-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.store-badge img {
  display: block;
  width: 135px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  border-radius: 6px;
}

@media (prefers-color-scheme: dark) {
  .store-badge {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  }

  .store-badge:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  }
}

.landing footer {
  margin-top: 2.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.landing footer a {
  color: var(--color-indigo);
  text-decoration: none;
  white-space: nowrap;
}

.landing footer a:hover {
  text-decoration: underline;
}

.landing footer .sep {
  margin: 0 0.35rem;
  opacity: 0.5;
}

/* Legal: mini app icon + book (same vocabulary as landing / SignIn) */
.legal-hero-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.legal-hero-brand img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Legal pages */
.legal header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

@media (prefers-color-scheme: dark) {
  .legal header { border-bottom-color: rgba(255,255,255,0.08); }
}

.legal header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.legal header .back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-indigo);
  text-decoration: none;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legal header .back:hover {
  text-decoration: underline;
}

.legal main {
  padding: 1.5rem 0 3rem;
}

.legal h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  color: var(--color-text);
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p {
  margin: 0 0 0.75rem;
  color: var(--color-text-muted);
}

.legal ul {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
  color: var(--color-text-muted);
}

.legal .support-trademark {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.legal .legal-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.8125rem;
}

@media (prefers-color-scheme: dark) {
  .legal .support-trademark,
  .legal .legal-footer { border-top-color: rgba(255,255,255,0.08); }
}

.legal .legal-footer a {
  color: var(--color-indigo);
  text-decoration: none;
  margin-right: 0.75rem;
}

.legal .legal-footer a:hover {
  text-decoration: underline;
}
