/* =====================================================================
   BEIKORA · home (landing 1.1)
   Tokens copied 1:1 from lib/ui/tokens/bk_colors.dart, bk_type.dart and
   bk_tokens.dart. Light "Nativo" is the default, dark "Grafito" follows the
   system. The UI is monochrome: chromatic colors are reserved for data
   (protein, fat, carbs) and records (clay).
   ===================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Expanded";
  src: url("/assets/fonts/archivo-expanded-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #F2F2F7;
  --s1: #FFFFFF;
  --s2: #ECECF1;
  --s3: #E2E2E8;
  --line: #E0E0E6;
  --fg: #0B0B0F;
  --fg2: #55555E;
  --fg3: #6C6C75;
  --brand: #0B0B0F;
  --brand-fg: #FFFFFF;
  --link: #1F5FD6;
  --clay: #E5483C;
  --paper: #FFFFFF;
  --card-border: transparent;
  --frame-ring: rgba(11, 11, 15, 0.06);

  /* Data colors, same in both modes */
  --p: #FF5B4D;
  --g: #FFB020;
  --c: #3E8BFF;

  /* The island is always black, like the Dynamic Island */
  --island: #0B0B0F;
  --island-fg: #FFFFFF;
  --island-fg2: #B4B4BA;
  --island-fill: #2C2C2F;
  --island-track: #3A3A40;
  --island-accent: #FFB020;
  --island-link: #7AA8FF;

  /* Radii (bk_tokens.dart) */
  --r-card: 18px;
  --r-receipt: 16px;
  --r-button: 16px;
  --r-tile: 14px;
  --r-flap: 10px;
  --r-pill: 999px;

  /* Spacing 4·8·12·16·20·24·32·40 + section rhythm */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-16: 64px;
  --section: clamp(72px, 6vw + 40px, 144px);
  --gutter: 16px;

  /* Type */
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-moment: "Archivo Expanded", "Inter", system-ui, sans-serif;
  --t-moment: clamp(2.35rem, 0.6rem + 7vw, 5.25rem);
  --t-h2: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem);
  --t-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.375rem);
  --t-lede: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --t-body: 1rem;
  --t-cap: 0.8125rem;

  /* Motion: three curves with a job each (ai-tells 2.1) */
  --ease-drama: cubic-bezier(0.16, 1, 0.3, 1);   /* hero, section anchors */
  --ease-std: cubic-bezier(0.32, 0.72, 0, 1);    /* swaps, sheets */
  --ease-press: cubic-bezier(0.2, 0, 0, 1);      /* .press in the app */
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --d-press: 100ms;
  --d-fast: 150ms;
  --d-flap: 300ms;
  --d-swap: 420ms;
  --d-hero: 760ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1C1E;
    --s1: #1C1C1E;
    --s2: #2C2C2F;
    --s3: #3A3A3E;
    --line: #48484D;
    --fg: #F4F4F5;
    --fg2: #B4B4BA;
    --fg3: #8E8E95;
    --brand: #F4F4F5;
    --brand-fg: #111113;
    --link: #7AA8FF;
    --clay: #FF7A6E;
    --paper: #26262A;
    --card-border: #48484D;
    --frame-ring: #48484D;
  }
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-ui);
  font-size: var(--t-body);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-button);
  background: var(--brand); color: var(--brand-fg); font-weight: 700; text-decoration: none;
}
.skip:focus { top: var(--s-4); }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

.num { font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.strong { font-weight: 800; }

/* ---------- Type roles ---------- */
.moment {
  font-family: var(--f-moment);
  font-weight: 800;
  font-size: var(--t-moment);
  line-height: 0.98;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.h2 {
  font-size: var(--t-h2);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 20ch;
}
.h3 {
  font-size: var(--t-h3);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.body {
  color: var(--fg2);
  font-size: var(--t-lede);
  line-height: 1.5;
  max-width: 56ch;
  text-wrap: pretty;
}
.h2 + .body, .h2 + p.body { margin-top: var(--s-5); }
.kicker {
  display: flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-4);
  color: var(--fg2);
  font-size: 0.9375rem;
  font-weight: 600;
}
.kicker--inv { color: var(--island-fg2); }
.cap {
  margin-top: var(--s-3);
  color: var(--fg3);
  font-size: var(--t-cap);
  line-height: 1.45;
}
.tag {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--s2);
  color: var(--fg);
  font-size: 0.75rem;
  font-weight: 700;
}
.chip {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--s2);
  color: var(--fg2);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: 0 var(--s-6);
  border-radius: var(--r-button);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform var(--d-press) var(--ease-press), background-color var(--d-fast) var(--ease-press);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand); color: var(--brand-fg); }
