/* ==========================================================================
   ALFRED DESIGN SYSTEM - SKY WINDOW (WEB)
   docs/site/site.css
   Inherited from docs/redesign/02-design-system.md
   ========================================================================== */

/* === tokens: registered properties for smooth color relighting === */
@property --ground { syntax: '<color>'; inherits: true; initial-value: #F3F7FD; }
@property --sky-top { syntax: '<color>'; inherits: true; initial-value: #DCE9FF; }
@property --sky-mid { syntax: '<color>'; inherits: true; initial-value: #F2F7FF; }
@property --ink { syntax: '<color>'; inherits: true; initial-value: #0E1430; }
@property --ink-2 { syntax: '<color>'; inherits: true; initial-value: rgba(14,20,48,.65); }
@property --ink-3 { syntax: '<color>'; inherits: true; initial-value: rgba(14,20,48,.12); }
@property --surface { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,.80); }
@property --accent { syntax: '<color>'; inherits: true; initial-value: #E0702A; }
@property --primary { syntax: '<color>'; inherits: true; initial-value: #0E1430; }
@property --on-primary { syntax: '<color>'; inherits: true; initial-value: #FFFFFF; }
@property --track { syntax: '<color>'; inherits: true; initial-value: rgba(14,20,48,.20); }
@property --bar { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,.90); }

/* === tokens: fixed and responsive scales === */
:root {
  /* fixed domain & status */
  --food: #F2603C;
  --cook: #E8A317;
  --dineout: #7B5CE0;
  --grocery: #2E9E5B;
  --scenes: #E2558F;
  --ok: #2E9E5B;
  --warn: #D98A00;
  --danger: #D93A2B;
  --on-photo: #FFFFFF;
  --on-photo-2: rgba(255,255,255,.85);

  /* space (4-pt grid) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;
  --s20: 80px;
  --s24: 96px;
  --s32: 128px;

  /* radius */
  --r-chip: 14px;
  --r-thumb: 16px;
  --r-card: 20px;
  --r-control: 26px;
  --r-sheet: 28px;
  --r-window: 36px;

  /* motion & easing */
  --t-press-in: 100ms;
  --t-press-out: 160ms;
  --t-quick: 150ms;
  --t-standard: 280ms;
  --t-emph: 450ms;
  --t-relight: 2s;
  --ease-out: cubic-bezier(.33,1,.68,1);     /* easeOutCubic */
  --ease-emph: cubic-bezier(.2,0,0,1);       /* emphasized */
  --ease-expo: cubic-bezier(.16,1,.3,1);     /* easeOutExpo */

  /* elevations & layouts */
  --shadow: 0 8px 24px rgba(0,0,0,.10);
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1240px;
}

/* === tokens: time of day phases === */
[data-phase="dawn"] {
  --ground: #FFF1E2;
  --sky-top: #FFE3C2;
  --sky-mid: #FFF6EC;
  --ink: #0E1430;
  --ink-2: rgba(14,20,48,.65);
  --ink-3: rgba(14,20,48,.12);
  --surface: rgba(255,255,255,.70);
  --accent: #F2603C;
  --on-accent: #FFFFFF;
  --primary: #0E1430;
  --on-primary: #FFFFFF;
  --track: rgba(61,44,110,.25);
  --bar: rgba(255,255,255,.88);
  color-scheme: light;
}

[data-phase="day"] {
  --ground: #F3F7FD;
  --sky-top: #DCE9FF;
  --sky-mid: #F2F7FF;
  --ink: #0E1430;
  --ink-2: rgba(14,20,48,.65);
  --ink-3: rgba(14,20,48,.12);
  --surface: rgba(255,255,255,.80);
  --accent: #E0702A;
  --on-accent: #FFFFFF;
  --primary: #0E1430;
  --on-primary: #FFFFFF;
  --track: rgba(14,20,48,.20);
  --bar: rgba(255,255,255,.90);
  color-scheme: light;
}

[data-phase="dusk"] {
  --ground: #1B1533;
  --sky-top: #4A2F6B;
  --sky-mid: #261C45;
  --ink: #FFF4E8;
  --ink-2: rgba(255,244,232,.70);
  --ink-3: rgba(255,244,232,.15);
  --surface: rgba(255,255,255,.07);
  --accent: #FFB347;
  --on-accent: #1B1533;
  --primary: #FFB347;
  --on-primary: #1B1533;
  --track: rgba(255,255,255,.20);
  --bar: rgba(42,31,74,.90);
  color-scheme: dark;
}

[data-phase="night"] {
  --ground: #0B1026;
  --sky-top: #1C2548;
  --sky-mid: #111836;
  --ink: #E8ECFF;
  --ink-2: rgba(232,236,255,.70);
  --ink-3: rgba(232,236,255,.15);
  --surface: rgba(255,255,255,.06);
  --accent: #A9B8FF;
  --on-accent: #0B1026;
  --primary: #E8ECFF;
  --on-primary: #0B1026;
  --track: rgba(255,255,255,.18);
  --bar: rgba(22,29,59,.90);
  color-scheme: dark;
}

[data-phase="daydim"] {
  --ground: #141925;
  --sky-top: #26324D;
  --sky-mid: #1A2133;
  --ink: #EEF2FA;
  --ink-2: rgba(238,242,250,.70);
  --ink-3: rgba(238,242,250,.15);
  --surface: rgba(255,255,255,.06);
  --accent: #F2A81D;
  --on-accent: #141925;
  --primary: #EEF2FA;
  --on-primary: #141925;
  --track: rgba(255,255,255,.18);
  --bar: rgba(31,38,54,.90);
  color-scheme: dark;
}

/* === fonts === */
@font-face {
  font-family: 'Familjen Grotesk';
  src: url('fonts/FamiljenGrotesk-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* === base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Familjen Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--ground);
  transition: background-color var(--t-relight) var(--ease-out),
              color var(--t-relight) var(--ease-out);
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--ground);
  color: var(--ink);
  transition: background var(--t-relight) var(--ease-out),
              color var(--t-relight) var(--ease-out);
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* Accessible focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Tabular numerals for time, price and budget */
.tabular-nums, [data-tabular] {
  font-variant-numeric: tabular-nums;
}

/* === utilities === */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  top: var(--s4);
  left: var(--s4);
  z-index: 9999;
  padding: var(--s3) var(--s6);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-chip);
  font-weight: 700;
  transform: translateY(-150%);
  transition: transform var(--t-quick) var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
}

/* === typography (web scale) === */
.display {
  font-size: clamp(48px, 7.2vw, 112px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.h2 {
  font-size: clamp(32px, 3.6vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.h3 {
  font-size: clamp(20px, 1.6vw, 24px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0;
}

.body {
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  max-width: 62ch;
}

.meta {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0;
}

.meta-bold {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: 0;
}

.kicker {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.label {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

/* === shared components === */

/* .btn-primary with sunrise fill animation */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 56px;
  padding: 0 var(--s8);
  border-radius: var(--r-control);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-press-in) var(--ease-out),
              background-color var(--t-standard) var(--ease-out);
  cursor: pointer;
  user-select: none;
  text-align: center;
  z-index: 1;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-primary .btn-label {
  position: relative;
  z-index: 2;
  transition: opacity var(--t-standard) var(--ease-out);
}

.btn-primary .sunrise-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  z-index: 1;
  pointer-events: none;
}

.btn-primary.sunrise-active .sunrise-layer {
  transform: translateX(0);
  transition: transform 420ms var(--ease-expo);
}

.btn-primary.compact {
  height: 44px;
  padding: 0 var(--s6);
  font-size: 15px;
}

/* .btn-tonal */
.btn-tonal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 56px;
  padding: 0 var(--s8);
  border-radius: var(--r-control);
  background: var(--ink-3);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  transition: transform var(--t-press-in) var(--ease-out),
              background var(--t-quick) var(--ease-out);
}

.btn-tonal:hover {
  transform: translateY(-1px);
  background: rgba(14,20,48,.18);
}

.btn-tonal:active {
  transform: scale(0.97);
}

/* .live-chip */
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  background: var(--accent);
  color: #FFFFFF;
  border-radius: var(--r-chip);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFFFFF;
}

/* .tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: 32px;
  padding: 0 var(--s4);
  border-radius: 16px;
  background: var(--ink-3);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.tag .domain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tag[data-domain="food"] .domain-dot { background: var(--food); }
.tag[data-domain="cook"] .domain-dot { background: var(--cook); }
.tag[data-domain="dineout"] .domain-dot { background: var(--dineout); }
.tag[data-domain="grocery"] .domain-dot { background: var(--grocery); }
.tag[data-domain="scenes"] .domain-dot { background: var(--scenes); }

/* .rail-btn (frosted decorative disc on photos) */
.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
  color: var(--on-photo);
  text-align: center;
}

.rail-btn-disc {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-photo);
  transition: background var(--t-quick);
}

.rail-btn-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-photo-2);
}

/* .moment-row */
.moment-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3) 0;
  border-top: 1px solid var(--ink-3);
}

.moment-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-thumb);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--ink-3);
}

