/* 7DEED website. Tokens mirror the app (AppTokens.swift / docs/UI_SPEC.md §2): Base, Surface, Card, Elevated,
   Brand gradient, Accent, Plus Jakarta Sans, radii 10/12/16/20/28/99, press = scale .98 + alpha .94. */

:root {
  --base: #0F141B;
  --surface: #19232F;
  --card: #1E2A39;
  --card-60: rgba(30, 42, 57, .6);
  --elevated: #263345;
  --brand: #8052CF;
  --brand-a: #7447C8;
  --brand-b: #8755D3;
  --accent: #B49AF3;
  --ink: #F8F7F4;
  --ink-2: rgba(199, 208, 220, .78);
  --ink-3: rgba(199, 208, 220, .62);
  --line: rgba(248, 247, 244, .08);
  --success: #79C99C;
  --danger: #F47684;
  --protein: #53B7CE;
  --carbs: #79C99C;
  --fats: #E6BD69;

  --grad: linear-gradient(135deg, var(--brand-a), var(--brand-b));

  --r-thumb: 10px;
  --r-compact: 12px;
  --r-control: 16px;
  --r-card: 20px;
  --r-sheet: 28px;
  --r-full: 99px;

  --nav: 64px;
  --gut: 80px;
  --wrap: 1200px;
  --padt: 112px;
  --padb: 72px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.2, .9, .25, 1);

  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

@media (max-width: 1023px) { :root { --gut: 48px; --padt: 104px; --padb: 80px; } }
@media (max-width: 639px)  { :root { --gut: 20px; --nav: 56px; --padt: 88px; --padb: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav); }
html, body { margin: 0; }
body {
  background: var(--base);
  color: var(--ink);
  font: 500 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(128, 82, 207, .55); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.skip-link {
  position: absolute; left: var(--gut); top: -100px; z-index: 50;
  background: var(--elevated); color: var(--ink); padding: 10px 16px; border-radius: var(--r-compact);
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */

.label {
  font-size: 13px; line-height: 16px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.h1 {
  font-size: clamp(44px, 5.6vw, 84px); line-height: 1.02; font-weight: 800;
  letter-spacing: -.035em; text-wrap: balance;
}
.h2 {
  font-size: clamp(34px, 4.2vw, 60px); line-height: 1.05; font-weight: 800;
  letter-spacing: -.03em; text-wrap: balance;
}
.h3 { font-size: clamp(22px, 1.8vw, 26px); line-height: 1.2; font-weight: 700; letter-spacing: -.012em; }
.lead { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; color: var(--ink-2); font-weight: 500; max-width: 38em; }
.muted { color: var(--ink-3); }
.grad-text {
  background: linear-gradient(100deg, #C9B5FA 0%, var(--accent) 40%, #8F6BE0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons (AppButton Large / Tonal) ---------- */

.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: var(--r-control); border: 0;
  font-size: 16px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform .15s var(--spring), opacity .15s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); opacity: .94; }
.btn--primary { background: var(--grad); color: var(--ink); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset; }
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 10px 30px -12px rgba(128, 82, 207, .8); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--tonal { background: var(--elevated); color: var(--accent); }
.btn--tonal:hover { background: #2D3B50; transform: translateY(-1px); }
.btn--sm { --h: 40px; padding: 0 16px; font-size: 15px; border-radius: var(--r-compact); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.link {
  color: var(--accent); font-weight: 600;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .25s var(--ease);
}
.link:hover { background-size: 100% 1.5px; }

/* ---------- Nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--nav);
  background: var(--base); border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.nav__logo { display: flex; align-items: center; height: 44px; }
.nav__logo img { height: 20px; width: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a { font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .15s var(--ease); padding: 10px 0; }
.nav__links a:hover { color: var(--ink); }
.nav__toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-compact);
  background: var(--surface); border: 0; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform .25s var(--ease), background .2s;
}
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; } .nav__toggle span::after { top: 6px; }
.nav[data-open] .nav__toggle span { background: transparent; }
.nav[data-open] .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav[data-open] .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav .wrap { gap: 12px; }
  .nav__links {
    position: fixed; inset: var(--nav) 0 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--base); padding: 16px var(--gut) 32px; display: none;
  }
  .nav[data-open] .nav__links { display: flex; }
  .nav__links a { display: flex; align-items: center; height: 60px; font-size: 22px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
  .nav__toggle { display: inline-flex; }
  .nav .nav__cta { order: 2; }
  .nav__toggle { order: 3; margin-left: 0; }
  .nav__logo { margin-right: auto; }
}
@media (max-width: 380px) { .nav .nav__cta { padding: 0 12px; font-size: 14px; } }

/* ---------- Sections ---------- */

main > section { position: relative; min-height: 100svh; padding: var(--padt) 0 var(--padb); }
.sec-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 44px; }
@media (max-width: 639px) { .sec-head { margin-bottom: 36px; } }

/* ---------- Hero ---------- */

.hero { padding-top: calc(var(--nav) + 56px); padding-bottom: 48px; display: flex; align-items: stretch; overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 24px; align-items: center; }
.hero__text { display: grid; gap: 24px; align-content: center; padding-bottom: 24px; }
.hero__notice { display: inline-flex; align-items: center; gap: 10px; }
.hero__notice .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(121, 201, 156, .16); }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--r-full);
  background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 600;
}
.chip svg { width: 15px; height: 15px; color: var(--accent); }
.hero__stage { position: relative; height: min(78svh, 760px); min-height: 520px; }
.hero__stage canvas, .stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.glow {
  position: absolute; inset: 10% 5% 5%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(128, 82, 207, .34), rgba(128, 82, 207, 0) 72%);
  filter: blur(10px);
}