@media (hover: hover) {
  .btn--primary:hover { background: color-mix(in srgb, var(--brand) 86%, var(--bg)); }
}
.link {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left calc(100% - 12px) / 0 1.5px no-repeat;
  transition: background-size 240ms var(--ease-press);
}
@media (hover: hover) { .link:hover { background-size: 100% 1.5px; } }
.body a, .data__list a, .end__help a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

/* ---------- The island (Dynamic Island pill) ---------- */
.island {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 16px 0 10px;
  min-height: 40px;
  border-radius: var(--r-pill);
  background: var(--island);
  color: var(--island-fg);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px var(--frame-ring);
  transition: transform var(--d-press) var(--ease-press);
}
a.island:active { transform: scale(0.97); }
.island__ring {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  border: 2.5px solid var(--island-track);
  border-top-color: var(--island-accent);
}
.island--sm { min-height: 44px; }
.island--lg { min-height: 56px; padding: 0 22px 0 14px; font-size: 1rem; gap: 12px; }
.island--lg .island__ring { width: 22px; height: 22px; }

/* ---------- Status pill (launch state, static: nothing is loading) ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--d-fast) var(--ease-press), transform var(--d-press) var(--ease-press);
}
a.status-pill:hover { border-color: var(--fg3); }
a.status-pill:active { transform: scale(0.97); }
.status-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); flex: none; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--d-fast) var(--ease-press);
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  text-decoration: none;
}
.logo__mark { width: 22px; height: 27px; }
.logo__word { font-weight: 800; font-size: 1.125rem; letter-spacing: 0.02em; }
.logo--sm .logo__mark { width: 18px; height: 22px; }
.logo--sm .logo__word { font-size: 1rem; }
.top__nav { display: none; }
@media (max-width: 379px) {
  .top .status-pill { font-size: 0.75rem; padding-inline: 12px; }
}
@media (min-width: 1024px) {
  .top__nav { display: flex; gap: var(--s-1); }
  .top__nav a {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 0 var(--s-3);
    border-radius: var(--r-pill);
    color: var(--fg2);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--d-fast) var(--ease-press), background-color var(--d-fast) var(--ease-press);
  }
  .top__nav a:hover { color: var(--fg); background: var(--s2); }
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 9px;
  border-radius: 52px;
  background: var(--island);
  box-shadow:
    0 0 0 1px var(--frame-ring),
    0 2px 6px rgba(11, 11, 15, 0.06),
    0 24px 56px -16px rgba(11, 11, 15, 0.22);
}
@media (prefers-color-scheme: dark) {
  .phone { box-shadow: 0 0 0 1.5px var(--frame-ring); }
}
.phone__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 640 / 1391;
  border-radius: 43px;
  overflow: hidden;
  background: var(--s2);
}
.phone__screen img,
video.phone__screen { width: 100%; height: 100%; object-fit: cover; }
.phone__island {
  position: absolute; z-index: 2;
  top: 19px; left: 50%;
  width: 29%; height: 3.1%;
  transform: translateX(-50%);
  border-radius: var(--r-pill);
  background: var(--island);
}
.phone__toggle {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 50%;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color var(--d-fast) var(--ease-press), transform var(--d-press) var(--ease-press);
}
.phone__toggle[hidden] { display: none; }
.phone__toggle:hover { border-color: var(--fg3); }
.phone__toggle:active { transform: scale(0.94); }
.phone__toggle svg { width: 16px; height: 16px; fill: currentColor; }
.phone__toggle .i-play { display: none; }
.phone__toggle[aria-pressed="true"] .i-play { display: block; }
.phone__toggle[aria-pressed="true"] .i-pause { display: none; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s-8) var(--section); }
.hero__grid { display: grid; gap: var(--s-10); align-items: center; }
.hero__status {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin-bottom: var(--s-5);
  color: var(--fg2);
  font-size: 0.9375rem;
  font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg2); }
.hero__copy { container-type: inline-size; }
/* "BAJA GRASA" / "SIN PERDER" are ~8.7em wide in Archivo Expanded: size the
   moment from the column so the three lines never re-wrap. */