.moment-info {
  flex: 1;
  min-width: 0;
}

.moment-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.moment-subtitle {
  font-size: 13px;
  color: var(--ink-2);
}

/* .window (moment hero photo window) */
.window {
  position: relative;
  width: 100%;
  border-radius: var(--r-window);
  overflow: hidden;
  background: var(--ground);
  aspect-ratio: 3/2;
}

@media (max-width: 760px) {
  .window {
    border-radius: 0;
    aspect-ratio: 4/5;
  }
}

.window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scrims */
.window .scrim-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 170px;
  background: linear-gradient(180deg, rgba(0,0,0,0.63) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 1;
}

.window .scrim-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: 1;
}

.window-content {
  position: absolute;
  bottom: var(--s8);
  left: var(--s8);
  right: var(--s8);
  z-index: 2;
  color: var(--on-photo);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

@media (max-width: 760px) {
  .window-content {
    bottom: var(--s5);
    left: var(--s5);
    right: var(--s5);
  }
}

/* Fallback when image fails */
.window.fallback {
  background: linear-gradient(135deg, var(--sky-top) 0%, var(--sky-mid) 60%, var(--ground) 100%);
}
.window.fallback .fallback-watermark {
  position: absolute;
  right: -5%;
  bottom: 10%;
  font-size: 30vw;
  font-weight: 700;
  color: rgba(255,255,255,0.08);
  user-select: none;
  pointer-events: none;
  text-transform: uppercase;
}

/* .sheet (Sky sheet) */
.sheet {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 40%, var(--ground) 100%);
  border-top-left-radius: var(--r-sheet);
  border-top-right-radius: var(--r-sheet);
  box-shadow: 0 -8px 24px rgba(0,0,0,.15);
  transition: background var(--t-relight) var(--ease-out),
              box-shadow var(--t-relight) var(--ease-out);
}

