/* Feastie landing page. Colours, radii and shadows come from tokens.css (the design system); the values here
   are the page's own: a larger display scale than the app, and the scroll-linked motion. main.js feeds the
   motion through custom properties (--page, --hero, --enter, --p, --g, --c); every one defaults to its
   resting value, so the page reads the same with JavaScript off or motion reduced. */

:root {
  --font-heading: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui,
    sans-serif;

  --page-max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 68px;
  --section-y: clamp(88px, 10vw, 140px);
  --sheet-radius: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --display-xl: clamp(40px, 4.9vw, 68px); /* 8 CJK characters per hero line must fit the copy column */
  --display-lg: clamp(32px, 4.2vw, 58px);
  --display-md: clamp(21px, 1.9vw, 27px);

  --on-dark: var(--camera-fg);
  --on-dark-2: rgba(245, 234, 216, .68);
  --on-dark-line: rgba(245, 234, 216, .14);
  --phone-ground: var(--camera-bg);
  --phone-shadow: 0 40px 80px -28px #2e2b2573, var(--shadow-lg);

  /* The design system's secondary (62% ink) and tertiary (55%) text measure 4.2:1 and 3.4:1 on the sand
     surface, under WCAG AA's 4.5:1 for body text. The page darkens both: 5.2:1 and 4.7:1 on sand, more on cream. */
  --text-secondary: #201e1db0;
  --text-tertiary: #201e1da8;
}

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

/* clip, not hidden: it keeps the page from scrolling sideways without making a scroll container that would
   break the pinned sections. On html too, or a phone widens its layout viewport around a moving element. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.14;
  letter-spacing: -.01em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
/* Chinese headlines and leads break at punctuation, not inside a word like 馬上. */
h1, h2, h3, .lead, .hero__lead, .how__step p, .gallery figcaption p {
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
section[id] { scroll-margin-top: var(--nav-h); }

.wrap { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.75; stroke-linecap: round; stroke-linejoin: round;
}
.icon--down { rotate: 90deg; }

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--color-text); color: var(--color-bg); font-weight: 700; text-decoration: none;
}
.skip:focus-visible { top: 12px; }

.kicker {
  margin-bottom: 18px;
  font-size: 13px; font-weight: 700; letter-spacing: var(--tracking-kicker);
  color: var(--text-kicker);
}
.kicker--dark { color: var(--color-accent-400); }
.lead { margin-top: 24px; font-size: clamp(17px, 1.4vw, 19px); color: var(--text-secondary); }
.meta { margin-top: 22px; font-size: 14px; color: var(--text-secondary); }
.meta--dark { color: var(--on-dark-2); }

/* ── Calls to action ─────────────────────────────────────────────────────── */

/* Apple's badge is the page's call to action. Apple's rules: used as supplied (never recoloured, angled or
   animated, so it sits outside every entrance and scroll effect), at least 40 px tall, with clear space of a
   quarter of its height around it. */
.store-badge { display: inline-flex; flex: none; border-radius: 10px; }
.store-badge img { width: auto; height: 56px; }