.hero__title { display: flex; flex-direction: column; font-size: min(var(--t-moment), 11.2cqi); }
.hero__title .line { display: block; }
.hero__lede {
  margin-top: var(--s-6);
  max-width: 44ch;
  color: var(--fg2);
  font-size: var(--t-lede);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6);
  margin-top: var(--s-8);
}
.hero__facts {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-6);
  color: var(--fg3);
  font-size: 0.875rem;
  font-weight: 500;
}
.hero__facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__facts li::before {
  content: ""; width: 12px; height: 7px; margin-top: -3px;
  border-left: 2px solid var(--fg2); border-bottom: 2px solid var(--fg2);
  transform: rotate(-45deg);
}
.hero__device { display: grid; justify-items: center; }
.hero__device .phone { max-width: 300px; }
.hero__cap { display: flex; align-items: center; gap: var(--s-3); max-width: 38ch; text-align: left; }

@media (min-width: 900px) {
  .hero { padding-top: var(--s-10); }
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--s-16); }
  .hero__device .phone { max-width: 340px; }
  .hero__device { justify-items: end; }
  .hero__cap { justify-self: end; max-width: 340px; }
}

/* Hero entrance: drama curve, delays on a curve, never index × constant */
@media (prefers-reduced-motion: no-preference) {
  .hero__title .line,
  .hero__lede,
  .hero__actions,
  .hero__device .phone {
    animation: rise var(--d-hero) var(--ease-drama) both;
  }
  .hero__title .line:nth-child(2) { animation-delay: 70ms; }
  .hero__title .line:nth-child(3) { animation-delay: 160ms; }
  .hero__lede { animation-delay: 280ms; }
  .hero__actions { animation-delay: 380ms; }
  .hero__device .phone { animation: rise-phone 900ms var(--ease-std) 120ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-phone { from { opacity: 0; transform: translateY(40px) scale(0.985); } }

/* Section anchors: CSS scroll-driven where supported, static elsewhere */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: rise linear both;
      animation-timing-function: var(--ease-drama);
      animation-timeline: view();
      animation-range: entry 5% entry 55%;
    }
  }
}

/* ---------- Sections common ---------- */
section { position: relative; }
.plan, .how, .eat, .syn, .prog, .tiers, .faq { padding-block: var(--section); }
.plan, .eat, .tiers { border-top: 1px solid var(--line); }