/* .card */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  transition: background var(--t-standard) var(--ease-out),
              box-shadow var(--t-standard) var(--ease-out);
}
[data-phase="dusk"] .card,
[data-phase="night"] .card,
[data-phase="daydim"] .card {
  box-shadow: none;
  border: 1px solid var(--ink-3);
}

/* .day-chip (weekday selector) */
.day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-width: 56px;
  min-height: 72px;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-chip);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t-quick) var(--ease-out),
              color var(--t-quick) var(--ease-out),
              transform var(--t-quick) var(--ease-out);
}

.day-chip:hover {
  background: var(--ink-3);
}

.day-chip[aria-selected="true"] {
  background: var(--primary);
  color: var(--on-primary);
}

.day-chip .chip-day {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-chip .chip-dots {
  display: flex;
  align-items: center;
  gap: 3px;
}

.day-chip .meal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.meal-dot.food { background: var(--food); }
.meal-dot.cook { background: var(--cook); }
.meal-dot.dineout { background: var(--dineout); }
.meal-dot.grocery { background: var(--grocery); }
.meal-dot.empty {
  background: transparent;
  border: 1px solid currentColor;
  opacity: 0.4;
}

/* .powered-by lockup: text only, no logo mark */
.powered-by {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0;
}
.powered-by.on-photo {
  color: var(--on-photo-2);
}

/* .alfred-mark lockup */
.alfred-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--ink);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
}

.alfred-lockup .mark-icon {
  width: 44px;
  height: 22px;
  color: var(--accent);
}

/* Chat bubbles */
.bubble-alfred {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  color: var(--ink);
  align-self: flex-start;
  max-width: 85%;
}

.bubble-alfred-header {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.bubble-alfred-header .alfred-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.bubble-you {
  align-self: flex-end;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 20px;
  padding: var(--s3) var(--s5);
  font-size: 16px;
  max-width: 80%;
}

/* Budget bar */
.budget-bar-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.budget-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--ink-3);
  overflow: hidden;
}

.budget-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 600ms var(--ease-emph);
}

/* === nav & header === */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  background: transparent;
  transition: background var(--t-standard) var(--ease-out),
              backdrop-filter var(--t-standard) var(--ease-out),
              box-shadow var(--t-standard) var(--ease-out);
}

