/* flyvaanam.com: the pinned-phone landing page (24 Nov 2026). Raven palette and the Apple system font (DESIGN.md);
   motion by Madhav's landing-page exception. The phone (a Blender render with its screen cut out) stays put while the
   chapters scroll; the app's screens sit behind the cut-out. */
@font-face { font-family: "Mukta Malar"; src: url("/MuktaMalar-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
:root {
  --ink: #121214; --card: #1C1C1F; --raised: #27272B; --text: #EDEDEE; --muted: #85888E; --pewter: #A3A6AB; --butter: #C4C6CA;
  --orange: #FF5410; --dusk: #2C2C31;
  --sans: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  --tamil: "Mukta Malar", "Tamil Sangam MN", var(--sans);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: max(20px, 5vw);
  --nav: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav); }
html, body { margin: 0; background: var(--ink); color: var(--text); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
body { overflow-x: clip; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--butter); outline-offset: 3px; border-radius: 6px; }

/* ---------- nav: always there, so the waitlist is one tap away ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--nav) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 28px; transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.nav.scrolled { background: rgba(18, 18, 20, .72); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.nav .brand { margin-right: auto; display: grid; gap: 4px; justify-items: start; }
.nav .wm { font: 800 26px/1 var(--tamil); text-decoration: none; white-space: nowrap; }
.wm-means { appearance: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; display: inline-flex;
  align-items: center; gap: 4px; font: 500 11.5px/1.2 var(--sans); color: var(--muted); white-space: nowrap; }
.wm-means:hover, .wm-means[aria-expanded="true"] { color: var(--pewter); }
.wm-means svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wm-means[aria-expanded="true"] svg { transform: rotate(180deg); }
/* The language picker: a flat panel under the wordmark. */
.wm-pop { position: fixed; z-index: 30; top: calc(var(--nav) + env(safe-area-inset-top, 0px) + 4px);
  left: max(var(--gutter), env(safe-area-inset-left, 0px)); width: min(440px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - var(--nav) - 24px); overflow: auto; overscroll-behavior: contain;
  background: var(--raised); border-radius: 18px; padding: 16px; }
.wm-pop[hidden] { display: none; }
.wm-pop p { margin: 0 0 12px; font-size: 14px; color: var(--pewter); }
.wm-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.wm-pick { appearance: none; font: inherit; background: var(--card); border: 1px solid transparent; border-radius: 12px;
  padding: 10px 6px; display: grid; gap: 2px; justify-items: center; color: var(--text); cursor: pointer; }
.wm-pick:hover { background: var(--dusk); }
.wm-pick b { font: 800 19px/1.3 var(--tamil); }
.wm-pick small { font-size: 11px; color: var(--muted); }
.wm-pick.on { border-color: var(--pewter); }
.nav .links { display: flex; gap: 26px; }
.nav .links a, .nav .signin { font-size: 15px; color: var(--pewter); text-decoration: none; }
.nav .links a:hover, .nav .signin:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 0; border-radius: 999px; padding: 14px 24px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), background .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn.solid { background: var(--butter); color: var(--ink); }
.btn.solid:hover { background: #D6D8DB; }
.btn.ghost { background: var(--raised); color: var(--text); }
.btn.ghost:hover { background: #313136; }
.btn.sm { padding: 10px 16px; font-size: 14px; }
.btn svg { width: 11px; height: 13px; fill: var(--orange); }
.btn span { color: var(--muted); font-weight: 500; }

/* ---------- the story ---------- */
.story { position: relative; }
.pin { position: absolute; inset: 0; pointer-events: none; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.sky, .sky i { position: absolute; inset: 0; }
.sky i { opacity: 0; transition: opacity 1.2s var(--ease); }
/* Night to dawn as the chapters pass: a dusk glow under the phone, then a faint warm horizon on Miles. */
.sky .s1 { background: radial-gradient(60% 55% at 75% 62%, rgba(44, 44, 49, .95), transparent 70%); }
.sky .s2 { background: radial-gradient(70% 60% at 75% 100%, rgba(58, 58, 64, .9), transparent 72%); }
.sky .s3 { background: radial-gradient(80% 42% at 75% 108%, rgba(255, 84, 16, .16), transparent 70%), radial-gradient(70% 60% at 75% 100%, rgba(58, 58, 64, .8), transparent 72%); }
.story[data-ch="0"] .s1, .story[data-ch="1"] .s1, .story[data-ch="2"] .s2, .story[data-ch="3"] .s2, .story[data-ch="4"] .s3 { opacity: 1; }

/* The phone. Its picture is 900×1500; the screen cut-out (Blender's SCREEN_RECT) is x 160, y 119.5, 579.9 × 1261. */
.device { position: absolute; left: 72%; top: calc(50% + var(--nav) / 2); height: min(calc(94svh - var(--nav)), 860px); aspect-ratio: 900 / 1500; transform: translate(-50%, -50%); }
.js .device { opacity: 0; transition: opacity .7s var(--ease); }
.js .device.ready { opacity: 1; }
.device.turning .body, .device.turning .screens { visibility: hidden; }
.device .body, .device .turn { position: absolute; inset: 0; width: 100%; height: 100%; }
.device .turn { display: none; }
.js .device .turn.live { display: block; }
.screens { position: absolute; left: 17.6%; top: 7.85%; width: 64.8%; height: 84.3%; border-radius: 13.8% / 6.36%; overflow: hidden; background: #000; }
.scr { position: absolute; inset: 0; opacity: 0; transform: translateY(1.2%) scale(.985); transition: opacity .45s var(--ease), transform .55s var(--ease); }
.scr.on { opacity: 1; transform: none; }
.scr img, .scr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.scr video { opacity: 0; transition: opacity .3s; }
.scr video.playing { opacity: 1; }
.glare { position: absolute; inset: 0; background: linear-gradient(118deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 32%, transparent 46%); pointer-events: none; }

/* Chapter rail beside the phone: labelled, and each one jumps to its chapter. */
.railpin { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.rail { position: sticky; top: calc(50svh - 64px); width: max-content; margin: 0 max(28px, 3vw) 0 auto; display: grid; gap: 12px; pointer-events: auto;
  opacity: 0; transition: opacity .4s var(--ease); }
.story:not([data-ch="0"]) .rail { opacity: 1; }
.rail a { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .3s var(--ease); }
.rail a::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: #3A3B40; transition: width .4s var(--ease), background .4s var(--ease); }
.rail a.on { color: var(--text); }
.rail a.on::before { width: 40px; background: var(--butter); }

.copy { position: relative; z-index: 2; width: 50%; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); }
.block { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.block .inner { max-width: 500px; padding-block: 12vh; will-change: opacity, transform; }
.hero h1 { font-size: clamp(44px, 5.6vw, 76px); line-height: 1.03; letter-spacing: -0.04em; }
.hero .sub { font-size: clamp(17px, 1.35vw, 20px); color: var(--pewter); margin: 22px 0 0; max-width: 460px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; color: var(--pewter); background: var(--card); padding: 7px 13px; border-radius: 999px; }
.kicker { display: block; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.block h2 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.06; letter-spacing: -0.03em; }
.block p { font-size: clamp(17px, 1.3vw, 19px); color: var(--pewter); margin: 18px 0 0; }
/* Without scripts (and for search engines) each chapter carries its own still and the phone is hidden. */
.still { width: min(300px, 70%); margin-top: 28px; border-radius: 28px; }
.js .still { display: none; }
html:not(.js) .pin, html:not(.js) .railpin { display: none; }
html:not(.js) .copy { width: auto; }

/* ---------- after the story ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
section.band, section.how, section.privacy, section.waitlist, section.faq { padding-block: clamp(72px, 12vh, 140px); }
section h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.band { background: linear-gradient(var(--ink), #18181B); }
.band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.band h2 { max-width: 560px; }
.band .ctas { margin-top: 0; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps li { background: var(--card); border-radius: 22px; padding: 26px 26px 30px; min-width: 0; }
.steps .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--raised); font-size: 15px; font-weight: 600; color: var(--butter); }
.steps h3, .privacy h3 { font-size: 20px; margin-top: 18px; letter-spacing: -0.01em; }
.steps p, .privacy p { color: var(--pewter); margin: 8px 0 0; font-size: 16px; }

.privacy .grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.privacy .grid > div { border-top: 1px solid #2E2F34; padding-top: 6px; min-width: 0; }

.waitlist { background: radial-gradient(60% 80% at 50% 120%, rgba(58,58,64,.7), transparent 70%); text-align: center; }
.waitlist p { color: var(--pewter); margin: 14px 0 0; }
#wl { margin: 32px auto 0; display: flex; gap: 10px; max-width: 480px; }
#wl input { flex: 1; min-width: 0; font: 16px var(--sans); color: var(--text); background: var(--raised); border: 0; border-radius: 999px; padding: 14px 20px; outline: none; }
#wl input::placeholder { color: var(--muted); }
#wl input:focus { box-shadow: 0 0 0 2px var(--pewter); }
#wl button[disabled] { opacity: .6; }
.waitlist .msg { min-height: 26px; margin-top: 14px; font-size: 15px; color: var(--butter); }
.waitlist .msg.err { color: var(--orange); }

.faq .wrap { max-width: 760px; }
.faq h2 { margin-bottom: 24px; }
details { border-top: 1px solid #2E2F34; }
details:last-of-type { border-bottom: 1px solid #2E2F34; }
summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; font-size: 19px; font-weight: 500; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0 0 22px; color: var(--pewter); max-width: 62ch; }

.foot { padding-block: 48px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #222226; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.foot .wm { font: 800 30px/1 var(--tamil); }
.foot p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.foot nav { display: flex; gap: 22px; }
.foot nav a { color: var(--pewter); text-decoration: none; font-size: 14px; }
.foot nav a:hover { color: var(--text); }

/* ---------- the film ---------- */
.film { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.film[hidden] { display: none; }
.film video { max-width: min(100%, 1280px); max-height: 100%; border-radius: 14px; background: #000; }
.film-x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(39,39,43,.9); cursor: pointer; display: grid; place-items: center; }
.film-x svg { width: 14px; height: 14px; stroke: var(--text); stroke-width: 2; }

/* ---------- tablets and phones: the phone pins at the top, the words pass underneath ---------- */
@media (max-width: 900px) {
  :root { --nav: 56px; --cap: calc(var(--nav) + 2svh + 56svh + 58px); }
  .nav { gap: 14px; }
  .nav .links { display: none; }
  .nav .signin { font-size: 14px; white-space: nowrap; }
  .nav .wm { font-size: 23px; }
  .device { left: 50%; top: calc(var(--nav) + 2svh); height: 56svh; transform: translateX(-50%); }
  .sky .s1 { background: radial-gradient(90% 50% at 50% 34%, rgba(44,44,49,.95), transparent 70%); }
  .sky .s2 { background: radial-gradient(110% 55% at 50% 62%, rgba(58,58,64,.9), transparent 72%); }
  .sky .s3 { background: radial-gradient(120% 30% at 50% 66%, rgba(255,84,16,.14), transparent 70%), radial-gradient(110% 55% at 50% 62%, rgba(58,58,64,.8), transparent 72%); }
  .rail { top: calc(var(--nav) + 2svh + 56svh + 10px); width: auto; margin: 0; display: flex; justify-content: center; gap: 6px; padding: 0 16px; }
  .rail a { font-size: 12px; padding: 6px 10px; border-radius: 999px; gap: 0; }
  .rail a::before { display: none; }
  .rail a.on { background: var(--raised); }
  .copy { width: auto; padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
  .block { align-items: flex-end; min-height: 72svh; }
  .block.hero { min-height: 100svh; }
  .block.hero .inner { padding-bottom: 2svh; }
  .block .inner { max-width: 560px; margin: 0 auto; padding-block: 0 5svh; text-align: center; }
  /* The words sit below the phone: a soft dark floor keeps them readable over the glow. */
  .block .inner { position: relative; }
  /* Each chapter's words rise into the slot under the chapter pills, stay there while its chapter plays, fade out in
     place (story.js), then the next one takes the slot. Sticky, so it's still the page's own scrolling. */
  .js .block:not(.hero) { align-items: flex-start; }
  .js .block:not(.hero) .inner { position: sticky; top: var(--cap); padding-bottom: 0; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 44px); }
  .hero .sub { font-size: 15.5px; margin: 12px auto 0; }
  .hero .ctas { justify-content: center; margin-top: 18px; }
  .hero .ctas .btn { padding: 12px 18px; font-size: 15px; }
  .hero .chips { display: none; }
  .kicker { font-size: 13px; margin-bottom: 6px; }
  .block h2 { font-size: clamp(26px, 7.4vw, 36px); }
  .block p { font-size: 15.5px; margin-top: 10px; }
  .steps, .privacy .grid { grid-template-columns: 1fr; }
  .privacy .grid { gap: 24px; }
  .band .wrap { flex-direction: column; align-items: flex-start; }
  #wl { flex-direction: column; }
  html:not(.js) .block .inner { text-align: left; }
}
@media (max-width: 400px) {
  .nav .btn .the { display: none; }   /* "Join waitlist": room for a long word for sky next to it */
}
@media (max-width: 900px) and (max-height: 700px) {
  .device { height: 50svh; }
  :root { --cap: calc(var(--nav) + 2svh + 50svh + 52px); }
  .rail { top: calc(var(--nav) + 2svh + 50svh + 8px); }
  .hero .sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scr, .sky i, .rail a, .rail a::before, .btn { transition: none; }
  .scr { transform: none; }
}