/* ---------- Sin (negation band) ---------- */
.nots { padding-block: 0 var(--section); }
.nots__list { display: grid; gap: 0; border-top: 1.5px solid var(--fg); }
.nots__list li { padding-block: var(--s-6); border-bottom: 1px solid var(--line); }
.nots__title { font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.nots__body { margin-top: var(--s-2); color: var(--fg2); max-width: 46ch; }
@media (min-width: 900px) {
  .nots__list { grid-template-columns: repeat(3, 1fr); gap: var(--s-10); }
  .nots__list li { border-bottom: 0; padding-block: var(--s-6) 0; }
}

/* ---------- La boleta ---------- */
.plan__grid { display: grid; gap: var(--s-10); align-items: center; }
.specs {
  display: grid; gap: 0;
  margin-top: var(--s-8);
  border-top: 1px solid var(--line);
  max-width: 460px;
}
.specs div {
  display: flex; justify-content: space-between; gap: var(--s-4);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.specs dt { color: var(--fg2); }
.specs dd { font-weight: 700; text-align: right; }

.plan__receipt { width: 100%; max-width: 440px; justify-self: center; }
.receipt {
  position: relative;
  padding: var(--s-6) var(--s-5) calc(var(--s-6) + 8px);
  border-radius: var(--r-receipt) var(--r-receipt) 0 0;
  background: var(--paper);
  /* Perforated edge: semicircular holes r 6.25 every 16 px (bk_receipt.dart) */
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle 6.4px at 8px 0, transparent 98%, #000) bottom / 16px 8px repeat-x;
          mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
    radial-gradient(circle 6.4px at 8px 0, transparent 98%, #000) bottom / 16px 8px repeat-x;
}
.receipt__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.receipt__title {
  font-family: var(--f-moment);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.receipt__who { margin-top: var(--s-2); color: var(--fg3); font-size: var(--t-cap); }
.receipt__rows {
  margin-top: var(--s-4);
  padding-block: var(--s-3);
  border-block: 1.5px dashed var(--line);
}
.receipt__rows li, .receipt__total, .receipt__protein {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
}
.receipt__rows li { padding-block: 7px; font-size: 0.9375rem; }
.receipt__rows li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.receipt__total { margin-top: var(--s-5); align-items: center; font-weight: 800; font-size: 1.0625rem; }
.receipt__protein { margin-top: var(--s-3); font-weight: 800; font-size: 1rem; }
.receipt__protein .num { display: inline-flex; align-items: center; gap: 8px; }

/* Split-flap counter */
.flap { display: inline-flex; align-items: baseline; gap: 6px; }
.flap__digits { display: inline-flex; gap: 3px; }
.flap__cell {
  position: relative;
  display: inline-block;
  width: 0.72em; height: 1.18em;
  overflow: hidden;
  border-radius: var(--r-flap);
  background: var(--s2);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.flap__cell::after { /* the split line of the flap */
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.flap__col { display: block; transform: translateY(calc(var(--n, 0) * -1.18em)); }
.flap__col span { display: block; height: 1.18em; }
.flap.is-rolling .flap__col { transition: transform var(--d-flap) var(--ease-std); }
.flap__sep {
  align-self: flex-end;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 800; line-height: 1.18; margin-inline: -1px;
}
.flap__unit { font-size: 1rem; font-weight: 800; }
.flap__digits:not(:has(.flap__cell)) {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Data swatches */
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw--p { background: var(--p); }
.sw--g { background: var(--g); }
.sw--c { background: var(--c); }

@media (min-width: 900px) {
  .plan__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-16); }
  .plan__receipt { justify-self: end; }
}

/* ---------- Cómo funciona ---------- */
/* One sticky phone follows the active step. Desktop: phone left, steps right.
   Mobile: phone pinned and centered under the header, steps scroll up below it. */
.how__head { margin-bottom: var(--s-10); }
.how__grid { display: grid; }
.how__stage {
  position: sticky; z-index: 1;
  top: 65px; /* header height + border */
  height: min(58svh, 520px);
  margin-inline: calc(-1 * var(--gutter));
  padding: var(--s-3) var(--gutter) var(--s-6);
  /* Steps slide under the stage: solid bg, soft fade at the bottom edge */
  background: linear-gradient(var(--bg) calc(100% - var(--s-6)), color-mix(in srgb, var(--bg) 0%, transparent));
}
.how__stage .phone {
  width: auto; max-width: none; height: 100%;
  aspect-ratio: 658 / 1409;
  margin-inline: auto;
  padding: 7px; border-radius: 40px;
}
.how__stage .phone::before { /* keeps the frame height while shots are absolute */
  content: ""; display: block; aspect-ratio: 640 / 1391;
}
.how__stage .phone__island { top: 14px; }
.how__shot {
  position: absolute; inset: 7px;
  width: auto; height: auto; aspect-ratio: auto;
  border-radius: 33px;
  opacity: 0;
  transition: opacity var(--d-swap) var(--ease-std);
}
.how__shot.is-on { opacity: 1; }
.how__steps { display: grid; }
.step {
  min-height: 34svh;
  padding-block: var(--s-6);
}
.step:last-child { min-height: calc(100svh - min(58svh, 520px) - 65px); }
.step__n {
  display: inline-block;
  margin-bottom: var(--s-3);
  color: var(--fg3);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step .h3 { margin-bottom: var(--s-3); }
.step .body { font-size: 1.0625rem; }
/* Inactive steps fade by color, not opacity, so they keep AA contrast */
.step .h3, .step .body { color: var(--fg3); transition: color var(--d-swap) var(--ease-std); }
.step.is-active .h3 { color: var(--fg); }
.step.is-active .body { color: var(--fg2); }
.step__shot { display: none; } /* fallback shots, only if the stage can't stick */

@media (min-width: 900px) {
  .how__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-16); }
  .how__stage {
    top: max(84px, calc(50vh - 330px));
    align-self: start;
    height: min(660px, calc(100vh - 104px));
    margin-inline: 0; padding: 0;
    background: none;
  }
  .how__stage .phone { max-width: 300px; padding: 9px; border-radius: 52px; }
  .how__stage .phone__island { top: 19px; }
  .how__shot { inset: 9px; border-radius: 43px; }
  .step, .step:last-child {
    min-height: 72vh;
    display: flex; flex-direction: column; justify-content: center;
    padding-block: var(--s-10);
  }
  .step .h3 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); letter-spacing: -0.03em; }
}

/* ---------- Entrena (dark band, the island color) ---------- */
.train {
  padding-block: var(--section);
  background: var(--island);
  color: var(--island-fg);
}
.train .body, .train .lines li { color: var(--island-fg2); }
.train__grid { display: grid; gap: var(--s-10); align-items: center; }
.train .h2 { color: var(--island-fg); }
.island--live {
  margin-top: var(--s-8);
  min-height: 64px;
  width: 100%; max-width: 420px;
  padding: 0 22px 0 12px;
  gap: 14px;
  background: #000;
  box-shadow: 0 0 0 1px var(--island-fill);
}
.island__timer { width: 36px; height: 36px; flex: none; transform: rotate(-90deg); }
.t-track { fill: none; stroke: var(--island-track); stroke-width: 3.5; }
.t-fill {
  fill: none; stroke: var(--island-accent); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 94.25; stroke-dashoffset: var(--off, 0);
  transition: stroke-dashoffset 1s linear;
}
.island__time { font-size: 1.5rem; font-weight: 800; }
.island__meta { color: var(--island-fg2); font-weight: 500; font-size: 0.9375rem; }
.island__link { margin-left: auto; color: var(--island-fg2); font-weight: 700; }
.lines { margin-top: var(--s-8); display: grid; gap: 0; max-width: 52ch; }
.lines li {
  padding-block: var(--s-4);
  border-top: 1px solid var(--island-fill);
  font-size: 1rem;
  line-height: 1.5;
}
.lines strong { color: var(--island-fg); font-weight: 700; }
.train__shots {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4);
  align-items: start;
  max-width: 560px; margin-inline: auto; width: 100%;
}
.train__shots .phone { max-width: none; box-shadow: 0 0 0 1px var(--island-fill); border-radius: 34px; padding: 6px; }
.train__shots .phone__screen { border-radius: 28px; }
.train__shots .phone__island { top: 12px; }
.phone--follow { margin-top: var(--s-16); }

@media (max-width: 420px) {
  .island--live { gap: 10px; padding-right: 16px; }
  .island__meta { font-size: 0.8125rem; }
}
@media (min-width: 900px) {
  .train__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-16); }
  .train__shots { gap: var(--s-6); }
  .train__shots .phone { border-radius: 46px; padding: 8px; }
  .train__shots .phone__screen { border-radius: 38px; }
  .train__shots .phone__island { top: 16px; }
}