/* The nav's smaller text link to the store; the outline keeps it from competing with the badge. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-pill);
  font: 700 15px/1 var(--font-heading); text-decoration: none; white-space: nowrap;
  transition: background-color .12s ease, color .12s ease;
}
.btn--outline { background: transparent; color: var(--color-accent-700); box-shadow: inset 0 0 0 2px currentColor; }
.btn--outline:hover { background: var(--color-accent-100); color: var(--color-accent-800); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 700; text-decoration: none;
}
.text-link .icon { width: 18px; height: 18px; }

/* ── Small pieces from the app ───────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--high { background: var(--conf-high-bg); color: var(--conf-high-fg); }
.pill--high::before { background: var(--conf-high-dot); }
.pill--low { background: var(--conf-low-bg); color: var(--conf-low-fg); }
.pill--low::before { background: var(--conf-low-dot); }

.glyph {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  font: 700 20px/1 var(--font-heading); color: var(--color-text);
}
.glyph--grain { background: var(--tint-grain); }
.glyph--green { background: var(--tint-green); }
.glyph--plain { background: var(--tint-plain); }

.tag {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.tag--sage { background: var(--color-accent-2-200); color: var(--color-accent-2-800); }
.tag--plain { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.tag--cream { background: var(--color-accent-100); color: var(--color-accent-800); box-shadow: inset 0 0 0 1px var(--color-accent-200); }
.tag--amber { background: var(--conf-low-bg); color: var(--conf-low-fg); }

.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1.5px var(--color-accent-300);
  font-size: 13px; font-weight: 600; color: var(--color-accent-800); white-space: nowrap;
}
.chip--on { background: var(--color-accent); color: var(--color-bg); box-shadow: none; }

/* A phone: the dark body and the screen inside it, both scaled from --pw. The screen is 94.4% of --pw; each
   screenshot's `sizes` attribute in both pages mirrors its phone's --pw clamps, so change them together. */
.phone {
  --pw: 300px;
  position: relative; margin: 0; width: var(--pw);
  padding: calc(var(--pw) * .028);
  border-radius: calc(var(--pw) * .155);
  background: var(--phone-ground);
  box-shadow: var(--phone-shadow);
}
.phone img, .phone .how__screens { border-radius: calc(var(--pw) * .128); }
.phone img { width: 100%; }

/* ── Nav and progress ────────────────────────────────────────────────────── */