.site-nav.scrolled {
  background: var(--bar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--ink-3);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s8);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-mobile-btn {
  display: none;
  padding: var(--s2);
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Mobile Menu Sheet */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 48, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-standard) var(--ease-out);
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-sheet {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--ground);
  color: var(--ink);
  z-index: 1001;
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  transform: translateX(100%);
  transition: transform var(--t-standard) var(--ease-out);
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
}
.mobile-menu-overlay.open .mobile-menu-sheet {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  font-size: 20px;
  font-weight: 700;
}

/* === footer === */
.site-footer {
  padding: var(--s16) 0 var(--s8);
  border-top: 1px solid var(--ink-3);
  color: var(--ink-2);
  background: var(--ground);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s8);
  flex-wrap: wrap;
  margin-bottom: var(--s12);
}

.footer-links {
  display: flex;
  gap: var(--s8);
  font-size: 15px;
  font-weight: 500;
}
.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-top: 1px solid var(--ink-3);
  padding-top: var(--s6);
}

/* === motion & reveals === */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}

html.js .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html, body, *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn-primary.sunrise-active .sunrise-layer {
    transition: none !important;
    transform: translateX(0) !important;
  }
}

/* === section: hero ("A week, prepared") === */
.hero-section {
  padding-top: var(--s8);
  padding-bottom: var(--s16);
  position: relative;
}

.hero-header {
  max-width: 900px;
  margin-bottom: var(--s10);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.hero-actions {
  display: flex;
  gap: var(--s4);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--s2);
}

.week-strip-wrap {
  margin-bottom: var(--s8);
  position: relative;
}

.week-strip {
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  padding-bottom: var(--s2);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.week-strip::-webkit-scrollbar {
  display: none;
}
.week-strip .day-chip {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.moment-stage {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--s6);
  align-items: stretch;
  position: relative;
}

@media (max-width: 960px) {
  .moment-stage {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.stage-window-col {
  position: relative;
  display: flex;
  flex-direction: column;
}

.stage-rail {
  position: absolute;
  top: var(--s6);
  right: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  z-index: 3;
}

.stage-sheet-col {
  position: relative;
  border-radius: var(--r-sheet);
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s6);
  color: var(--ink);
  transition: background var(--t-relight) var(--ease-out),
              color var(--t-relight) var(--ease-out);
}

@media (max-width: 960px) {
  .stage-sheet-col {
    margin-top: -24px;
    z-index: 5;
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    padding: var(--s6) var(--s5);
  }
}

.stage-why-box {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--s5);
  box-shadow: var(--shadow);
}

.illustrative-note {
  margin-top: var(--s4);
  color: var(--ink-2);
}

/* No-JS Stack fallback */
.no-js-week-list {
  display: none;
  flex-direction: column;
  gap: var(--s8);
}
html:not(.js) .no-js-week-list {
  display: flex;
}
html:not(.js) .moment-stage {
  display: none;
}
html:not(.js) .week-strip-wrap {
  display: none;
}

/* === section: belief === */
.belief-section {
  padding: var(--s16) 0;
  text-align: center;
  background: var(--ground);
}
.belief-text {
  max-width: 22ch;
  margin-inline: auto;
  color: var(--ink);
}

/* === section: kitchen === */
.kitchen-section {
  padding: var(--s16) 0;
}
.kitchen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: start;
  margin-top: var(--s8);
}
@media (max-width: 960px) {
  .kitchen-grid {
    grid-template-columns: 1fr;
  }
}
.kitchen-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}
.ingredient-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.ingredient-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--ink-3);
  font-size: 15px;
}
.cook-step-box {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* === section: ask === */
.ask-section {
  padding: var(--s16) 0;
}
.ask-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s8);
  align-items: start;
  margin-top: var(--s8);
}
@media (max-width: 960px) {
  .ask-grid {
    grid-template-columns: 1fr;
  }
}
.chat-panel {
  padding: var(--s8);
  border-radius: var(--r-sheet);
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}
@media (max-width: 600px) {
  .chat-panel {
    padding: var(--s5);
  }
}
.thinking-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: var(--s2) 0;
}
.thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.2s infinite ease-in-out;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* === section: android & trust === */
.android-section {
  padding: var(--s16) 0;
}
.phone-mock-wrap {
  display: flex;
  gap: var(--s8);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s8);
}
.css-phone-frame {
  width: 320px;
  height: 620px;
  border-radius: 44px;
  border: 12px solid #1E2336;
  background: linear-gradient(180deg, #FFE3C2 0%, #FFF1E2 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  padding: var(--s6) var(--s4);
}
.phone-notch {
  width: 100px;
  height: 20px;
  background: #1E2336;
  border-radius: 10px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.notification-card {
  margin-top: 140px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-card);
  padding: var(--s4);
  color: #0E1430;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.notif-actions {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s2);
}
.notif-action-btn {
  padding: var(--s1) var(--s3);
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  background: var(--ink-3);
  color: #0E1430;
}
.notif-action-btn.primary {
  background: #0E1430;
  color: #FFFFFF;
}

.overlay-bubble-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}
.overlay-bubble {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: #0E1430;
  color: #FFFFFF;
  border-radius: 30px;
  padding: var(--s3) var(--s5);
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  font-weight: 700;
  font-size: 16px;
}
.overlay-bubble .orb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* === section: trust === */
.trust-section {
  padding: var(--s16) 0;
  border-top: 1px solid var(--ink-3);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  margin-top: var(--s8);
}
@media (max-width: 760px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}
.trust-item {
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
  padding: var(--s4) 0;
  border-top: 1px solid var(--ink-3);
}
.trust-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
}