/* ---------- Come ---------- */
.eat__grid { display: grid; gap: var(--s-10); align-items: center; }
.eat__shot { display: grid; justify-items: center; order: 2; }
.eat__copy { order: 1; }
.eat__shot .phone { max-width: 300px; }
.foods {
  width: 100%; max-width: 520px;
  margin-top: var(--s-8);
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.foods th, .foods td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; }
.foods__cap { caption-side: top; text-align: left; padding-bottom: var(--s-3); color: var(--fg3); font-size: var(--t-cap); }
.foods thead th { padding-top: 0; color: var(--fg3); font-size: var(--t-cap); font-weight: 600; }
.foods tbody th { font-weight: 700; padding-right: var(--s-4); }
.foods td { color: var(--fg2); padding-right: var(--s-3); }
.foods td.r { padding-right: 0; white-space: nowrap; }
.foods .r { text-align: right; }
.foods td.r { color: var(--fg); font-weight: 700; }
.macros { margin-top: var(--s-8); max-width: 520px; }
.macros__bar {
  display: grid; grid-template-columns: 520fr 540fr 612fr; gap: 3px;
  height: 10px;
}
.m { border-radius: 3px; }
.m--p { background: var(--p); } .m--g { background: var(--g); } .m--c { background: var(--c); }
.macros__legend {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-3);
  color: var(--fg2); font-size: 0.875rem;
}
.macros__legend li { display: inline-flex; align-items: center; gap: 7px; }
.macros__legend .num { color: var(--fg); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .macros__bar .m { transform-origin: left; transition: transform 700ms var(--ease-drama); }
  .macros:not(.is-in) .m { transform: scaleX(0); }
  .macros .m--g { transition-delay: 90ms; }
  .macros .m--c { transition-delay: 200ms; }
}
@media (min-width: 900px) {
  .eat__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-16); }
  .eat__shot { order: 1; justify-items: start; }
  .eat__copy { order: 2; }
  .eat__shot .phone { max-width: 320px; }
}