@media (max-width: 1023px) {
  .hero { padding-top: calc(var(--nav) + 40px); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__text { padding-bottom: 0; }
  .hero__stage { height: max(380px, calc(100svh - 590px)); min-height: 0; }
}
@media (max-width: 639px) {
  .hero { padding-top: calc(var(--nav) + 28px); padding-bottom: 16px; }
  .hero__text { gap: 18px; }
  .hero .h1 { font-size: clamp(36px, 10.4vw, 44px); }
  .hero .lead { font-size: 17px; }
  .hero__facts { display: none; }
  .hero__stage { height: max(250px, calc(100svh - 500px)); min-height: 0; margin-inline: calc(-1 * var(--gut)); }
  .hero .btn-row { flex-wrap: nowrap; gap: 10px; }
  .hero .btn-row .btn { flex: 1 1 0; padding: 0 12px; }
}

/* Static phone used before WebGL is ready and when it is not available. */
.stage-fallback { display: flex; align-items: center; justify-content: center; gap: 0; transition: opacity .6s var(--ease); }
.stage-fallback .phone { position: relative; height: 84%; width: auto; max-width: 52%; object-fit: contain; filter: drop-shadow(0 40px 60px rgba(0,0,0,.45)); }
.stage-fallback .phone--back { height: 72%; margin-right: -16%; transform: translateY(-5%); opacity: .9; z-index: 0; }
.stage-fallback .phone:not(.phone--back) { z-index: 1; transform: translateY(2%); }
.is-3d .stage-fallback { opacity: 0; pointer-events: none; }
.device {
  position: relative; aspect-ratio: 706 / 1466; border-radius: 16.7% / 8.05%; padding: 3.9%;
  background: linear-gradient(145deg, #4a4b50, #2a2b2f 40%, #3a3b3f 70%, #222326);
  box-shadow: 0 0 0 1.5px #1b1c1f inset, 0 0 0 4px #020203 inset, 0 40px 80px -30px rgba(0,0,0,.8);
}
.device img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 14% / 6.45%; background: var(--base); }

/* ---------- Showcase (pinned chapters, its own section only) ---------- */

.showcase { padding: 0 !important; min-height: 0 !important; height: 420svh; background: #0B1016; }
.showcase__pin { position: sticky; top: 0; height: 100svh; overflow: clip; }
.showcase__pin .wrap { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: center; padding-top: var(--nav); }
.showcase__text { display: grid; gap: 48px; align-content: center; }
.showcase__head { display: grid; gap: 12px; }
.chapters { position: relative; min-height: 300px; }
.chapter {
  position: absolute; inset: 0 0 auto; display: grid; gap: 16px; align-content: start;
  opacity: 0; transform: translateY(16px); transition: opacity .45s var(--ease), transform .45s var(--ease); pointer-events: none;
}
.chapter.is-on { opacity: 1; transform: none; pointer-events: auto; }
.chapter__num { font-size: 14px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chapter p { color: var(--ink-2); font-size: 18px; max-width: 30em; }
.progress { display: flex; gap: 8px; margin-top: 32px; padding: 0; list-style: none; }
.progress li { width: 36px; height: 4px; border-radius: 4px; background: var(--elevated); overflow: hidden; }
.progress li i { display: block; height: 100%; width: 0; background: var(--grad); }
.showcase__stage { position: relative; height: min(84svh, 820px); }
.showcase__stage canvas, .showcase__stage .stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.showcase .stage-fallback .device { width: min(52%, 330px); }
.showcase .stage-fallback .device img { transition: opacity .4s var(--ease); }

@media (max-width: 1023px) {
  .showcase__pin .wrap { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto auto; align-content: stretch; padding-top: calc(var(--nav) + 24px); gap: 8px; }
  .showcase__text { display: contents; }
  .showcase__head { order: 1; }
  .showcase__head .h2 { font-size: clamp(28px, 5vw, 40px); }
  .chapters { min-height: 156px; order: 3; }
  .showcase .progress { order: 4; }
  .chapter p { font-size: 16px; }
  .chapter .h3 { font-size: 22px; }
  .progress { margin-top: 12px; }
  .showcase__stage { order: 2; height: 100%; min-height: 0; }
  .showcase .stage-fallback .device { width: auto; height: 92%; }
}
@media (max-width: 639px) {
  .showcase__head .label { display: none; }
  .chapters { min-height: 170px; }
}

/* ---------- Feature split (training, food) ---------- */

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 64px; align-items: start; }
.split__visual { position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--surface); aspect-ratio: 4 / 3; }
.split__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.split__visual:hover img { transform: scale(1.025); }
.feature-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.feature {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start;
  padding: 20px; border-radius: var(--r-card); background: var(--card-60);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.feature:hover { transform: translateY(-2px); background: var(--card); }
.feature__icon { width: 44px; height: 44px; border-radius: var(--r-compact); background: var(--elevated); display: grid; place-items: center; color: var(--accent); }
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.feature p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

@media (max-width: 1023px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

/* Food: two phones side by side on a card ground */
.food-visual { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-card); background: radial-gradient(120% 90% at 70% 10%, #253247 0%, var(--surface) 55%); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; gap: 4%; padding: 7% 8% 0; }
.food-visual .device { width: 40%; border-radius: 15% / 7% ; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 0; transition: transform .5s var(--ease); }
.food-visual .device img { border-bottom-left-radius: 0; border-bottom-right-radius: 0; object-position: top; }
.food-visual .device:nth-child(2) { transform: translateY(12%); }
.food-visual:hover .device:nth-child(1) { transform: translateY(-2%); }
.food-visual:hover .device:nth-child(2) { transform: translateY(9%); }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.macro { padding: 14px 16px; border-radius: var(--r-control); background: linear-gradient(90deg, var(--surface), var(--elevated)); }
.macro b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.macro span { font-size: 13px; color: var(--ink-2); }
.macro i { display: block; height: 4px; border-radius: 4px; margin-top: 10px; background: var(--track, rgba(248,247,244,.08)); overflow: hidden; }
.macro i::after { content: ""; display: block; height: 100%; width: var(--v); border-radius: 4px; background: var(--c); }

/* ---------- Plan (3D figures) ---------- */

.plan { background: #0B1016; overflow: clip; }
.plan .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: center; min-height: calc(100svh - var(--padt) - var(--padb)); }
.plan__text { display: grid; gap: 20px; align-content: center; }
.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 4px; height: 52px; width: 260px;
  background: var(--surface); border-radius: var(--r-control); position: relative;
}
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; border-radius: var(--r-compact);
  font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .2s var(--ease);
}
.segmented button[aria-pressed="true"] { color: var(--ink); }
.segmented .pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--r-compact); background: var(--grad); transition: transform .3s var(--spring); }
.segmented[data-v="female"] .pill { transform: translateX(100%); }
.plan__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.stat { padding: 16px; border-radius: var(--r-card); background: var(--card-60); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-2); }
.plan__stage { position: relative; height: min(76svh, 740px); min-height: 460px; }
.plan__stage:active { cursor: grabbing; }
.plan__stage canvas, .plan__stage .stage-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan__stage .stage-fallback img { height: 92%; width: auto; object-fit: contain; }
.plan__stage .fade-b { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(to bottom, rgba(11,16,22,0), #0B1016 78%); pointer-events: none; z-index: 2; }
.floor { position: absolute; left: 50%; bottom: 4%; width: 46%; height: 10%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(128,82,207,.35), transparent); pointer-events: none; }

@media (max-width: 1023px) {
  .plan .wrap { grid-template-columns: 1fr; }
  .plan__stage { height: 64svh; min-height: 420px; }
}

/* ---------- Crew ---------- */

.crew-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: stretch; }
.crew-photo { position: relative; border-radius: var(--r-card); overflow: hidden; min-height: 460px; background: var(--surface); }
.crew-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.crew-photo:hover img { transform: scale(1.025); }
.crew-side { display: grid; gap: 12px; grid-template-rows: auto auto 1fr; }
.steps { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--r-card); background: var(--card-60); }
.steps li::before {
  counter-increment: s; content: counter(s); width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.steps h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 2px; }