/* === section: film === */
.film-section {
  padding: var(--s16) 0;
  text-align: center;
}
.film-phone-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: var(--s8) auto 0;
  perspective: 1200px;
}
.film-phone-mockup {
  position: relative;
  width: 100%;
  max-width: min(330px, calc(100vw - 32px));
  background: #141824;
  border-radius: 48px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 0 2px #0a0e1a,
    0 28px 65px -14px rgba(0, 0, 0, 0.45),
    0 14px 30px -6px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.film-phone-mockup .phone-btn {
  position: absolute;
  background: #252b3d;
  border-radius: 3px;
  z-index: 1;
}
.film-phone-mockup .phone-btn-vol-up {
  left: -4px;
  top: 100px;
  width: 4px;
  height: 38px;
}
.film-phone-mockup .phone-btn-vol-down {
  left: -4px;
  top: 148px;
  width: 4px;
  height: 38px;
}
.film-phone-mockup .phone-btn-power {
  right: -4px;
  top: 120px;
  width: 4px;
  height: 50px;
}
.film-phone-mockup .phone-island {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 20px;
  background: #000;
  border-radius: 10px;
  z-index: 9;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.film-phone-mockup .phone-camera-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111a2c;
  box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.25);
}
.video-window-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 38px;
  overflow: hidden;
  background: #0b1026;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) inset;
  isolation: isolate;
}
.video-window-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 38px;
}
.phone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  padding: 8px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  z-index: 8;
  letter-spacing: -0.01em;
  transition: opacity var(--t-quick) var(--ease-out);
}
.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.phone-status-icon {
  display: inline-block;
  vertical-align: middle;
}
.phone-battery-icon {
  width: 18px;
  height: 9px;
  border: 1.2px solid rgba(255, 255, 255, 0.85);
  border-radius: 2.5px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: center;
  margin-left: 2px;
}
.phone-battery-icon::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 2px;
  width: 1.5px;
  height: 3px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 0 1px 1px 0;
}
.phone-battery-level {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
}
.phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  pointer-events: none;
  z-index: 8;
  backdrop-filter: blur(4px);
  transition: opacity var(--t-quick) var(--ease-out);
}
.phone-screen-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 40%, transparent 60%);
  pointer-events: none;
  z-index: 7;
  border-radius: 38px;
  transition: opacity var(--t-quick) var(--ease-out);
}
.video-window-wrap.is-playing .phone-status-bar,
.video-window-wrap.is-playing .phone-home-indicator,
.video-window-wrap.is-playing .phone-screen-glare {
  opacity: 0;
}
.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(242, 96, 60, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform var(--t-quick) var(--ease-out), box-shadow var(--t-quick) var(--ease-out);
  z-index: 10;
  border: none;
}
.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 12px 30px rgba(242, 96, 60, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* === section: chapter one & builders === */
.chapter-section {
  padding: var(--s16) 0;
}
.builders-section {
  padding: var(--s16) 0;
  border-top: 1px solid var(--ink-3);
}
.builder-links {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-top: var(--s8);
}
.builder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--ink-3);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.builder-row:hover {
  color: var(--accent);
}

/* === section: close === */
.close-section {
  padding: var(--s24) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--ground) 100%);
  color: var(--ink);
}
.close-mark-wrap {
  width: 120px;
  margin: 0 auto var(--s6);
  color: var(--accent);
}