/* ---------- Sinergia ---------- */
.syn { background: var(--s1); border-top: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .syn { background: #151517; } }
.syn__head { max-width: 760px; }
.syn__head .body { margin-top: var(--s-5); }
.syn__days {
  display: grid; grid-template-columns: 1fr; gap: var(--s-3);
  margin-top: var(--s-10);
  max-width: 760px;
}
.day {
  padding: var(--s-5);
  border-radius: var(--r-card);
  background: var(--bg);
  border: 1.5px solid var(--card-border);
}
.day--on { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
.day__label { font-size: 0.875rem; font-weight: 600; opacity: 0.75; }
.day__kcal { margin-top: var(--s-2); font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); font-weight: 800; line-height: 1.05; }
.day__kcal small { font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.day__p { display: flex; align-items: center; gap: 8px; margin-top: var(--s-2); font-size: 0.9375rem; }
.day__p .num { font-weight: 800; }
.day__arrow {
  display: flex; align-items: center; justify-content: center; gap: var(--s-3);
  color: var(--fg2); font-weight: 700; font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.day__arrow span { padding: 4px 10px; border-radius: var(--r-pill); background: var(--s2); }
.day__arrow span:last-child { background: color-mix(in srgb, var(--p) 16%, transparent); color: var(--fg); }
.syn__grid { display: grid; gap: var(--s-10); margin-top: var(--s-16); align-items: start; }
.syn__steps { display: grid; counter-reset: s; }
.syn__steps li {
  display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3);
  padding-block: var(--s-5);
  border-top: 1px solid var(--line);
  font-size: 1.0625rem; line-height: 1.5; color: var(--fg2);
}
.syn__steps li:last-child { border-bottom: 1px solid var(--line); }
.syn__steps strong { color: var(--fg); }
.syn__steps .step__n { margin: 2px 0 0; }
.syn__shots {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4);
  max-width: 560px; width: 100%; margin-inline: auto;
}
.syn__shots .phone { max-width: none; border-radius: 34px; padding: 6px; }
.syn__shots .phone__screen { border-radius: 28px; }
.syn__shots .phone__island { top: 12px; }
.syn__shots .phone:last-child { margin-top: var(--s-10); }
@media (min-width: 640px) {
  .syn__days { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
  .day__arrow { flex-direction: column; gap: var(--s-2); padding-inline: var(--s-2); }
}
@media (min-width: 900px) {
  .syn__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-16); }
  .syn__shots { gap: var(--s-6); }
  .syn__shots .phone { border-radius: 46px; padding: 8px; }
  .syn__shots .phone__screen { border-radius: 38px; }
  .syn__shots .phone__island { top: 16px; }
}

/* Phone pairs collapse to one legible phone on small screens */
@media (max-width: 639px) {
  .train__shots, .syn__shots { grid-template-columns: 1fr; max-width: 300px; }
  .phone--extra { display: none; }
  .phone--follow, .syn__shots .phone:last-child { margin-top: 0; }
  .train__shots .phone, .syn__shots .phone { border-radius: 46px; padding: 8px; }
  .train__shots .phone__screen, .syn__shots .phone__screen { border-radius: 38px; }
  .train__shots .phone__island, .syn__shots .phone__island { top: 16px; }
}
/* ---------- Progreso + sellos ---------- */
.prog__grid { display: grid; gap: var(--s-10); align-items: center; }
.prog__shots { display: grid; justify-items: center; }
.prog__shots .phone { max-width: 300px; }
.stamps {
  margin-top: var(--s-10);
  max-width: 460px;
  padding: var(--s-5);
  border-radius: var(--r-card);
  background: var(--s1);
  border: 1.5px solid var(--card-border);
}
.stamps__title {
  font-family: var(--f-moment); font-weight: 800; text-transform: uppercase;
  font-size: 0.875rem; letter-spacing: 0.005em;
}
.stamps__grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  margin-top: var(--s-4);
}
.stamp {
  display: grid; place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dotted var(--mb, #C9C9D1);
  color: var(--fg3);
  font-size: 0.8125rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { .stamp { border-color: #5A5A60; } }
.stamp--full { border: 2px dashed var(--fg); background: var(--s2); color: var(--fg); }
.stamp--now { border: 2px solid var(--clay); color: var(--clay); }
.stamps__blocks {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: var(--s-3);
  color: var(--fg3); font-size: 0.75rem; font-weight: 600;
}
.stamps__blocks span { padding-top: 6px; border-top: 1.5px solid var(--line); margin-right: 10px; }
.stamps__blocks span:last-child { margin-right: 0; }
@media (prefers-reduced-motion: no-preference) {
  .stamps.is-in .stamp--full { animation: stamp 420ms var(--ease-std) both; }
  .stamps.is-in .stamp--full + .stamp--full { animation-delay: 140ms; }
  .stamps.is-in .stamp--now { animation: rise 500ms var(--ease-drama) 320ms both; }
}
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.35) rotate(-8deg); }
  60% { opacity: 1; transform: scale(0.96) rotate(0); }
  100% { transform: none; }
}
@media (min-width: 900px) {
  .prog__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-16); }
  .prog__shots { justify-items: end; }
  .prog__shots .phone { max-width: 320px; }
}