.steps p { font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.code-card { padding: 24px; border-radius: var(--r-card); background: var(--surface); display: grid; gap: 14px; align-content: start; }
.code-card h3 { font-size: 19px; font-weight: 700; }

/* ---------- Fields (AppField: 56 high, radius 10, Surface; focus 1.5 Accent) ---------- */

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--accent); }
.input {
  height: 56px; width: 100%; padding: 0 16px; border-radius: var(--r-thumb);
  background: var(--elevated); border: 1.5px solid transparent; color: var(--ink);
  font: 600 17px var(--font); letter-spacing: .02em; transition: border-color .15s var(--ease);
}
.code-card .input { background: var(--base); }
.input::placeholder { color: var(--ink-3); font-weight: 500; }
.input:focus { outline: none; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { font-size: 13px; color: var(--danger); min-height: 0; }
.field__error:empty { display: none; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.inline-form .btn { height: 56px; }
@media (max-width: 520px) { .inline-form { grid-template-columns: 1fr; } .inline-form .btn { width: 100%; } }
.form-status { font-size: 15px; color: var(--ink-2); min-height: 24px; }
.form-status[data-state="ok"] { color: var(--success); }
.form-status[data-state="error"] { color: var(--danger); }

/* ---------- Close + footer ---------- */

.closing { position: relative; min-height: 100svh; padding: var(--padt) 0 32px; display: flex; overflow: clip; background: #0B1016; }
.closing > .wrap { display: grid; grid-template-rows: 1fr auto; gap: 64px; }
.close { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 24px 48px; align-items: center; }
.close__text { display: grid; gap: 20px; }
.close__art { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-card); overflow: hidden; }
.close__art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; transition: transform .6s var(--ease); }
.close__art:hover img { transform: scale(1.025); }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border-radius: var(--r-control);
  background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; line-height: 1.15;
}
.store-badge svg { width: 22px; height: 22px; color: var(--ink); }
.store-badge b { display: block; color: var(--ink); font-size: 16px; }
.footer { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-top: 32px; border-top: 1px solid var(--line); }
.footer__brand { display: grid; gap: 14px; }
.footer__brand img { height: 22px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; list-style: none; padding: 0; margin: 0; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: color .15s; }
.footer__links a:hover { color: var(--ink); }
.legal { font-size: 13px; color: var(--ink-3); }

