/* Duskbox site — palette and surfaces taken from the app:
   lib/theme/duskbox_palette.dart (DuskboxPalette), lib/theme/app_theme.dart
   (Material 3 dark scheme seeded with #8E5A9E), lib/widgets/glass_card.dart
   (GlassCard) and lib/widgets/aurora_background.dart (AuroraBackground). */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  /* DuskboxPalette */
  --bg: #1c1526;            /* darkBackground */
  --mauve: #8e5a9e;
  --rose: #c77b93;
  --amber: #e0a45c;
  --glow: #f2cd7c;          /* momentsGlow */
  --moon: #9fc3e8;
  /* ColorScheme.fromSeed(#8E5A9E, dark) */
  --primary: #e6b6f1;
  --primary-container: #5e386a;
  --on-surface: #eae0e7;
  --on-surface-variant: #cfc3cd;
  --outline: #988e97;
  /* GlassCard, dark: white 6% fill, white 12% border, radius 16 */
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --radius: 16px;
  --radius-btn: 12px;

  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 20px;
  --max: 1100px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 480px) { :root { --gutter: 16px; } body { font-size: 16px; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--primary); color: #462152; padding: 8px 14px;
  border-radius: var(--radius-btn); font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- Aurora background: three slow blurred glows ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.3;
  will-change: transform;
}
.blob-rose  { background: var(--rose);  width: 330px; height: 330px; top: -90px; left: -70px; animation: drift-a 24s linear infinite; }
.blob-mauve { background: var(--mauve); width: 390px; height: 390px; top: 250px; right: -100px; animation: drift-b 24s linear infinite; }
.blob-amber { background: var(--amber); width: 280px; height: 280px; bottom: -80px; left: 60px; animation: drift-c 24s linear infinite; }
@keyframes drift-a { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-60px,150px); } 50% { transform: translate(-140px,0); } 75% { transform: translate(-60px,-120px); } }
@keyframes drift-b { 0%,100% { transform: translate(0,0); } 25% { transform: translate(-120px,-140px); } 50% { transform: translate(0,-60px); } 75% { transform: translate(110px,120px); } }
@keyframes drift-c { 0%,100% { transform: translate(0,0); } 25% { transform: translate(140px,-140px); } 50% { transform: translate(0,-200px); } 75% { transform: translate(-80px,-60px); } }
@media (min-width: 900px) {
  .blob-rose { width: 520px; height: 520px; }
  .blob-mauve { width: 600px; height: 600px; top: 30vh; }
  .blob-amber { width: 460px; height: 460px; left: 20vw; }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(28, 21, 38, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--on-surface); text-decoration: none;
  font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img { border-radius: 7px; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--on-surface-variant); text-decoration: none;
  font-weight: 500; font-size: 15px;
  padding: 8px 10px; border-radius: 10px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--on-surface); background: rgba(255, 255, 255, 0.06); }
@media (max-width: 560px) {
  .nav a { padding: 8px 7px; font-size: 14px; }
  .brand { font-size: 17px; gap: 8px; }
}

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  color: var(--on-surface);
  padding: 7px 9px; min-height: 36px;
  border: 1px solid var(--card-border); border-radius: 10px;
  background: var(--card);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after {
  content: ''; width: 6px; height: 6px; margin-left: 2px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px);
  list-style: none; margin: 0; padding: 6px; min-width: 150px;
  background: rgba(40, 31, 52, 0.96);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--card-border); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.lang li a {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--on-surface); text-decoration: none; font-size: 15px;
}
.lang li a:hover { background: rgba(255, 255, 255, 0.07); }
.lang li a[aria-current="true"] { color: var(--primary); font-weight: 700; }

/* ---------- Cards (GlassCard) ---------- */
.card {
  background: var(--card);
  border: 0.8px solid var(--card-border);
  border-radius: var(--radius);
  /* No backdrop blur here: the aurora behind is already blurred, and a
     page of blurred cards costs a lot of GPU for no visible change. */
}