/* ---------- Gratis / Premium ---------- */
.tiers__head { margin-bottom: var(--s-10); }
.tiers__grid { display: grid; gap: var(--s-4); }
.tier {
  padding: var(--s-6);
  border-radius: var(--r-card);
  background: var(--s1);
  border: 1.5px solid var(--card-border);
}
.tier--premium { background: transparent; border: 1.5px solid var(--fg); }
.tier__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-3); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tier__note { color: var(--fg2); font-size: 0.875rem; font-weight: 600; letter-spacing: 0; }
.tier__list { margin-top: var(--s-5); }
.tier__list li {
  display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3);
  padding-block: 11px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem; line-height: 1.45;
}
.tier__list li::before {
  content: ""; width: 12px; height: 7px; margin: 6px 0 0 3px;
  border-left: 2px solid var(--fg); border-bottom: 2px solid var(--fg);
  transform: rotate(-45deg);
}
@media (min-width: 768px) { .tiers__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); } }
.tiers__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-8); }
.tiers__cta .island { min-height: 48px; }
.tiers__cta p { color: var(--fg3); font-size: 0.9375rem; }

/* Real paywall crop (price-free part of the screen) */
.paywall-crop { margin-top: var(--s-8); max-width: 520px; }
.paywall-crop picture {
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--frame-ring);
  background: var(--s2);
}
.paywall-crop img { width: 100%; height: auto; }