@media (max-width: 1023px) {
  .close { grid-template-columns: 1fr; }
  .crew-grid { grid-template-columns: 1fr; }
  .crew-photo { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) {
  .footer { grid-template-columns: 1fr; }
  .plan__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 12px; } .stat b { font-size: 20px; }
  .macros { gap: 8px; } .macro { padding: 12px; } .macro b { font-size: 18px; }
}

/* ---------- Entrance (hero once on load) and reveal ---------- */

[data-enter] > * { animation: enter .8s var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: .08s; }
[data-enter] > *:nth-child(3) { animation-delay: .16s; }
[data-enter] > *:nth-child(4) { animation-delay: .24s; }
[data-enter] > *:nth-child(5) { animation-delay: .32s; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Simple pages (join, legal) ---------- */

.page { min-height: 100svh; padding: calc(var(--nav) + 64px) 0 64px; }
.page .wrap { max-width: 760px; }
.prose { display: grid; gap: 18px; color: var(--ink-2); }
.prose h1 { color: var(--ink); margin-bottom: 8px; }
.prose h2 { color: var(--ink); font-size: 22px; font-weight: 700; margin-top: 18px; letter-spacing: -.01em; }
.prose a { color: var(--accent); font-weight: 600; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

.join { min-height: 100svh; padding: calc(var(--nav) + 48px) 0 48px; display: flex; overflow: clip; }
.join .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px 64px; align-items: center; }
.join__card { display: grid; gap: 24px; }
.code-boxes { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.code-boxes span {
  width: clamp(40px, 6vw, 60px); aspect-ratio: 4 / 5; border-radius: var(--r-compact); background: var(--surface);
  display: grid; place-items: center; font-size: clamp(22px, 3.2vw, 34px); font-weight: 800; letter-spacing: 0;
}
.code-boxes .pre { background: none; width: auto; aspect-ratio: auto; color: var(--ink-3); padding-right: 4px; }
.join__visual { position: relative; height: min(76svh, 720px); }
.join__visual .device { position: absolute; left: 50%; top: 50%; width: min(62%, 320px); transform: translate(-50%, -50%) rotate(-4deg); }
.join__visual .glow { inset: 15%; }
@media (max-width: 1023px) {
  .join .wrap { grid-template-columns: 1fr; }
  .join__visual { height: 520px; }
}
@media (max-width: 639px) {
  .join__visual { height: 440px; }
  .join .btn-row .btn { flex: 1 1 100%; }
}

/* ---------- Stills (rendered from the hero's iPhone model and the chrome figures) ---------- */
.stills { isolation: isolate; }
.stills .still { position: absolute; left: 50%; top: 50%; height: 92%; width: auto; max-width: 100%; object-fit: contain;
  transform: translate(-50%, -48%) scale(.985); opacity: 0; transition: opacity .55s var(--ease), transform .7s var(--ease);
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.45)); pointer-events: none; user-select: none; }
.stills .still.is-on { opacity: 1; transform: translate(-50%, -50%); }
.plan__stage.stills { cursor: default; }
.plan__stage .still { top: auto; bottom: 0; height: 96%; transform: translate(-50%, 2%) scale(.985); filter: none; }
.plan__stage .still.is-on { transform: translate(-50%, 0); }
.food-visual .phone { width: 40%; height: auto; align-self: flex-start; transition: transform .5s var(--ease); filter: drop-shadow(0 30px 40px rgba(0,0,0,.4)); }
.food-visual .phone:nth-child(2) { transform: translateY(12%); }
.food-visual:hover .phone:nth-child(1) { transform: translateY(-2%); }
.food-visual:hover .phone:nth-child(2) { transform: translateY(9%); }
.join__visual .phone { position: absolute; left: 50%; top: 50%; height: 94%; width: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 40px 60px rgba(0,0,0,.45)); }
@media (prefers-reduced-motion: reduce) { .stills .still { transition: opacity .2s linear; transform: translate(-50%, -50%); } .plan__stage .still { transform: translate(-50%, 0); } }