.progress {
  position: fixed; inset: 0 0 auto; z-index: 60; height: 3px;
  background: var(--color-accent); transform-origin: 0 50%; scale: var(--page, 0) 1;
}

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--color-divider);
}
.nav.is-scrolled.is-dark {
  background: color-mix(in srgb, var(--camera-bg) 82%, transparent);
  box-shadow: 0 1px 0 var(--on-dark-line);
}
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 19px/1 var(--font-heading); color: var(--color-text); text-decoration: none; white-space: nowrap;
  transition: color .3s ease;
}
.brand:hover { color: var(--color-text); }
.brand img { width: 36px; height: 36px; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  font-size: 15px; font-weight: 600; color: var(--text-secondary); text-decoration: none;
  transition: color .3s ease;
}
.nav__links a:hover, .nav__lang:hover { color: var(--color-text); }
.nav__lang {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  font-size: 14px; font-weight: 700; letter-spacing: var(--tracking-sub); color: var(--text-secondary);
  text-decoration: none; transition: color .3s ease;
}
.nav.is-dark .brand, .nav.is-dark .nav__links a:hover, .nav.is-dark .nav__lang:hover { color: var(--on-dark); }
.nav.is-dark .nav__links a, .nav.is-dark .nav__lang { color: var(--on-dark-2); }
.nav.is-dark .btn--outline { color: var(--on-dark); }
.nav.is-dark .btn--outline:hover { background: var(--on-dark-line); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: clip;
  min-height: min(100svh, 960px);
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + clamp(28px, 5vw, 64px)) 0 clamp(72px, 8vw, 112px);
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__copy > :not(.hero__actions) { animation: rise .9s var(--ease) both; animation-delay: calc(var(--o, 0) * 90ms + 80ms); }
.hero__title { font-size: var(--display-xl); line-height: 1.1; }
.hero__lead { margin-top: 26px; max-width: 30em; font-size: clamp(17px, 1.45vw, 20px); color: var(--text-secondary); }
.hero__actions { margin-top: 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.hero__stage { position: relative; height: clamp(540px, 50vw, 700px); }
.hero__phone { position: absolute; animation: phone-in 1.2s var(--ease) both; }
.hero__phone--front {
  right: 6%; top: 0; z-index: 2; rotate: 4deg; animation-delay: .25s;
  translate: 0 calc(var(--hero, 0) * -70px);
}
.hero__phone--front .phone { --pw: clamp(250px, 23vw, 322px); }
.hero__phone--back {
  left: 0; top: 13%; rotate: -8deg; animation-delay: .1s;
  translate: 0 calc(var(--hero, 0) * 50px);
}
.hero__phone--back .phone { --pw: clamp(210px, 19vw, 272px); }

.float {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--color-neutral-100); box-shadow: var(--shadow-lg);
  translate: 0 calc(var(--hero, 0) * var(--depth, 0) * -1px);
  animation: rise .9s var(--ease) both;
}
.float--dish { left: -4%; bottom: 17%; animation-delay: .7s; }
.float--macro {
  right: -2%; bottom: 2%; flex-direction: column; align-items: stretch; gap: 8px;
  min-width: 190px; padding: 16px 18px; animation-delay: .85s;
}
.float__name { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.3; }
.float__name small, .float__kcal small { font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.float__kcal {
  display: flex; flex-direction: column; align-items: flex-end; margin-left: 6px;
  font: 700 24px/1.05 var(--font-heading); color: var(--color-accent-700);
}
.float__kcal small { font-size: 10px; letter-spacing: var(--tracking-meta); }
.float__label { font-size: 11px; font-weight: 700; letter-spacing: var(--tracking-kicker); color: var(--text-kicker); }
.macro { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.macro b { margin-left: auto; padding-left: 16px; }
.macro__dot { width: 9px; height: 9px; border-radius: 50%; }
.macro__dot--protein { background: var(--macro-protein); }
.macro__dot--carb { background: var(--macro-carb); }
.macro__dot--fat { background: var(--macro-fat); }

/* ── How it works: a dark stage pinned while the three steps play ────────── */

.how { position: relative; color: var(--on-dark); }
.how__sticky {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: clip;
  padding: calc(var(--nav-h) + 24px) 0 64px;
}
.how__bg, .finale__bg {
  position: absolute; inset: 0;
  background: radial-gradient(55% 60% at 72% 50%, var(--camera-glow), transparent 72%), var(--camera-bg);
  clip-path: inset(0 calc((1 - var(--enter, 1)) * var(--gutter)) round calc((1 - var(--enter, 1)) * 48px));
}
.how__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head stage" "steps stage";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 6vw, 96px);
}
.how__head { grid-area: head; align-self: end; }
.how__head h2 { font-size: var(--display-lg); }
.how__steps {
  grid-area: steps; list-style: none; margin: 48px 0 0; padding: 0;
  display: grid; gap: 30px; align-content: start;
}
.how__step {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px;
  transition: opacity .5s var(--ease);
}
.how__num {
  grid-row: span 2; padding-top: 7px;
  font: 700 15px/1 var(--font-heading); letter-spacing: var(--tracking-meta); color: var(--color-accent-400);
}
.how__step h3 { font-size: var(--display-md); }
.how__step p { margin-top: 8px; max-width: 27em; color: var(--on-dark-2); }
.how__stage { grid-area: stage; display: flex; align-items: center; justify-content: center; gap: 36px; }
.phone--how {
  --pw: clamp(240px, 22vw, 316px);
  --phone-ground: #0b0a09;
  --phone-shadow: 0 40px 90px -20px #000c, 0 0 0 1px var(--on-dark-line);
  rotate: calc((var(--p, 0) - .5) * 5deg);
}
.how__screens { position: relative; display: block; overflow: hidden; aspect-ratio: 720 / 1564; }
.how__screen { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.how__screen + .how__screen { display: none; }
.how__rail {
  position: relative; width: 4px; height: 200px; border-radius: 4px; overflow: hidden;
  background: var(--on-dark-line);
}
.how__rail span {
  position: absolute; inset: 0; border-radius: inherit; background: var(--color-accent-400);
  transform-origin: 50% 0; scale: 1 var(--p, 0);
}

/* With the script: a tall track, the stage pinned inside it, one step lit at a time. */
.js .how { height: 330vh; }
.js .how__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.js .how__step { opacity: .32; }
.js .how__step.is-active { opacity: 1; }
.js .how__screen + .how__screen { display: block; }
.js .how__screen {
  opacity: 0; translate: 0 5%; scale: 1.04;
  transition: opacity .6s var(--ease), translate .8s var(--ease), scale .8s var(--ease);
}
.js .how__screen.is-past { translate: 0 -5%; }
.js .how__screen.is-active { opacity: 1; translate: 0 0; scale: 1; }

/* ── Sources: a cream sheet that slides up over the dark stage ───────────── */

.sources {
  position: relative; z-index: 2;
  margin-top: calc(-1 * var(--sheet-radius));
  padding: var(--section-y) 0;
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  background: var(--color-bg);
}
.sources__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: center;
}
.sources h2, .section-head h2, .privacy h2, .finale h2 { font-size: var(--display-lg); }
.legend { margin: 36px 0 0; display: grid; gap: 14px; }
.legend__row { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; align-items: baseline; }
.legend dt { margin: 0; }
.legend dd { margin: 0; font-size: 15px; color: var(--text-secondary); }

.sources__cards { display: grid; gap: 16px; }
.rcard {
  padding: 18px 20px 20px; border-radius: var(--radius-xl);
  background: var(--color-neutral-100); box-shadow: var(--shadow-sm);
}
.rcard--shift { margin-left: clamp(0px, 4vw, 48px); margin-right: calc(-1 * clamp(0px, 4vw, 48px)); }
.rcard__top { display: flex; align-items: center; gap: 14px; }
.rcard__name { flex: 1; min-width: 0; }
.rcard__name h3 { font-size: 18px; }
.rcard__name p { font-size: 13px; color: var(--text-tertiary); }
.rcard__portion { margin-top: 14px; font-size: 13px; color: var(--text-secondary); }
.rcard__portion b { display: block; font-size: 16px; color: var(--color-text); }
.rcard__note { margin-top: 14px; font-size: 13px; font-weight: 600; }
.rcard__chips { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Features: three phones deal out of one stack ────────────────────────── */

.features { padding: 0 0 var(--section-y); }
.section-head { max-width: 760px; margin-bottom: clamp(56px, 7vw, 96px); }
.section-head--center { margin-inline: auto; text-align: center; }

.gallery {
  --gap: clamp(20px, 4vw, 64px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.gallery__item {
  position: relative; z-index: 1; margin: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  translate: calc(var(--i) * -1 * (100% + var(--gap)) * (1 - var(--g, 1))) calc((1 - var(--g, 1)) * 80px);
  rotate: calc(var(--i) * 9deg * (1 - var(--g, 1)));
}
.gallery__item--center { z-index: 2; }
.phone--gallery { --pw: clamp(210px, 21vw, 288px); }
.gallery figcaption { margin-top: 36px; opacity: clamp(0, var(--g, 1) * 3 - 2, 1); }
.gallery h3 { font-size: 23px; }
.gallery figcaption p { margin: 10px auto 0; max-width: 19em; font-size: 16px; color: var(--text-secondary); }

.extras {
  margin-top: clamp(64px, 8vw, 112px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
}
.extra {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px; align-content: start;
  padding: 28px 30px; border-radius: var(--radius-2xl); background: var(--color-surface);
}
.extra__icon {
  grid-row: span 2; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--color-bg); color: var(--color-accent);
}
.extra__icon .icon { width: 24px; height: 24px; }
.extra h3 { font-size: 20px; align-self: center; }
.extra p { margin-top: 6px; font-size: 16px; color: var(--text-secondary); }

/* ── Privacy ─────────────────────────────────────────────────────────────── */

.privacy { padding: 0 0 var(--section-y); }
.privacy__card {
  padding: clamp(36px, 6vw, 80px); border-radius: 40px; background: var(--color-surface);
}
.privacy__list {
  list-style: none; margin: 52px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 44px);
}
/* Small illustrations drawn for this section in the brand's illustration style (thick ink outline, flat warm
   fills; no sage), on a light tile. */
.privacy__icon {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 20px;
  border-radius: var(--radius-lg); background: var(--color-neutral-100); box-shadow: var(--shadow-sm);
}
.ill {
  width: 44px; height: 44px; flex: none;
  fill: none; stroke: var(--color-accent-800); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.ill__warm { fill: var(--color-accent-400); }
.ill__light { fill: var(--color-neutral-100); }
.ill__dot { fill: var(--color-accent); stroke: none; }
.ill__ink { fill: var(--color-accent-800); stroke: none; }
.ill__on-warm { stroke: var(--color-neutral-100); }
.privacy__list h3 { font-size: 20px; }
.privacy__list p { margin-top: 8px; font-size: 16px; color: var(--text-secondary); }

/* ── Pricing ─────────────────────────────────────────────────────────────── */

.pricing { padding: 0 0 var(--section-y); }
.plans {
  max-width: 920px; margin-inline: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
}
.plan { display: flex; flex-direction: column; padding: 36px; border-radius: var(--radius-2xl); background: var(--color-surface); }
.plan--pro { background: var(--color-neutral-100); box-shadow: inset 0 0 0 2px var(--color-accent), var(--shadow-md); }
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan h3 { font-size: 22px; }
.plan__price { margin-top: 18px; font-size: 15px; color: var(--text-secondary); }
.plan__price strong {
  margin-right: 6px; font: 700 46px/1 var(--font-heading); letter-spacing: -.02em; color: var(--color-text);
}
.plan__price span { display: block; margin-top: 8px; }
.plan__list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.plan__list li { display: flex; gap: 12px; font-size: 16px; }
.plan__list .icon { width: 20px; height: 20px; margin-top: 3px; color: var(--color-accent-2-600); }
.note { margin-top: 28px; text-align: center; font-size: 14px; color: var(--text-secondary); }

/* ── Finale and footer ───────────────────────────────────────────────────── */

.finale { position: relative; color: var(--on-dark); padding: clamp(110px, 14vw, 180px) 0 clamp(96px, 11vw, 150px); }
.finale__bg {
  background: radial-gradient(45% 55% at 50% 32%, var(--camera-glow), transparent 72%), var(--camera-bg);
  clip-path: inset(0 calc((1 - var(--enter, 1)) * var(--gutter)) 0
    round calc((1 - var(--enter, 1)) * 48px) calc((1 - var(--enter, 1)) * 48px) 0 0);
}
.finale__inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.finale__icon {
  width: 128px; height: 128px;
  filter: drop-shadow(0 24px 48px #0009);
  scale: calc(.72 + var(--c, 1) * .28);
  rotate: calc((1 - var(--c, 1)) * -14deg);
}
.finale h2 { margin-top: 44px; }
.finale .store-badge { margin-top: 44px; }

.footer { background: var(--camera-bg); color: var(--on-dark-2); font-size: 14px; }
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--on-dark-line);
}
.brand--dark { font-size: 16px; color: var(--on-dark); }
.brand--dark:hover { color: var(--on-dark); }
.brand--dark img { width: 28px; height: 28px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-left: auto; }
.footer a { color: var(--on-dark-2); text-decoration: none; }
.footer a:hover { color: var(--on-dark); text-decoration: underline; }

/* ── English page ────────────────────────────────────────────────────────── */

:root:lang(en) { --display-xl: clamp(40px, 4.4vw, 62px); --display-lg: clamp(32px, 3.9vw, 54px); }
:lang(en) .legend__row { grid-template-columns: 172px minmax(0, 1fr); }

/* ── Reveal on enter (main.js adds .is-in) ───────────────────────────────── */

.js [data-reveal] {
  opacity: 0; translate: 0 36px;
  transition: opacity .8s var(--ease), translate .9s var(--ease), scale .9s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}
.js [data-reveal="right"] { translate: 56px 0; }
.js [data-reveal="grow"] { translate: 0 24px; scale: .95; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes phone-in { from { opacity: 0; transform: translateY(90px) scale(.96); } }

/* ── Narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .privacy__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero__grid, .sources__grid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 0; }
  .hero__stage { height: clamp(460px, 110vw, 620px); max-width: 560px; width: 100%; margin-inline: auto; }
  .hero__phone--front .phone { --pw: clamp(210px, 50vw, 300px); }
  .hero__phone--back .phone { --pw: clamp(180px, 42vw, 250px); }
  .legend__row { grid-template-columns: 116px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .how__sticky { padding: calc(var(--nav-h) + 16px) 0 28px; }
  .how__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "stage" "steps";
    grid-template-rows: auto auto auto;
    row-gap: 20px;
  }
  .how__head h2 { font-size: clamp(26px, 7vw, 34px); }
  .how__head .kicker { margin-bottom: 10px; }
  .how__head h2 br { display: none; }
  .phone--how { --pw: clamp(150px, calc((100svh - 390px) / 2.2), 250px); }
  .how__rail { display: none; }
  .how__steps { margin: 0; display: grid; }
  .how__step { grid-area: 1 / 1; }
  .how__step p { font-size: 15px; }
  .js .how__step { opacity: 0; translate: 0 12px; transition: opacity .45s var(--ease), translate .45s var(--ease); }
  .js .how__step.is-active { opacity: 1; translate: 0 0; }
  .how__step { grid-template-columns: 40px minmax(0, 1fr); }
  .how__step h3 { font-size: 21px; }
}

@media (max-width: 760px) {
  :root { --nav-h: 60px; --sheet-radius: 32px; }
  body { font-size: 16px; }
  .nav__inner { gap: 14px; }
  .nav__links { display: none; }
  .nav__lang { margin-left: auto; }
  .brand { font-size: 17px; }
  .brand img { width: 32px; height: 32px; }
  .float--dish { left: 0; bottom: 8%; padding: 10px 12px; gap: 10px; }
  .float--dish .glyph { width: 38px; height: 38px; font-size: 17px; }
  .float--macro { display: none; }
  .rcard--shift { margin-inline: 0; }
  .js [data-reveal="right"] { translate: 0 36px; }
  .legend__row, :lang(en) .legend__row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .rcard__top { flex-wrap: wrap; }

  /* Phones sit in a swipeable row instead of dealing out. */
  .gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter) 24px; gap: 16px;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery__item { flex: 0 0 76%; scroll-snap-align: center; translate: none; rotate: none; }
  .gallery figcaption { opacity: 1; }
  .phone--gallery { --pw: min(62vw, 250px); }
  .extras, .plans, .privacy__list { grid-template-columns: minmax(0, 1fr); }
  .extra { padding: 24px; }
  .plan { padding: 28px 24px; }
  .footer__links { margin-left: 0; }
  .footer__copy { width: 100%; }
}

/* ── Reduced motion: everything rests in place; the step swap stays, without movement ── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .hero__phone, .float { translate: none !important; opacity: 1 !important; }
  .how__bg, .finale__bg { clip-path: none; }
  .phone--how { rotate: none; }
  .js [data-reveal] { opacity: 1; translate: none; scale: none; }
  .js .how__screen { translate: none; scale: none; }
  .gallery__item { translate: none; rotate: none; }
  .gallery figcaption { opacity: 1; }
  .finale__icon { scale: none; rotate: none; }
}

/* ── 404 ─────────────────────────────────────────────────────────────────── */

.lost {
  min-height: 100vh; min-height: 100svh; padding: 40px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
.lost h1 { margin-top: 12px; font-size: var(--display-lg); }
.lost p { color: var(--text-secondary); }
.lost__links { display: flex; gap: 24px; margin-top: 8px; font-weight: 700; }