/* ---------- Cobro honesto: la regla ---------- */
.bill { margin-top: var(--section); padding-top: var(--s-10); border-top: 1px solid var(--line); }
.bill__title { max-width: 24ch; font-size: clamp(1.625rem, 1.15rem + 1.9vw, 2.5rem); }
.bill .body { margin-bottom: var(--s-10); }
.ruler {
  position: relative;
  height: 340px;
  margin-left: 6px;
  max-width: 520px;
}
.ruler::before { /* one long tick per day, short ticks between */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px;
  background:
    repeating-linear-gradient(to bottom, var(--fg3) 0 1.5px, transparent 1.5px calc((100% - 1.5px) / 7)) left top / 22px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc((100% - 1px) / 28)) left top / 11px 100% no-repeat;
  border-left: 1.5px solid var(--fg3);
}
.ruler__mark {
  position: absolute; left: 40px; right: 0;
  top: calc(var(--d) / 7 * 100%);
  display: grid; gap: 2px;
  transform: translateY(-11px);
}
.ruler__mark::before {
  content: ""; position: absolute; left: -47px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--fg);
}
.ruler__mark--warn::before { border-color: var(--fg); background: var(--s3); }
.ruler__mark--end::before { background: var(--fg); }
.ruler__day { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ruler__what { color: var(--fg2); font-size: 1rem; }
.bill__notes {
  display: grid; gap: 0;
  margin-top: var(--s-10);
  max-width: 760px;
  border-top: 1px solid var(--line);
}
.bill__notes li { padding-block: var(--s-3); border-bottom: 1px solid var(--line); color: var(--fg2); font-size: 0.9375rem; }

@media (min-width: 900px) {
  .ruler { height: 150px; margin-left: 0; max-width: none; }
  .ruler::before {
    left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 26px;
    border-left: 0; border-top: 1.5px solid var(--fg3);
    background:
      repeating-linear-gradient(to right, var(--fg3) 0 1.5px, transparent 1.5px calc((100% - 1.5px) / 7)) left top / 100% 26px no-repeat,
      repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc((100% - 1px) / 28)) left top / 100% 13px no-repeat;
  }
  .ruler__mark {
    top: 44px; right: auto;
    left: calc(var(--d) / 7 * 100%);
    width: 240px;
    transform: none;
  }
  .ruler__mark::before { left: -7px; top: -51px; }
  .ruler__mark--end { transform: translateX(-100%); text-align: right; }
  .ruler__mark--end::before { left: auto; right: -7px; }
  .ruler__mark--warn { transform: translateX(-50%); text-align: center; width: 220px; }
  .ruler__mark--warn::before { left: calc(50% - 7px); }
}

/* ---------- Preguntas ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__grid { display: grid; gap: var(--s-8); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 60px;
  padding-block: var(--s-4);
  font-weight: 700; font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 14px; height: 14px;
  background:
    linear-gradient(var(--fg2), var(--fg2)) center / 14px 2px no-repeat,
    linear-gradient(var(--fg2), var(--fg2)) center / 2px 14px no-repeat;
  transition: transform 220ms var(--ease-std);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--s-5); color: var(--fg2); max-width: 62ch; }
@media (min-width: 900px) { .faq__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-16); } }

/* ---------- Cierre ---------- */
.end {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.end__in { display: grid; justify-items: start; gap: var(--s-8); }
.end__title { max-width: 12ch; }
.card-app {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-4) var(--s-5); align-items: center;
  width: 100%; max-width: 620px;
  padding: var(--s-5);
  border-radius: var(--r-card);
  background: var(--s1);
  border: 1.5px solid var(--card-border);
}
.card-app__icon { width: 84px; height: 84px; border-radius: 19px; box-shadow: 0 0 0 1px var(--frame-ring); }
.card-app__name { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.25; }
.card-app__sub { margin-top: 2px; color: var(--fg2); font-size: 0.9375rem; }
.card-app__meta { margin-top: var(--s-2); color: var(--fg3); font-size: var(--t-cap); }
.card-app__state { grid-column: 1 / -1; justify-self: start; min-height: 36px; padding-inline: 12px 14px; }
@media (min-width: 640px) {
  .card-app { grid-template-columns: auto 1fr auto; }
  .card-app__icon { width: 96px; height: 96px; border-radius: 22px; }
  .card-app__state { grid-column: auto; }
}
.end__body { margin-top: calc(var(--s-4) * -1); }
.end__actions { display: grid; gap: var(--s-3); justify-items: start; }
.end__help { color: var(--fg3); font-size: var(--t-cap); max-width: 44ch; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: var(--s-8) calc(var(--s-8) + env(safe-area-inset-bottom)); }
.foot__in { display: grid; gap: var(--s-4); align-items: center; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 0 var(--s-2); margin-left: calc(var(--s-3) * -1); }
.foot__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-3);
  color: var(--fg2); font-size: 0.9375rem; text-decoration: none;
}
.foot__nav a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot__meta { color: var(--fg3); font-size: var(--t-cap); }
@media (min-width: 900px) {
  .foot__in { grid-template-columns: auto 1fr auto; gap: var(--s-8); }
  .foot__nav { margin-left: 0; }
}

/* ---------- Reduced motion: replace movement with nothing or a fade ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .how__shot { transition: opacity 200ms linear !important; }
}

/* ---------- Print ---------- */
@media print {
  .top, .phone__toggle, video { display: none; }
  body { background: #fff; color: #000; }
}