/* ---------- Header CTA ---------- */
.nav-cta {
  color: #1c1526 !important; background: var(--glow) !important;
  font-weight: 700 !important; border-radius: 999px !important;
  padding: 8px 14px !important;
}
.nav-cta:hover { background: #f7dc9c !important; }
.page-home .topbar {
  position: fixed; inset: 0 0 auto 0;
  background: linear-gradient(180deg, rgba(20, 14, 30, 0.55), rgba(20, 14, 30, 0));
  border-bottom: 1px solid transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background-color 0.3s, border-color 0.3s;
}
.page-home.scrolled .topbar {
  background: rgba(18, 13, 26, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---------- Stage: one day behind the whole home page ---------- */
/* Driven by site.js: sky keyframes cross-fade (opacity), the sun and the
   star field move by transform. Nothing here repaints on scroll. */
.page-home { --scrim: 0; background: #0c0b1a; }
.stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #05050f; }
.sky-live { position: absolute; inset: 0; background: #05050f; }
.stars { position: absolute; inset: 0; opacity: 0; will-change: opacity;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 78%); mask-image: linear-gradient(180deg, #000 45%, transparent 78%); }
.stars-rot {
  position: absolute; left: 78%; top: 8%; width: 300vmax; height: 300vmax; margin: -150vmax 0 0 -150vmax;
  background: url('/assets/img/sky/stars-tile.webp') 0 0 / 512px 512px repeat;
  will-change: transform;
}
.sun { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.sun > span { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.sun-glow { width: 320px; height: 320px; background: radial-gradient(circle, rgba(255, 246, 222, 0.75) 0 8%, rgba(255, 226, 170, 0.35) 22%, rgba(255, 214, 150, 0) 65%); }
.sun-disc { width: 46px; height: 46px; background: radial-gradient(circle, #fffdf6 0 55%, #fff3d6 80%, #ffe6b0 100%); box-shadow: 0 0 22px 6px rgba(255, 244, 214, 0.75); }
.sun-white { width: 46px; height: 46px; background: #fffaf0; opacity: 0; }
.ridge-box {
  position: absolute; bottom: 0; left: 50%;
  height: max(46vh, calc(100vw * 0.3594)); aspect-ratio: 3072 / 1104;
  transform: translateX(-50%);
}
@media (max-width: 760px) { .ridge-box { transform: translateX(-60%); height: 40vh; } }
/* The ridge is tinted continuously from the sun's elevation (site.js sets
   the colours): near colour everywhere, far colour through a depth mask
   (aerial perspective), then alpenglow and rim light on the crests. */
.rl { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.rl-near { background: var(--rnear, #07060d); -webkit-mask-image: url('/assets/img/sky/mask-ridge.webp'); mask-image: url('/assets/img/sky/mask-ridge.webp'); }
.rl-far { background: var(--rfar, #1c1b2e); -webkit-mask-image: url('/assets/img/sky/mask-depth.webp'); mask-image: url('/assets/img/sky/mask-depth.webp'); }
.rl-mid { background: var(--rmid, #9c9480); opacity: var(--rmidk, 0); -webkit-mask-image: url('/assets/img/sky/mask-mid.webp'); mask-image: url('/assets/img/sky/mask-mid.webp'); }
.rl-glow { background: var(--rglow, #f2849a); opacity: var(--rglowk, 0); -webkit-mask-image: url('/assets/img/sky/mask-glow.webp'); mask-image: url('/assets/img/sky/mask-glow.webp'); }
.rl-rim { background: var(--rrim, #ffb88c); opacity: var(--rrimk, 0); -webkit-mask-image: url('/assets/img/sky/mask-rim.webp'); mask-image: url('/assets/img/sky/mask-rim.webp'); }
.meteors { position: absolute; inset: 0; }
.meteor {
  position: absolute; width: 140px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  transform-origin: right center; opacity: 0;
  animation: meteor 1.1s ease-out forwards;
}
@keyframes meteor {
  0% { opacity: 0; transform: translate(0, 0) rotate(var(--ang)) scaleX(0.2); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--ang)) scaleX(1); }
}
.scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 10, 22, 0.7) 0%, rgba(14, 10, 22, 0.45) 55%, rgba(14, 10, 22, 0.15) 100%);
  opacity: var(--scrim);
}
@media (max-width: 760px) { .scrim { background: rgba(14, 10, 22, 0.58); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: 96px;
}
.hero-inner { padding-top: 4vh; }
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-family: var(--mono); font-weight: 500; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--glow);
}
.eyebrow img { border-radius: 7px; }
.hero h1 {
  margin: 0; max-width: 100%;
  font-size: clamp(34px, 6.2vw, 96px); overflow-wrap: break-word; font-weight: 700;
  line-height: 0.94; letter-spacing: -0.045em; color: #fff;
  text-shadow: 0 2px 30px rgba(20, 10, 30, 0.35);
}
.hero h1 span { display: block; }
.hero h1 span + span {
  color: var(--glow);
}
.pitch {
  margin: 24px 0 0; max-width: 30ch;
  font-size: clamp(18px, 2.2vw, 23px); line-height: 1.45; color: rgba(255, 255, 255, 0.88);
}
.hero-cta { display: flex; align-items: center; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 18px 9px 14px; min-height: 52px;
  border-radius: var(--radius-btn);
  background: #0e0a14; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.store-badge .phone-glyph { width: 26px; height: 26px; }
.badge-text { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.badge-text small { font-size: 12px; color: rgba(255, 255, 255, 0.75); }
.badge-text strong { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.store-badge.is-soon .badge-text small { color: var(--glow); font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.store-badge.big { min-height: 62px; padding: 12px 24px 12px 18px; }
.store-badge.big .badge-text strong { font-size: 24px; }
.platform { color: rgba(255, 255, 255, 0.8); font-size: 15px; }
.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding-bottom: 22px;
}
.scene-caption {
  margin: 0; max-width: 46ch;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.62);
}
.scroll-hint {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255, 255, 255, 0.8); text-decoration: none; font-size: 13px;
}
.scroll-hint span {
  width: 1px; height: 38px; background: linear-gradient(180deg, #fff, transparent);
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint { 0%, 100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }
@media (max-width: 560px) { .scroll-hint { display: none; } }

/* ---------- Chapters ---------- */
.chapter { padding: 0; }
.chapter-grid {
  display: grid; gap: 40px; align-items: center;
  grid-template-columns: 1fr;
}
.chapter-text { max-width: 560px; }
.phase {
  display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--glow);
}
.phase-time { color: #fff; font-size: 12.5px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; letter-spacing: 0.04em; }
.chapter h2, .classics h2, .also h2 {
  margin: 0; font-size: clamp(34px, 5.2vw, 64px); font-weight: 700;
  line-height: 1.02; letter-spacing: -0.035em; color: #fff;
}
.chapter-body { margin: 20px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: rgba(255, 255, 255, 0.84); }
.chapter-body em { font-style: normal; color: var(--glow); }
.chapter .note { margin: 16px 0 0; font-family: var(--mono); font-size: 12.5px; color: rgba(255, 255, 255, 0.6); }
.chapter-phone { display: flex; justify-content: center; }
@media (min-width: 900px) {
  .chapter .pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 10vh 0; box-sizing: border-box; }
  .chapter-grid { grid-template-columns: 1.1fr 0.9fr; gap: 72px; }
  .chapter.flip .chapter-text { order: 2; }
  .chapter.flip .chapter-grid { grid-template-columns: 0.9fr 1.1fr; }
}

/* iPhone frame (CSS only) */
.iphone {
  position: relative; width: clamp(260px, 22vw, 320px); aspect-ratio: 393 / 852;
  padding: 10px; border-radius: 54px;
  background: linear-gradient(145deg, #4a4452, #1a1620 38%, #2a2430 70%, #151218);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(4, 3, 10, 0.5), 0 12px 30px rgba(4, 3, 10, 0.35);
}
.iphone-screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #0f0c16; }
.iphone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center;
  background: linear-gradient(180deg, #1f1929, #141019); }
.slot span { font: 500 13px var(--mono); letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.45); }
@media (max-width: 760px) { .iphone { width: 60vw; padding: 8px; border-radius: 44px; } .iphone-screen { border-radius: 36px; } }
.iphone-screen img { width: 100%; height: 100%; object-fit: cover; }
.island { position: absolute; top: 11px; left: 50%; width: 31%; height: 26px; transform: translateX(-50%); background: #000; border-radius: 20px; }

/* ---------- Classics teaser ---------- */
.classics { padding: 14vh 0 10vh; }
.classics-inner { display: grid; gap: 40px; align-items: end; }
@media (min-width: 900px) { .classics-inner { grid-template-columns: 1fr 1fr; gap: 72px; } }
.kicker { margin: 0 0 22px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--glow); }
.cd-title { margin: 0; }
.cd-value { margin: 14px 0 6px; font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; color: var(--glow); }
.cd-date { margin: 0; font-family: var(--mono); font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.classics-text p { margin: 18px 0 0; font-size: 18px; color: rgba(255, 255, 255, 0.82); }
.link-disabled {
  display: inline-block; margin-top: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.45);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3); cursor: not-allowed;
}

/* ---------- Also in the app ---------- */
.also { padding: 6vh 0; }
.also h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; }
.also-list { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: clamp(18px, 2.2vw, 26px); font-weight: 500; color: rgba(255, 255, 255, 0.82); }
.also-list li:not(:last-child)::after { content: '·'; margin: 0 14px; color: var(--glow); }

/* ---------- Closing ---------- */
.closing { padding: 18vh 0 12vh; }
.brand-line { margin: 0; font-size: clamp(40px, 7.6vw, 104px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: #fff; }
.brand-line span { display: inline-block; }
.brand-line span:first-child { color: var(--glow); }
.closing-price { margin: 34px 0 0; font-size: clamp(18px, 2vw, 24px); font-weight: 500; color: rgba(255, 255, 255, 0.85); }
.closing .hero-cta { margin-top: 20px; }
.page-home .footer { margin-top: 0; background: rgba(6, 5, 12, 0.6); }

@media (prefers-reduced-motion: reduce) { .scroll-hint span { animation: none; } }

.nf-scene { width: 100%; max-height: 220px; object-fit: cover; object-position: 50% 80%; border-radius: var(--radius); margin-bottom: 26px; }

/* ---------- Documents (privacy / support) ---------- */
.doc { max-width: 760px; padding-top: 44px; padding-bottom: 16px; }
.doc h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.doc .updated { margin: 10px 0 26px; font-family: var(--mono); font-size: 13px; color: var(--outline); }
.doc .lead { font-size: 19px; color: var(--on-surface-variant); margin: 14px 0 8px; }
.doc h2 { margin: 36px 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--on-surface-variant); }
.doc strong { color: var(--on-surface); font-weight: 700; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--mauve); }
.checks { list-style: none; padding: 0 !important; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ''; position: absolute; left: 3px; top: 0.42em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--glow); border-bottom: 2px solid var(--glow);
  transform: rotate(-45deg);
}
.services { display: grid; gap: 12px; }
.service {
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 0.8px solid var(--card-border);
}
.service h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--primary); }
.service p { margin: 6px 0 0; font-size: 15px; }
.mail { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }

.faq { display: grid; gap: 10px; }
.faq-item { padding: 0; }
.faq-item summary {
  cursor: pointer; list-style: none;
  padding: 16px 48px 16px 18px; position: relative;
  font-weight: 700; font-size: 17px; line-height: 1.35; color: var(--on-surface);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 20px; top: 50%;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(45deg); transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-answer { padding: 0 18px 6px; }
.faq-answer p { margin: 0 0 12px; }

.not-found { text-align: center; }
.not-found .scene { margin-bottom: 26px; }

/* ---------- Footer ---------- */
main { flex: 1; }
.footer { margin-top: 64px; border-top: 1px solid rgba(255, 255, 255, 0.08); background: rgba(14, 10, 20, 0.35); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 22px; padding-bottom: 28px; }
.footer p { margin: 0; color: var(--on-surface-variant); font-size: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { border-radius: 5px; }
.footer-links { display: flex; gap: 10px; align-items: center; }
.footer-links a { color: var(--on-surface-variant); }
.footer-links a:hover { color: var(--on-surface); }
.credit-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px !important; }
.service p { overflow-wrap: anywhere; }


/* ---------- Scroll-driven bits (--p per section from site.js) ---------- */
.r1 { --a: 0.35; --b: 0.6; } .r2 { --a: 0.45; --b: 0.7; } .r3 { --a: 0.6; --b: 0.85; }
.r { --q: clamp(0, calc((var(--p, 1) - var(--a)) / (var(--b) - var(--a))), 1); }
.fx-fade { opacity: var(--q); }
.fx-up { opacity: var(--q); transform: translateY(calc((1 - var(--q)) * 28px)); }
.fx-reveal { clip-path: inset(0 calc((1 - var(--q)) * 100%) 0 0); }
.fx-arc { opacity: calc(0.25 + var(--q) * 0.75); transform: translateY(calc((1 - var(--q)) * 40px)); }

/* Phones as windows: transparent screen onto the page sky, with the
   app's own graphic elements inside. */
.chapter.no-phone .chapter-grid { grid-template-columns: 1fr; }
.chapter.no-phone .chapter-text { max-width: 640px; }
.chapter.no-phone.flip .chapter-text { margin-left: auto; order: 0; }
/* Placements: gentle tilt and a little scroll parallax, nothing more. */
.chapter-phone .iphone { transform: translateY(calc((0.5 - var(--p, 1)) * 40px)); will-change: transform; }

/* Night: the ISS. Steady, no tail, brighter than the stars. */
.iss { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }
.iss-label { position: absolute; left: 30px; top: -26px; font: 500 10px var(--mono); letter-spacing: 0.08em; color: #9fb3c0; opacity: 0.8; }

/* Page-level overlays of the app's features, on the real ridge/sun. */
.overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.overlay line, .overlay path { fill: none; }
.ov-drop, .ov-align, .ov-arc, .ov-marc { opacity: 0; }
.ov-drop { stroke: #e0a45c; stroke-width: 1.4; stroke-dasharray: 4 4; }
.ov-align { stroke: #f2cd7c; stroke-width: 1.4; stroke-dasharray: 7 6; filter: drop-shadow(0 0 4px rgba(242, 205, 124, 0.6)); }
.ov-arc { stroke: #e0a45c; stroke-opacity: 0.8; stroke-width: 1.6; stroke-dasharray: 6 6; stroke-linecap: round; }
.peaks { position: absolute; inset: 0; }
.peak { position: absolute; left: 0; top: 0; opacity: 0; will-change: opacity, transform; }
.peak::before { content: ''; position: absolute; left: 0; bottom: 0; width: 1px; height: 26px; background: rgba(255, 255, 255, 0.6); }
.peak span { position: absolute; left: 0; white-space: nowrap; transform: translateX(-50%); text-shadow: 0 0 3px rgba(0, 0, 0, 0.8); }
.pk-name { bottom: 42px; font: 500 11px var(--font); color: rgba(255, 255, 255, 0.95); }
.pk-meta { bottom: 29px; font: 400 8.5px var(--mono); color: rgba(255, 255, 255, 0.62); }
@media (max-width: 760px) { .peak:nth-child(1), .peak:nth-child(4) { display: none; } }

/* Phone polish: thin bezel, glass sheen, the screen's light on the sky. */


.trails { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.ov-hours { opacity: 0; }
.ov-hours circle { fill: #e0a45c; }
.ov-hours text { fill: rgba(255, 255, 255, 0.85); font: 600 10px var(--mono); text-anchor: middle; }

/* Mushroom labels: leader grows from the summit, label pops on top. */
.peak::before { height: calc(26px * var(--line, 1)) !important; }
.peak span { transform: translateX(-50%) scale(var(--lab, 1)); transform-origin: 50% 100%; opacity: var(--labo, 1); }
.subject-pin { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.subject-pin::before { content: ''; position: absolute; left: 0; bottom: 0; width: 1.5px; height: calc(34px * var(--line, 1)); background: #f2cd7c; }
.subject-pin::after { content: ''; position: absolute; left: -5px; bottom: calc(34px * var(--line, 1)); width: 10px; height: 10px; border-radius: 50%; background: #f2cd7c; transform: scale(var(--lab, 1)); box-shadow: 0 0 10px rgba(242, 205, 124, 0.8); }
.subject-pin .pk-name { position: absolute; left: 0; bottom: 50px; white-space: nowrap; transform: translateX(-50%) scale(var(--lab, 1)); transform-origin: 50% 100%; opacity: var(--labo, 1); font: 600 12px var(--font); color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, 0.8); }
.sky-score { position: absolute; left: 0; top: 0; opacity: 0; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 100%; margin-left: -60px; width: 120px; will-change: transform, opacity; }
.sky-score small { font-size: 11px; color: rgba(255, 255, 255, 0.8); }
.sky-score b { font: 700 54px var(--font); letter-spacing: -0.04em; color: #fff; line-height: 1; text-shadow: 0 4px 30px rgba(240, 110, 90, 0.6); }
.sky-score span { font: 700 14px var(--font); color: #ffd9b0; }

/* Keep the section's background subject in view: on wide screens the
   text + phone pair moves to the other side of it. */
@media (min-width: 900px) {
  .chapter.key-right .chapter-grid { max-width: 820px; margin-left: max(24px, calc((100vw - 1100px) / 2)); margin-right: auto; grid-template-columns: 1fr auto; gap: 48px; }
  .chapter.key-left .chapter-grid { max-width: 820px; margin-right: max(24px, calc((100vw - 1100px) / 2)); margin-left: auto; grid-template-columns: 1fr auto; gap: 48px; }
  .chapter.key-right.flip .chapter-grid, .chapter.key-left.flip .chapter-grid { grid-template-columns: auto 1fr; }
}
.moon { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; will-change: transform, opacity; }
.moon > span { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); }
.moon-glow { width: 420px; height: 420px; background: radial-gradient(circle, rgba(206, 220, 255, 0.17) 0, rgba(200, 216, 255, 0.08) 18%, rgba(200, 216, 255, 0.03) 38%, rgba(200, 216, 255, 0) 65%); }
.moon-disc { width: 34px; height: 34px; }
.moon-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.moon-svg .m1 { stop-color: var(--m1, #fbf8ee); } .moon-svg .m2 { stop-color: var(--m2, #ece9df); } .moon-svg .m3 { stop-color: var(--m3, #c9c6bd); }
.moon-svg .maria { fill: #7c8190; fill-opacity: 0.34; }
.moon-svg .m-dark { fill: rgba(26, 28, 46, 0.88); }
.moon-top { z-index: 0; }
.ov-marc { stroke: #9fc3e8; stroke-opacity: 0.85; stroke-width: 1.6; stroke-dasharray: 6 6; stroke-linecap: round; fill: none; opacity: 0; }
.ov-mhours { opacity: 0; }
.ov-mhours circle { fill: #9fc3e8; }
.ov-mhours text { fill: rgba(255, 255, 255, 0.85); font: 600 10px var(--mono); text-anchor: middle; }

/* Where the section's subject sits low on the right (peaks, the setting
   sun), the text rides higher so the two don't meet. */
@media (min-width: 900px) { .chapter.text-high .chapter-text { align-self: start; margin-top: 2vh; } .chapter.text-high .chapter-grid { align-items: start; } .chapter.text-high .pin { justify-content: flex-start; padding-top: 16vh; } }
/* AR: the camera view — transparent screen with the app's AR chrome. */
.ar-cam { padding: 0; background: transparent; border: 9px solid #16121c; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.3), 0 30px 70px rgba(4, 3, 10, 0.35); }
.ar-cam .iphone-screen { background: transparent; border-radius: 45px; color: #fff; font-family: var(--font); }
.ui-top.ar { position: absolute; left: 0; right: 0; top: 0; padding: 44px 10px 16px; display: flex; justify-content: center; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)); }
.ui-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12px; font-weight: 600; }
.ui-tabs span { padding: 4px 10px; border-radius: 999px; color: rgba(255, 255, 255, 0.7); }
.ui-tabs span.on { background: rgba(159, 195, 232, 0.9); color: #1c1526; }
.ui-today { position: absolute; left: 0; top: 0; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.35); color: #c6a8cf; font-size: 10.5px; font-weight: 700; letter-spacing: 0.3px; opacity: 0; will-change: transform; }
.ui-now-btn { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 13px; font-weight: 700; color: #fff; }

.ov-arc-m, .ov-marc-m { fill: none; stroke: #fff; stroke-width: 16; stroke-dasharray: 0 1; opacity: 1 !important; }
.ov-gpath path { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0 1; }
.ov-gpath path { opacity: 0; }
.ov-gpath path.under { stroke-linecap: butt; }
.ov-gpath .gdot { fill: #fff; opacity: 0; }
.ov-gpath .n { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1.4; }
.ov-gpath .b { stroke: #4a6da0; filter: drop-shadow(0 0 5px rgba(74, 109, 160, 0.9)); }
.ov-gpath .g { stroke: #e09a4e; filter: drop-shadow(0 0 6px rgba(224, 154, 78, 0.9)); }
.gb-times span { position: absolute; left: 0; top: 0; opacity: 0; font: 600 11px var(--mono); color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, 0.8); will-change: transform, opacity; }
.eclipse-dim { position: absolute; inset: 0; background: linear-gradient(180deg, #070b22, #121a44 60%, #1c2250); opacity: 0; pointer-events: none; }
.moon-shadow { width: 46px; height: 46px; background: #050408; opacity: 0; }
.diamond { width: 14px; height: 14px; opacity: 0; background: radial-gradient(circle, #fff 0 30%, rgba(255, 255, 255, 0.6) 45%, rgba(255, 255, 255, 0) 70%); box-shadow: 0 0 18px 6px rgba(255, 255, 255, 0.7); }
.corona { width: 150px; height: 150px; opacity: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0) 15.2%, rgba(250, 250, 255, 0.98) 15.6%, rgba(236, 240, 255, 0.55) 21%, rgba(220, 228, 255, 0.18) 34%, rgba(220, 228, 255, 0) 55%); }
.corona-rays { width: 230px; height: 230px; opacity: 0; background: repeating-conic-gradient(from 7deg, rgba(240, 244, 255, 0.35) 0 1.2deg, rgba(240, 244, 255, 0) 1.2deg 7deg); -webkit-mask-image: radial-gradient(circle, transparent 0 10%, #000 11%, rgba(0, 0, 0, 0.4) 25%, transparent 50%); mask-image: radial-gradient(circle, transparent 0 10%, #000 11%, rgba(0, 0, 0, 0.4) 25%, transparent 50%); }
.prom { position: absolute; width: 4px; height: 3px; border-radius: 50%; background: #ff7a9a; box-shadow: 0 0 4px #ff7a9a; }
.prom.p1 { left: 36px; top: 6px; } .prom.p2 { left: 4px; top: 30px; width: 3px; }
.eclipse-horizon { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(0deg, rgba(240, 150, 90, 0.55) 0%, rgba(200, 110, 110, 0.25) 22%, rgba(0, 0, 0, 0) 45%); }
.planets { position: absolute; left: 0; top: 0; opacity: 0; }
.planets i { position: absolute; border-radius: 50%; background: #fffbe8; }
.venus { width: 5px; height: 5px; left: -170px; top: 60px; box-shadow: 0 0 8px 2px rgba(255, 250, 225, 0.9); }
.jupiter { width: 4px; height: 4px; left: 140px; top: -90px; box-shadow: 0 0 6px 1px rgba(255, 245, 225, 0.8); }
/* Collisions and section edges fade, never cut. */
/* First load: the hero fades in. */
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-inner, .hero-foot { animation: rise-in 0.9s ease-out backwards; }
.stage { animation: fade-in 0.9s ease-out backwards; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-inner, .hero-foot, .stage { animation: none; } }

.iss-rot { position: absolute; left: 0; top: 0; width: 76px; margin: -13px 0 0 -38px; transform-origin: 38px 13px; }
.iss-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 6px rgba(255, 244, 220, 0.55)); }
.iss-glint { animation: glint 3.2s ease-in-out infinite; }
@keyframes glint { from { transform: translateX(0); } to { transform: translateX(120px); } }
@media (max-width: 760px) { .iss-rot { width: 46px; margin: -8px 0 0 -23px; transform-origin: 23px 8px; } }

/* Classici: content sits right, clear of the moon rising on the left. */
@media (min-width: 900px) { .classics-inner { max-width: 760px; margin-left: auto; margin-right: max(24px, calc((100vw - 1100px) / 2)); grid-template-columns: 1fr 1fr; gap: 48px; } }

.ov-terrain { opacity: 0; }
.t-trace { fill: none; stroke: #f2cd7c; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 0 1; filter: drop-shadow(0 0 5px rgba(242, 205, 124, 0.85)); }

/* Entrances (site.js adds .rv only when JS runs). */
.js .rv { opacity: 0; transform: translate3d(var(--rvx, 0px), 0, 0); transition: opacity 0.75s cubic-bezier(.2, .7, .2, 1), transform 0.75s cubic-bezier(.2, .7, .2, 1); will-change: opacity, transform; }
.js .rv.rv-in { opacity: 1; transform: none; }
.js .rv.rv-done { will-change: auto; transition: none; }
@media (prefers-reduced-motion: reduce) { .js .rv { transform: none; transition: opacity 0.3s ease; } }

#story { margin-top: 22vh; }
.hero-foot { will-change: opacity; }

.t-contours path { fill: none; stroke: #e6b6f1; stroke-width: 0.8; stroke-dasharray: 0 1; stroke-linecap: round; }
.t-contours path.ix { stroke: #f2cd7c; stroke-width: 1.4; }
.ov-tide { fill: none; stroke: #9fc3e8; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0 1; filter: drop-shadow(0 0 5px rgba(159, 195, 232, 0.8)); opacity: 0; }
.ov-tide-now { stroke: #fff; stroke-width: 1.2; stroke-dasharray: 2 4; opacity: 0; }
.tide-labels span { position: absolute; left: 0; top: 0; opacity: 0; font: 600 11px var(--mono); color: #fff; white-space: nowrap; text-shadow: 0 0 4px rgba(0, 0, 0, 0.8); will-change: transform, opacity; }
/* View from the spot: text on the left, the phone at the far right of the
   page, so the labelled summits in between stay clear. */
@media (min-width: 900px) {
  .chapter.phone-far .chapter-grid { max-width: none; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: max(var(--gutter), 3vw); grid-template-columns: minmax(0, 560px) 1fr; }
  .chapter.phone-far .chapter-phone { justify-content: flex-end; }
}

/* Scout carries the eclipse: a taller section so the phases breathe. */
@media (min-width: 900px) { .chapter[data-anim="scout"] .pin-space { height: 140vh; } }

/* Tides: the lagoon in front of the ridges. The water mirrors the sky,
   the sun lays a glitter path on it, and the waterline follows the real
   tide level at the page clock, baring wet sand at low water. */
.sea { position: absolute; inset: 0; opacity: 0; pointer-events: none; will-change: opacity; }
.sea > div { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.sea-water { height: 100vh; }
.sea-ripple { background: none 0 0 / 100% 100% no-repeat; }
/* The shoreline: a low haze where the ridges meet the water, no line. */
.sea-water::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 20px; background: linear-gradient(180deg, transparent, var(--haze, transparent) 70%, transparent); opacity: 0.45; }
.sea > canvas.sea-glints { position: absolute; left: 0; top: 0; will-change: transform; }
.sea > svg.sea-rocks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sea-wet { height: 30vh; box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.55); }
.sea-sand { height: 30vh; }

/* Terrain: stylised contour lines on the ridge layers. */
.t-lines path { fill: none; stroke: #b8c4cc; stroke-width: 0.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.t-lines path.ix { stroke: #f2cd7c; stroke-width: 0.75; }

/* Sun bloom: above the legibility scrim, so a low sun reads warm and
   bright; screen-blended, following the disc. */
.sun-bloom { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; opacity: 0; pointer-events: none; mix-blend-mode: screen; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(255, 236, 190, 0.95) 0, rgba(255, 214, 140, 0.75) 3.4%, rgba(255, 196, 110, 0.32) 9%, rgba(255, 170, 90, 0.12) 24%, rgba(255, 160, 80, 0) 56%); }
.sun-core { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(circle, var(--core-c, #ffe7a8) 0 55%, var(--core-e, #ffc062) 85%, rgba(255, 180, 80, 0) 100%);
  -webkit-mask-image: var(--hole, none); mask-image: var(--hole, none); }

/* Eclipse, above the scrim: the crescent is the sun core (masked by the
   moon), then at totality the corona streamers, the black moon, the pink
   prominences and the diamond ring. */
.ec-top { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
.ec-svg { position: absolute; left: -200px; top: -200px; width: 400px; height: 400px; overflow: visible; }
.ec-svg > * { opacity: 0; }
.ec-diamond, .ec-bead { mix-blend-mode: screen; }

/* Classics: four upcoming ones under the section, typographic, a hairline. */
.classics-list { list-style: none; margin: 8vh auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
@media (min-width: 900px) { .classics-list { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.classics-list li { display: flex; flex-direction: column; gap: 5px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.2); min-width: 0; }
.cl-name { font-size: 17px; font-weight: 600; line-height: 1.25; color: #fff; }
.cl-place { font-size: 13.5px; color: rgba(255, 255, 255, 0.7); }
.cl-when { margin-top: 4px; font-family: var(--mono); font-size: 12.5px; color: rgba(255, 255, 255, 0.66); }
.cl-in { font-size: 14px; font-weight: 600; color: var(--glow); }


/* Section eyebrow: the tool's app icon. */
.sec-icon { display: block; width: 44px; height: 44px; margin: 0 0 18px; }

/* Small phones: the header's CTA and language switch must both fit. */
@media (max-width: 420px) {
  .topbar-inner { gap: 8px; }
  .nav-cta { padding: 7px 11px !important; font-size: 13.5px !important; white-space: nowrap; }
  .lang summary { padding: 6px 7px; }
}
/* Entrance slides start off to the side: never let them widen the page. */
html, body { overflow-x: clip; }

/* Timelapse clouds: canvas over the upper sky, behind the ridges. */
.clouds { position: absolute; left: 0; top: 0; width: 100%; height: 62vh; opacity: 0; pointer-events: none; }

/* Crisp rock against the sky: no feathered glow or rim on the crests. */
.rl-glow, .rl-rim { display: none; }

/* Dawn: a delicate warm lift on the far crests, on the sunrise side. */
.rl-lift { opacity: 0; background: radial-gradient(ellipse 22% 30% at var(--lx, 30%) 18%, rgba(236, 150, 120, 0.55), rgba(236, 150, 120, 0) 100%);
  -webkit-mask-image: url('/assets/img/sky/mask-depth.webp'); mask-image: url('/assets/img/sky/mask-depth.webp'); }
.dawn-glow { position: absolute; left: 0; top: 0; width: 1100px; height: 520px; margin: -300px 0 0 -550px; opacity: 0; pointer-events: none; will-change: transform, opacity;
  background: radial-gradient(ellipse 50% 50% at 50% 58%, rgba(242, 185, 138, 0.85) 0, rgba(217, 143, 122, 0.55) 26%, rgba(130, 90, 130, 0.18) 60%, rgba(60, 47, 94, 0) 100%); }
/* The eclipse label floats above the corona: no leader tick or dot. */
.eclipse-label::before, .eclipse-label::after { display: none; }
.eclipse-label .pk-name { bottom: 70px; }

/* Scroll pinning: each section's content sticks while its background
   animation plays over the extra scroll below it (native scroll only).
   --stick is set by site.js: centred if the content fits the screen,
   bottom-aligned if it is taller. */
.chapter .pin { position: sticky; top: var(--stick, 0px); padding: 12vh 0; }
.chapter .pin-space { height: 55vh; }
@media (min-width: 900px) { .chapter .pin-space { height: 90vh; } }
.chapter .pin .chapter-phone .iphone { transform: none; }
