/* ==========================================================================
   Levelan — landing page v2
   Structure and layout language modelled on apple.com/apple-fitness-plus:
   sticky local nav, full-bleed section media, huge centered display type,
   rounded bento tiles, horizontal snap galleries, accordion FAQ, routing
   tiles, footnote block. Palette and voice stay Levelan: deep navy ground,
   electric blue → violet, ember accent.

   Unlike v1 there is no scroll-scrubbing engine. Motion here is IntersectionO
   bserver reveals plus native scroll-snap, which is what the Apple layout
   language actually leans on — the page has to stay readable while it moves.
   ========================================================================== */

:root {
  /* Ground — Apple alternates white/black; we alternate navy depths */
  --bg-0: #060812;
  --bg-1: #0c1124;
  --bg-2: #0a0e1d;
  --panel: #10162e;
  --panel-2: #161c38;
  --line: rgba(155, 165, 220, 0.14);
  --line-strong: rgba(155, 165, 220, 0.24);

  --text: #eceff8;
  --muted: #98a3c7;
  --faint: #6b76a0;

  --blue: #3b82f6;
  --blue-lift: #60a5fa;
  --violet: #8b5cf6;
  --ember: #fb923c;
  --ember-deep: #f97316;
  --accent: var(--blue);
  --grad: linear-gradient(115deg, #4f8bf7 0%, #6d5cf6 55%, #8b5cf6 100%);
  --grad-ember: linear-gradient(115deg, #fbb03c 0%, #fb923c 45%, #f97316 100%);

  --c-ready: var(--blue);
  --c-steady: var(--violet);
  --c-light: var(--ember);

  --font-d: "Archivo", "Helvetica Neue", sans-serif;
  --font-b: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Apple's marketing pages run a ~980–1180px well inside a full-bleed page */
  --well: 1080px;
  --well-wide: 1320px;
  --pad: clamp(20px, 5vw, 40px);

  /* Tile radii — Apple sits around 28px on large tiles, 18px on small */
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;

  --nav-h: 52px;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  /* anchors must clear the sticky local nav */
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--violet); color: #fff; }

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

.well { max-width: var(--well); margin: 0 auto; padding: 0 var(--pad); }
.well--wide { max-width: var(--well-wide); }

/* Faint grain, carried over from v1 — keeps the flat navy from banding */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none; z-index: 90;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Local nav — Apple's product sub-nav: name on the left, section jumps in
   the middle, CTA pill on the right, heavy backdrop blur, hairline base.
   ========================================================================== */

.localnav {
  position: sticky; top: 0; z-index: 80;
  height: var(--nav-h);
  background: rgba(8, 11, 24, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.localnav__inner {
  max-width: var(--well-wide);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 100%;
  display: flex; align-items: center; gap: 24px;
}

.localnav__brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-d);
  font-size: 1.02rem; font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.localnav__brand img { width: 22px; height: 22px; }

.localnav__links {
  display: flex; align-items: center; gap: 26px;
  margin-left: auto;
  font-size: 0.78rem; letter-spacing: 0.005em;
  color: var(--muted);
}
.localnav__links a { transition: color 0.2s var(--ease); }
.localnav__links a:hover { color: var(--text); }

.localnav__cta {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem; font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s var(--ease);
}
.localnav__cta:hover { background: var(--blue-lift); }
.localnav__links + .localnav__cta { margin-left: 22px; }
.localnav__links:not(:has(a)) + .localnav__cta,
.localnav__brand + .localnav__cta { margin-left: auto; }

@media (max-width: 800px) {
  .localnav__links { display: none; }
}

/* ==========================================================================
   Type system — Apple's marketing scale, tightened for Archivo
   ========================================================================== */

.eyebrow {
  font-family: var(--font-d);
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-lift);
  margin-bottom: 18px;
}
.eyebrow--ember { color: var(--ember); }

.display {
  font-family: var(--font-d);
  font-size: clamp(2.9rem, 7.4vw, 5.6rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.headline {
  font-family: var(--font-d);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.subhead {
  font-family: var(--font-d);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.016em;
}

.intro {
  font-size: clamp(1.06rem, 1.55vw, 1.32rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 34ch;
  text-wrap: pretty;
}
.intro--wide { max-width: 46ch; }

.body-copy { color: var(--muted); line-height: 1.55; text-wrap: pretty; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.ember-text { color: var(--ember); }

/* Footnote markers, Apple-style superscript that links to the sosumi block */
.fn {
  font-size: 0.55em;
  vertical-align: super;
  color: var(--faint);
  margin-left: 1px;
}
.fn:hover { color: var(--blue-lift); }

/* ==========================================================================
   Buttons and chevron links
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px;
  border-radius: 980px;
  font-size: 1rem; font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.985); }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-lift); }

.btn--secondary {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn--secondary:hover { border-color: rgba(155, 165, 220, 0.45); background: rgba(255, 255, 255, 0.06); }

.link-chev {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--blue-lift);
  font-size: 1rem;
}
.link-chev::after {
  content: "›";
  font-size: 1.28em; line-height: 0;
  transition: transform 0.2s var(--ease);
}
.link-chev:hover::after { transform: translateX(3px); }

.cta-row {
  display: flex; flex-wrap: wrap; gap: 14px 20px;
  align-items: center;
}
.cta-row--center { justify-content: center; }

/* ==========================================================================
   Section rhythm — Apple runs big vertical air between chapters
   ========================================================================== */

.section { padding: clamp(88px, 13vh, 150px) 0; position: relative; }
.section--tight { padding: clamp(64px, 9vh, 104px) 0; }
.section--raised { background: var(--bg-1); }
.section--deep { background: var(--bg-2); }

.section-head { text-align: center; margin-bottom: clamp(48px, 7vh, 80px); }
.section-head .intro { margin: 22px auto 0; }
.section-head--left { text-align: left; }
.section-head--left .intro { margin-left: 0; }

/* ==========================================================================
   HERO — full-bleed media, scrim, centered display type
   ========================================================================== */

.hero {
  position: relative;
  min-height: min(92svh, 900px);
  display: flex; align-items: flex-end;
  padding: clamp(80px, 14vh, 160px) 0 clamp(56px, 9vh, 96px);
  overflow: hidden;
}

.hero__media {
  position: absolute; inset: 0;
  background: var(--img-hero, linear-gradient(160deg, #16204a, #060812)) center / cover no-repeat;
  transform: scale(1.04);
}

/* Two-stop scrim: floor the bottom for text, keep the top image legible */
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(6, 8, 18, 0.96) 4%, rgba(6, 8, 18, 0.72) 34%, rgba(6, 8, 18, 0.18) 68%, rgba(6, 8, 18, 0.5) 100%),
    radial-gradient(120% 90% at 50% 100%, rgba(59, 130, 246, 0.16), transparent 62%);
}

.hero__content { position: relative; text-align: center; }
.hero .display { margin-bottom: 26px; }
.hero .intro { margin: 0 auto 34px; }
.hero .cta-row { justify-content: center; }

.hero__note {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ==========================================================================
   PILLARS — Apple's "get started" three-up icon columns
   ========================================================================== */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 5vw, 64px);
  text-align: center;
}
.pillar__icon {
  width: 54px; height: 54px;
  margin: 0 auto 22px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.24);
  color: var(--blue-lift);
}
.pillar__icon svg { width: 26px; height: 26px; }
.pillar h3 {
  font-family: var(--font-d);
  font-size: 1.28rem; font-weight: 700;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
}
.pillar p { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; gap: 44px; }
}

/* ==========================================================================
   READINESS — Apple's large feature tile: media/interactive left, copy right
   ========================================================================== */

.readiness__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

/* Segmented control — Apple uses these to switch tile state */
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.segmented button {
  padding: 8px 20px;
  border-radius: 980px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--muted);
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}
.segmented button[aria-selected="true"] { color: #fff; }
.segmented button[aria-selected="true"][data-state="ready"]  { background: var(--c-ready); }
.segmented button[aria-selected="true"][data-state="steady"] { background: var(--c-steady); }
.segmented button[aria-selected="true"][data-state="light"]  { background: var(--c-light); color: #1a1204; }

.state-copy { position: relative; }
.state-copy__panel { display: none; }
.state-copy__panel[data-active] { display: block; animation: fadeUp 0.42s var(--ease-out) both; }
.state-copy__panel h3 {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800;
  letter-spacing: -0.018em;
  margin-bottom: 14px;
}
.state-copy__panel p { color: var(--muted); line-height: 1.55; max-width: 42ch; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* The workout card itself */
.rcard {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
}
.rcard::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--state-color, var(--blue));
  transition: background 0.35s var(--ease);
}
.rcard[data-state="ready"]  { --state-color: var(--c-ready); }
.rcard[data-state="steady"] { --state-color: var(--c-steady); }
.rcard[data-state="light"]  { --state-color: var(--c-light); }

.rcard__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.rcard__day {
  font-family: var(--font-d);
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint);
}
.rcard__pill {
  padding: 5px 14px;
  border-radius: 980px;
  font-size: 0.78rem; font-weight: 600;
  background: color-mix(in srgb, var(--state-color) 18%, transparent);
  color: var(--state-color);
  border: 1px solid color-mix(in srgb, var(--state-color) 34%, transparent);
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.rcard__title {
  font-family: var(--font-d);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 800;
  letter-spacing: -0.018em;
  margin-bottom: 8px;
}
.rcard__why {
  font-size: 0.88rem;
  color: var(--faint);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.rcard__list { list-style: none; display: grid; gap: 14px; }
.rcard__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 0.96rem;
}
.rcard__meta {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}
.rcard__meta--optional { color: var(--faint); font-style: italic; }
.rcard__list li[data-dropped] > span:first-child { color: var(--faint); }

@media (max-width: 900px) {
  .readiness__layout { grid-template-columns: 1fr; }
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; padding: 9px 8px; }
}

/* ==========================================================================
   GALLERY — Apple's horizontal snap gallery with paddle buttons
   ========================================================================== */

.gallery { position: relative; }

.gallery__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: max(var(--pad), calc((100vw - var(--well-wide)) / 2 + var(--pad)));
  padding: 4px max(var(--pad), calc((100vw - var(--well-wide)) / 2 + var(--pad))) 26px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery__track::-webkit-scrollbar { display: none; }

.gcard {
  flex: 0 0 clamp(268px, 30vw, 380px);
  scroll-snap-align: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.gcard:hover { border-color: var(--line-strong); transform: translateY(-3px); }

/* Portrait, matching Apple's tall inspiration-gallery tiles and the 4:5/3:4
   plates the Higgsfield shots are generated at. */
.gcard__media {
  aspect-ratio: 3 / 4;
  background: var(--card-img, linear-gradient(150deg, #1b2450, #0b1024)) center / cover no-repeat;
  position: relative;
}
.gcard__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(16, 22, 46, 0.92), transparent 55%);
}
.gcard__tag {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  padding: 4px 11px;
  border-radius: 980px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  background: rgba(6, 8, 18, 0.7);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}
.gcard__body { padding: 22px 24px 26px; }
.gcard__body h3 {
  font-family: var(--font-d);
  font-size: 1.18rem; font-weight: 700;
  letter-spacing: -0.012em;
  margin-bottom: 9px;
}
.gcard__body p { color: var(--muted); font-size: 0.94rem; line-height: 1.5; }

.gallery__paddles {
  display: flex; gap: 10px; justify-content: flex-end;
  max-width: var(--well-wide); margin: 0 auto;
  padding: 0 var(--pad);
}
.paddle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.paddle:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.paddle:disabled { opacity: 0.32; cursor: default; }
.paddle svg { width: 15px; height: 15px; }

/* ==========================================================================
   WEEK — the reflow strip, laid out as an Apple comparison tile
   ========================================================================== */

.week-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 48px);
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin: 30px 0 26px;
}
.week__day { text-align: center; }
.week__label {
  display: block;
  font-family: var(--font-d);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 9px;
}
.week__slot {
  padding: 16px 6px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-top: 2px solid var(--blue);
  font-size: 0.84rem; font-weight: 500;
  transition: all 0.4s var(--ease);
}
.week__slot--rest { border-top-color: var(--faint); color: var(--muted); }
.week__slot--moved { border-top-color: var(--violet); }
.week__slot--light { border-top-color: var(--ember); }
.week__slot--short { border-top-color: var(--ember); }

.week__note {
  display: block;
  margin-top: 7px;
  font-size: 0.68rem;
  color: var(--faint);
  min-height: 1.2em;
}
.week__note strong { color: var(--ember); font-weight: 600; }

.week__why {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  font-size: 0.95rem; color: var(--muted); line-height: 1.55;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.why-chip {
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.week-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.9rem; color: var(--muted);
}
.switch {
  position: relative;
  width: 50px; height: 29px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s var(--ease);
}
.switch[aria-checked="true"] { background: var(--blue); border-color: var(--blue); }
.switch[aria-checked="true"]::after { transform: translateX(21px); }

@media (max-width: 720px) {
  .week { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .week__slot { padding: 12px 2px; font-size: 0.66rem; }
  .week__label { font-size: 0.56rem; }
  .week__note { font-size: 0.55rem; }
}

/* ==========================================================================
   STATEMENT — Apple's full-bleed emotional chapter break
   ========================================================================== */

.statement {
  position: relative;
  min-height: min(84svh, 760px);
  display: grid; place-items: center;
  text-align: center;
  overflow: hidden;
  padding: clamp(80px, 12vh, 140px) 0;
}
.statement__media {
  position: absolute; inset: 0;
  background: var(--img-statement, linear-gradient(200deg, #241436, #060812)) center / cover no-repeat;
}
.statement__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(6, 8, 18, 0.86), rgba(6, 8, 18, 0.6) 45%, rgba(6, 8, 18, 0.92)),
    radial-gradient(90% 70% at 50% 50%, transparent 20%, rgba(6, 8, 18, 0.55));
}
.statement__content { position: relative; }
.statement .display { margin-bottom: 26px; }
.statement .intro { margin: 0 auto; }

/* ==========================================================================
   BENTO — refusals grid, Apple's uneven tile mosaic
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.btile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(22px, 2.6vw, 32px);
  display: flex; flex-direction: column; justify-content: space-between;
  gap: 14px;
  min-height: 152px;
}
.btile--wide { grid-column: span 3; }
.btile--third { grid-column: span 2; }
.btile--half { grid-column: span 3; }
.btile--full { grid-column: span 6; }

.btile__strike {
  font-family: var(--font-d);
  font-size: clamp(1.15rem, 1.9vw, 1.55rem); font-weight: 700;
  letter-spacing: -0.014em;
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-color: rgba(251, 146, 60, 0.6);
  text-decoration-thickness: 2px;
}
.btile p { font-size: 0.92rem; color: var(--muted); line-height: 1.5; }

.btile--closer {
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.14), rgba(139, 92, 246, 0.12));
  border-color: rgba(139, 92, 246, 0.28);
  align-items: center; justify-content: center; text-align: center;
  min-height: 132px;
}
.btile--closer p {
  font-family: var(--font-d);
  font-size: clamp(1.2rem, 2.2vw, 1.75rem); font-weight: 700;
  letter-spacing: -0.016em;
  color: var(--text);
}
.btile--closer strong { color: var(--blue-lift); }

@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .btile--wide, .btile--third, .btile--half { grid-column: span 1; }
  .btile--full { grid-column: span 2; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .btile--full { grid-column: span 1; }
}

/* ==========================================================================
   COMPATIBILITY — Apple's device/requirement grid
   ========================================================================== */

.compat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compat__cell {
  background: var(--bg-1);
  padding: clamp(26px, 3vw, 38px) clamp(20px, 2.4vw, 30px);
  text-align: center;
}
.compat__cell h3 {
  font-family: var(--font-d);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.compat__cell p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.compat__mark {
  font-family: var(--font-d);
  font-size: 1.9rem; font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ==========================================================================
   JOIN — Apple's pricing block, remapped to a pre-launch cohort card
   ========================================================================== */

.join-card {
  max-width: 720px; margin: 0 auto;
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: clamp(34px, 5vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.join-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--grad);
}
.join-card__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 980px;
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.32);
  color: var(--ember);
  font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 22px;
}
.join-card h2 { margin-bottom: 18px; }
.join-card .intro { margin: 0 auto 32px; }

.join-card__perks {
  list-style: none;
  display: grid; gap: 12px;
  max-width: 420px;
  margin: 32px auto 0;
  text-align: left;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.join-card__perks li {
  display: flex; align-items: flex-start; gap: 11px;
  font-size: 0.94rem; color: var(--muted);
}
.join-card__perks svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--blue-lift); }

/* Waitlist form */
.waitlist-form { max-width: 470px; margin: 0 auto; }
.form-row { display: flex; gap: 10px; }
.form-row input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 980px;
  background: rgba(6, 8, 18, 0.6);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font: inherit; font-size: 0.98rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-row input::placeholder { color: var(--faint); }
.form-row input:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(6, 8, 18, 0.85);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}
.form-message {
  min-height: 1.4em;
  margin-top: 12px;
  font-size: 0.88rem;
}
.form-message.is-error { color: #fca5a5; }
.form-message.is-success { color: #86efac; }
.form-note { margin-top: 16px; font-size: 0.82rem; color: var(--faint); }

@media (max-width: 560px) {
  .form-row { flex-direction: column; }
  .form-row input, .form-row .btn { width: 100%; }
}

/* ==========================================================================
   FAQ — Apple's hairline accordion
   ========================================================================== */

.faq-list { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 44px 26px 0;
  position: relative;
  font-family: var(--font-d);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue-lift); }
.faq-item summary::after {
  content: "";
  position: absolute; right: 6px; top: 50%;
  width: 15px; height: 15px;
  margin-top: -7px;
  background:
    linear-gradient(var(--muted), var(--muted)) center / 15px 1.5px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center / 1.5px 15px no-repeat;
  transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--blue-lift); }
.faq-item__body {
  padding: 0 44px 28px 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 68ch;
  animation: fadeUp 0.32s var(--ease-out) both;
}

/* ==========================================================================
   ROUTING — Apple's related-links tile row
   ========================================================================== */

.routing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.rtile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(24px, 3vw, 34px);
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.rtile:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.rtile h3 {
  font-family: var(--font-d);
  font-size: 1.14rem; font-weight: 700;
  letter-spacing: -0.012em;
  margin-bottom: 9px;
}
.rtile p { font-size: 0.92rem; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }

/* ==========================================================================
   FOOTNOTES + FOOTER — Apple's sosumi block, then the global footer
   ========================================================================== */

.sosumi {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--faint);
}
.sosumi ol { list-style: none; counter-reset: fn; display: grid; gap: 9px; }
.sosumi li { counter-increment: fn; padding-left: 18px; position: relative; }
.sosumi li::before {
  content: counter(fn) ".";
  position: absolute; left: 0;
}
.sosumi a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.footer { padding: 48px 0 40px; border-top: 1px solid var(--line); }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 40px;
  justify-content: space-between;
  padding-bottom: 32px;
}
.footer__brand-block { max-width: 260px; }
.footer__brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-d); font-weight: 700; font-size: 1rem;
}
.footer__brand img { width: 22px; height: 22px; }
.footer__tagline { font-size: 0.85rem; color: var(--faint); margin-top: 8px; line-height: 1.5; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 40px 56px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; min-width: 140px; }
.footer__col-title {
  font-family: var(--font-d); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint);
  margin-bottom: 2px;
}
.footer__col a { font-size: 0.88rem; color: var(--muted); }
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.footer__copy { font-size: 0.78rem; color: var(--faint); }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.78rem; }
.footer__legal-links a { color: var(--faint); }
.footer__legal-links a:hover { color: var(--muted); }

/* ==========================================================================
   Reveal — IntersectionObserver adds .is-in
   ========================================================================== */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .state-copy__panel[data-active] { animation: none; }
  .faq-item__body { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Imagery — Higgsfield renders drop in here (see higgsfield-shots.md).
   Kept at the bottom so a swap is one block, not a hunt through the file.
   ========================================================================== */

.hero { --img-hero: url("img/hero.webp"); }
.statement--impact { --img-statement: url("img/impact.webp"); }

/* Roster is deliberately balanced three women / three men, and the roles are
   crossed against the lazy defaults: the exec is a woman, the shift worker is a
   woman, the four-hours-of-sleep parent is a dad. */
.gcard--exec    { --card-img: url("img/exec-female.webp"); }   /* woman */
.gcard--dad     { --card-img: url("img/parent-dad.webp"); }    /* man   */
.gcard--mom     { --card-img: url("img/parent-mom.webp"); }    /* woman */
.gcard--founder { --card-img: url("img/founder.webp"); }       /* man   */
.gcard--travel  { --card-img: url("img/timezone-male.webp"); } /* man   */
.gcard--shift   { --card-img: url("img/shift-female.webp"); }  /* woman */
