/* Bhaav website. Colours are the app's Mist palette (app/.../ui/Theme.kt, MistDark);
   keep them in sync when the app's palette changes. One dark theme on purpose: the
   Ribbon and Orb glow best on the deep green-grey, as in the app. */

:root {
  --bg: #0f1517;
  --bg-2: #121a1d;
  --surface: #161e21;
  --raised: #1c2629;
  --line: #223035;
  --fg: #e7eeec;
  --muted: #8a9a98;
  --accent: #9ed6cb;
  --sage: #b9cdbe;
  --mist: #d6e2e8;
  --on-accent: #0d2420;

  /* Bellota: soft, rounded display face with a real italic, for the brand's warmth.
     Figtree: clear body text. */
  --display: "Bellota", "Baloo 2", "Avenir Next", "Segoe UI", system-ui, sans-serif; /* Baloo 2 / Mukta draw Devanagari on /hi/ */
  --sans: "Figtree", "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3: clamp(2rem, 1.5rem + 2.8vw, 3.8rem);
  --step-4: clamp(2.6rem, 1.5rem + 4.4vw, 5.4rem);

  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sprite { display: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.title { font-family: var(--display); font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.01em; max-width: 24ch; } /* Bellota runs wide: measured in its ch */
.lede { color: var(--muted); font-size: var(--step-1); line-height: 1.55; max-width: 34ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-decoration: none; letter-spacing: 0.01em;
  box-shadow: 0 0 0 0 rgba(158, 214, 203, 0.4), 0 10px 30px -10px rgba(158, 214, 203, 0.6);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(158, 214, 203, 0.12), 0 16px 40px -12px rgba(158, 214, 203, 0.7); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: var(--step--1); }

/* Navigation */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
.nav.scrolled { background: rgba(15, 21, 23, 0.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.6rem; letter-spacing: 0.01em; }
.brand img { height: 34px; width: auto; } /* the wordmark logo; the name is in the image */
.nav-links { display: none; gap: 32px; font-size: var(--step--1); color: var(--muted); }
.nav-links a { text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.lang-switch { margin-left: auto; font-size: var(--step--1); color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.lang-switch:hover { color: var(--fg); border-color: var(--accent); }
.nav-row .btn-small { margin-left: 4px; }

/* Hero */
.hero { position: relative; min-height: 100svh; padding-block: 112px 40px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 90%; z-index: -2;
  background: radial-gradient(60% 50% at 30% 30%, rgba(158, 214, 203, 0.12), transparent 70%),
              radial-gradient(40% 40% at 80% 60%, rgba(214, 226, 232, 0.07), transparent 70%);
}
.hero-aurora { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.85; }
.hero-grid { display: grid; gap: 56px; align-items: center; }
.hero-h1 { font: 600 var(--step--1)/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.display { font-family: var(--display); font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 18px; }
.display .line { display: block; padding-bottom: 0.04em; white-space: nowrap; } /* each tagline half stays on one line */
.display .line > * { display: inline-block; }
.display em { font-style: italic; color: var(--accent); }
.hero-sub { font-family: var(--display); font-style: italic; font-size: var(--step-2); color: var(--sage); margin-bottom: 18px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 20px; font-size: var(--step--1); color: var(--muted); }
.meaning { margin-top: 48px; font-family: var(--display); font-style: italic; color: var(--muted); font-size: var(--step-0); }

/* Phone demo */
.hero-phone { display: flex; justify-content: center; perspective: 1400px; }
.phone {
  --w: min(330px, 84vw);
  width: var(--w); aspect-ratio: 9 / 19; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #2a3639, #10171a 40%, #1b2427);
  box-shadow: 0 0 0 1px rgba(231, 238, 236, 0.08), 0 50px 100px -30px rgba(0, 0, 0, 0.8), 0 0 120px -20px rgba(158, 214, 203, 0.25);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 1.2s var(--ease);
}
.phone:hover { transform: rotateY(0) rotateX(0); }
.phone-screen { position: relative; height: 100%; border-radius: 37px; overflow: hidden; background: #0b1113; display: flex; flex-direction: column; font-size: 13px; line-height: 1.4; }
.status-bar { display: flex; justify-content: space-between; padding: 12px 24px 6px; font-size: 12px; font-weight: 600; }
.status-icons { display: flex; gap: 4px; align-items: center; }
.status-icons i { width: 14px; height: 8px; border-radius: 2px; background: var(--fg); opacity: 0.8; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid #1a2427; }
.chat-head b { display: block; font-size: 14px; }
.chat-head small { color: var(--accent); font-size: 11px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sage), var(--accent)); color: var(--on-accent); font-weight: 700; }
.chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; overflow: hidden; background: radial-gradient(120% 60% at 50% 0%, #121c1f, #0b1113); }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 13px; animation: bubble-in 0.6s var(--ease) both; }
.bubble.in { align-self: flex-start; background: #1a2427; border-bottom-left-radius: 5px; }
.bubble.out { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* The keyboard mirrors app/.../ime/KeyboardScreen.kt (sizes are the app's dp × ~0.9). */
.kb { position: relative; height: 47%; background: var(--bg); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.kb-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 0; }
.kb-icon { width: 22px; height: 22px; margin: 6px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill i { font-style: normal; color: var(--muted); margin: 0 7px; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; margin-left: 2px; }
.kb-stage { position: relative; flex: 1; }
.kb-aurora { position: absolute; inset: 0; width: 100%; height: 100%; }
.kb-status { min-height: 64px; padding: 0 14px 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; text-align: center; }
.kb-status > * { display: none; }
.kb-status.idle .kb-hint, .kb-status.listen .kb-timer, .kb-status.listen .kb-hint, .kb-status.listen .kb-cancel, .kb-status.think .kb-steps, .kb-status.think .kb-cancel { display: block; }
.kb-status.think .kb-steps { display: flex; }
.kb-hint { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.kb-timer { font: 12px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.04em; }
.kb-steps { gap: 12px; font-size: 11px; }
.kb-steps span { color: rgba(138, 154, 152, 0.5); transition: color 0.3s; }
.kb-steps span.done { color: var(--accent); }
.kb-steps span.now { color: var(--fg); }
.kb-cancel { margin-top: 2px; padding: 3px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
.preview {
  position: absolute; inset: 46px 11px 11px; display: flex; flex-direction: column; gap: 9px; background: var(--bg);
  opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}
.preview.show { opacity: 1; transform: none; }
.preview-card { flex: 1; min-height: 0; overflow: hidden; padding: 10px 13px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; text-align: start; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-head svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2; }
.preview small { color: var(--muted); font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
.preview small.accent { color: var(--accent); margin-top: 0; }
.preview-sent { font-size: 14.5px; line-height: 1.4; }
.preview-quiet { font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.preview-actions { display: flex; gap: 7px; }
.act { flex: 1; height: 36px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }
.act.primary { flex: 1.6; border: 0; background: var(--accent); color: var(--on-accent); transition: transform 0.2s; }
.act.primary.press { transform: scale(0.93); }

/* Marquee */
.marquee { border-block: 1px solid var(--line); padding-block: 22px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee ul { display: flex; gap: 56px; padding: 0 28px; margin: 0; list-style: none; }
.marquee li { font-family: var(--display); font-size: var(--step-2); white-space: nowrap; color: var(--sage); }
.marquee li:nth-child(even) { font-style: italic; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Story */
.story { padding-block: clamp(96px, 16vw, 200px); }
.story-lines { display: grid; gap: 0.5em; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 3.4rem); }
.story-lines p {
  font-family: var(--display); font-size: 1em; line-height: 1.15; letter-spacing: -0.01em;
  color: var(--fg); opacity: 0.16; transition: opacity 0.6s, color 0.6s; max-width: 28ch;
}
.story-lines p.lit { opacity: 1; }
.story-lines p:last-child.lit { color: var(--accent); font-style: italic; }

/* Facts */
.facts { padding-block: clamp(72px, 12vw, 140px) 0; }
.facts-summary { margin-top: 16px; max-width: 46ch; }
.facts-list { margin: 40px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts-list div { display: grid; gap: 4px; padding: 18px 22px; background: var(--surface); }
.facts-list dt { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.facts-list dd { margin: 0; color: var(--fg); }
@media (min-width: 760px) { .facts-list div { grid-template-columns: 200px 1fr; align-items: baseline; gap: 24px; } }

/* How */
.how, .features, .moods, .faq { padding-block: clamp(72px, 12vw, 140px); }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 20px; }
.step { position: relative; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.step h3 { font-family: var(--display); font-size: var(--step-2); margin: 8px 0 6px; }
.step p { color: var(--muted); }
.step-num { font-size: var(--step--1); font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.step-art { position: relative; height: 150px; margin: -22px -22px 18px; background: radial-gradient(80% 90% at 50% 100%, rgba(158, 214, 203, 0.1), transparent), var(--bg-2); border-bottom: 1px solid var(--line); overflow: hidden; }
.step-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.step-art .mini-card, .step-art .mini-chat { display: none; }
.step-art-0 canvas { display: block; }
.step-art-1 canvas, .step-art-2 canvas { display: none; }
.step-art-1 .mini-card { display: flex; flex-direction: column; gap: 9px; position: absolute; inset: 26px 18% 26px; padding: 16px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); animation: float 6s ease-in-out infinite; }
.mini-card span { height: 8px; border-radius: 4px; background: var(--line); }
.mini-card span:first-child { background: var(--accent); opacity: 0.8; width: 80%; }
.mini-card span.short { width: 50%; }
.mini-card b { position: absolute; right: 12px; bottom: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.mini-card b svg { width: 15px; height: 15px; fill: none; stroke: var(--on-accent); stroke-width: 2.4; }
.step-art-2 .mini-chat { display: flex; flex-direction: column; gap: 10px; position: absolute; inset: 24px 16%; justify-content: center; }
.mini-chat .b { height: 26px; border-radius: 14px; }
.mini-chat .in { width: 58%; background: var(--raised); }
.mini-chat .out { width: 70%; align-self: flex-end; background: var(--accent); animation: send 3.2s var(--ease) infinite; }
@keyframes send { 0%, 20% { opacity: 0; transform: translateY(26px) scale(0.9); } 40%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Features */
.feature-grid { margin-top: 48px; display: grid; gap: 16px; }
.feature {
  position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.4s; transform-style: preserve-3d;
}
.feature::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(158, 214, 203, 0.12), transparent 70%); }
.feature:hover { border-color: rgba(158, 214, 203, 0.35); }
.feature:hover::after { opacity: 1; }
.feature-icon { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.feature h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--muted); }

/* Moods */
.moods .lede { margin-top: 16px; }
.mood-grid { margin-top: 40px; display: grid; gap: 16px; }
.mood { margin: 0; position: relative; height: 300px; border-radius: var(--radius); background: radial-gradient(70% 70% at 50% 50%, #142024, var(--bg-2)); border: 1px solid var(--line); overflow: hidden; touch-action: pan-y; cursor: crosshair; }
.mood canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mood figcaption { position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.mood figcaption b { font-family: var(--display); font-size: var(--step-2); font-weight: 400; }
.mood figcaption span { color: var(--muted); font-size: var(--step--1); }
.hint { margin-top: 16px; color: var(--muted); font-size: var(--step--1); }

/* Privacy */
.privacy { padding-block: 40px; }
.privacy-card { padding: clamp(28px, 6vw, 64px); border-radius: calc(var(--radius) + 8px); background: linear-gradient(160deg, #18272a, #121a1d 60%); border: 1px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 16px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--step-1); line-height: 1.45; }
.checks svg { flex: none; width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: rgba(158, 214, 203, 0.14); fill: none; stroke: var(--accent); stroke-width: 2.4; margin-top: 2px; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(158, 214, 203, 0.4); padding-bottom: 2px; }
.link:hover { border-color: var(--accent); }

/* FAQ */
.faq-list { margin-top: 36px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 24px 0; font-size: var(--step-1); font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; transition: transform 0.4s var(--ease); }
details[open] summary svg { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: 24px; max-width: 60ch; animation: fade 0.5s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } }

/* CTA */
.cta { position: relative; overflow: hidden; padding-block: clamp(110px, 18vw, 200px); text-align: center; isolation: isolate; }
.cta-aurora { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.9; }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.tagline { font-family: var(--display); font-style: italic; font-size: var(--step-1); color: var(--accent); }
.display-2 { font-family: var(--display); font-size: var(--step-3); line-height: 1.08; max-width: 24ch; }
.cta .lede { margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup { width: min(100%, 460px); display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.signup input {
  flex: 1 1 220px; min-height: 52px; padding: 0 20px; border-radius: 999px; font: inherit; color: var(--fg);
  background: rgba(22, 30, 33, 0.85); border: 1px solid var(--line); outline: none; transition: border-color 0.3s, box-shadow 0.3s;
}
.signup input::placeholder { color: var(--muted); }
.signup input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(158, 214, 203, 0.15); }
.signup .btn { flex: 0 0 auto; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.signup .btn:disabled { opacity: 0.6; cursor: default; }
.signup-msg { flex-basis: 100%; min-height: 1.5em; font-size: var(--step--1); color: var(--muted); }
.signup-msg.ok { color: var(--accent); }
.signup-msg.bad { color: #e8b4a8; }
.signup.done input, .signup.done .btn { display: none; }
.signup.done .signup-msg { font-size: var(--step-1); font-family: var(--display); font-style: italic; }
.signup-note { color: var(--muted); font-size: var(--step--1); }

/* Landing pages */
.landing-hero { min-height: auto; padding-block: 120px 56px; }
.landing-grid { display: grid; gap: 40px; align-items: center; }
.landing-hero .display-2 { margin-bottom: 18px; }
.example { margin: 0; display: grid; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.example small { display: block; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.example-said p { color: var(--muted); }
.example-sent { padding: 14px 16px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--on-accent); }
.example-sent small { color: var(--on-accent); opacity: 0.7; }
@media (min-width: 1020px) { .landing-grid { grid-template-columns: 1.1fr 0.9fr; } }
.guides { display: flex; flex-wrap: wrap; gap: 8px 20px; grid-column: 1 / -1; }
.guides:empty { display: none; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom)); color: var(--muted); font-size: var(--step--1); }
.footer-row { display: grid; gap: 18px; justify-items: start; }
.footer .brand { color: var(--fg); }
.footer nav { display: flex; gap: 24px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--fg); }

/* Reveal on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* The hero is visible from the first paint (no JS needed); it only drifts up into place. */
.hero-copy > *, .hero-phone { animation: rise 1.1s var(--ease) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.05s; }
.hero-copy > :nth-child(n+3) { animation-delay: 0.12s; }
.hero-phone { animation-delay: 0.2s; }
@keyframes rise { from { transform: translateY(18px); } }

/* Wider screens */
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-grid { grid-template-columns: 1fr 1fr; }
  .mood { height: 380px; }
  .footer-row { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 32px; }
}
@media (min-width: 1020px) {
  .hero-grid { grid-template-columns: 1.25fr 0.75fr; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .phone { --w: min(340px, calc((100svh - 150px) * 0.47)); }
  .hero { padding-block: 96px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee-track { animation: none; }
}

/* 404 */
.notfound { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; padding-block: 100px 60px; }
.notfound canvas { width: min(100%, 520px); height: 180px; }
.notfound .lede { margin-inline: auto; }

/* Legal pages (privacy policy) */
.legal { padding-block: 120px 80px; max-width: 760px; }
.legal h1 { font-family: var(--display); font-size: var(--step-3); line-height: 1.05; margin-bottom: 16px; }
.legal h2 { font-family: var(--display); font-size: var(--step-2); margin: 48px 0 14px; }
.legal p, .legal li { color: #c3cfcc; }
.legal p { margin-bottom: 14px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 0 0 14px; }
.legal .lede { color: var(--fg); max-width: none; margin-bottom: 14px; }
.legal .meta { color: var(--muted); font-size: var(--step--1); }
.legal a { color: var(--accent); }
.legal .table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.legal table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: var(--step--1); }
.legal th, .legal td { text-align: start; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--fg); background: var(--surface); }
.legal td { color: #c3cfcc; }

/* Devanagari joins its letters; extra spacing and capitals break words apart on /hi/. */
:lang(hi) * { letter-spacing: 0 !important; }
