/* Landing de BeMyFit. Dirección «el marco se queda, la pantalla cambia»: el móvil con la app real ocupa siempre el
   mismo sitio y cada paso de la semana cambia lo que enseña. Colores y fuentes: tokens.css (paleta A en oscuro, E en
   claro); el acento sólido solo en la acción principal y en tinte lo seleccionado. Aquí, solo la escala de la portada. */
body {
  --step-small: 0.9375rem; --step-body: 1.0625rem;
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.625rem);
  --step-head: clamp(1.85rem, 1rem + 3.6vw, 4.25rem);
  --step-display: clamp(2.9rem, 1rem + 7.6vw, 7.75rem);
  --margin: clamp(16px, 2.4vw, 32px); --gap-section: clamp(96px, 15vh, 190px);
  --radius: 28px; --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.035em; line-height: 1; text-wrap: balance; }
h2 { font-size: var(--step-head); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--margin); }
.section { padding-top: var(--gap-section); }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; }
.soft { color: var(--muted); }
.small { font-size: var(--step-small); }
.skip { position: absolute; left: var(--margin); top: -80px; z-index: 10; padding: 12px 18px; background: var(--accent); color: var(--on-accent); border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Botón: una sola forma (píldora), como en la app */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 14px 28px; font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--on-accent); background: var(--accent); border: 0; border-radius: 999px; cursor: pointer; transition: transform 160ms var(--ease), filter 160ms var(--ease); }
.btn:hover { filter: brightness(1.07); transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-small { min-height: 44px; padding: 8px 20px; font-size: var(--step-small); }
.text-link { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

/* Barra */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.brand img:first-child { width: 40px; height: 40px; border-radius: 10px; }
.brand img:last-child { width: auto; height: 26px; }
.bar-nav { display: flex; gap: 4px 28px; margin-left: auto; }
.bar-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-weight: 500; text-decoration: none; transition: color 160ms var(--ease); }
.bar-nav a:hover { color: var(--ink); }

/* Móvil con la app real: mismo marco en toda la página */
.phone { padding: 7px; background: var(--surface-high); border-radius: 34px; line-height: 0; overflow: hidden; }
.phone picture, .footer picture { display: block; }
.phone img { width: 100%; border-radius: 27px; background: var(--ground); }

/* Portada */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 48px); align-items: stretch; padding-top: clamp(8px, 2vh, 24px); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: clamp(20px, 3vh, 32px); padding-block: clamp(16px, 4vh, 56px); }
.hero h1 { font-size: var(--step-display); line-height: 0.92; letter-spacing: -0.045em; }
.hero h1 span { display: block; }
/* Una palabra en el acento, como en las tarjetas de Play: lima en oscuro; medianoche con rotulador lima en claro. */
.hero h1 em { font-style: normal; color: var(--em-color); background: var(--em-mark); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero-stage { position: relative; min-height: min(720px, calc(100svh - 110px)); background: var(--surface); border-radius: 36px; overflow: hidden; }
.hero-stage .phone { position: absolute; }
.hero-stage .phone-a { z-index: 1; left: 5%; top: 6%; width: 56%; }
.hero-stage .phone-b { right: 4%; top: 30%; width: 44%; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-14px); } }
.hero-copy > * { animation: rise 800ms var(--ease) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 80ms; }
.hero-copy > :nth-child(3) { animation-delay: 160ms; }
.hero-copy > :nth-child(4) { animation-delay: 240ms; }
.hero-stage .phone-a { animation: rise 900ms var(--ease) 120ms backwards; }
.hero-stage .phone-b { animation: rise 900ms var(--ease) 260ms backwards, drift 5s ease-in-out 1.2s infinite alternate; }

/* Paso a paso: cada móvil se queda fijo mientras pasa su texto */
.steps-head { display: grid; gap: 20px; max-width: 900px; }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); align-items: start; min-height: 92svh; padding-top: 10svh; }
.step .phone { --ph: min(360px, 37svh); position: sticky; top: calc(50svh - var(--ph) * 1.11); width: var(--ph); justify-self: center; }
.step-copy { position: sticky; top: 24svh; display: grid; gap: 20px; padding-bottom: 12svh; }
.step h3 { font-size: var(--step-head); }
.step-copy p { max-width: 46ch; }
.facts { display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 26px; }
.facts li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--outline); }

/* Rutinas desde una foto: un campo de superficie con la hoja y su lectura */
.photo { margin-top: var(--gap-section); padding-block: clamp(56px, 9vh, 120px); background: var(--surface); }
.photo h2 { margin-bottom: clamp(28px, 5vh, 56px); }
.photo-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.photo-copy { display: grid; gap: 22px; justify-items: start; }
.photo-copy p { max-width: 44ch; }
.photo-copy .facts li::before { background: var(--ground); }
.reading { position: relative; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(12px, 2vw, 28px); align-items: center; }
.sheet { transform: rotate(-3deg); border-radius: 10px; overflow: hidden; line-height: 0; }
.review { display: grid; gap: 8px; padding: clamp(14px, 1.6vw, 22px); background: var(--ground); border-radius: var(--radius); }
.review-title { font-family: var(--font-brand); font-weight: 700; font-size: 1.125rem; padding: 4px 6px 8px; }
.review li { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border-radius: 16px; }
.review-name { font-weight: 600; line-height: 1.25; }
.review-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--step-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.state.near::before { background: var(--accent); }

/* Grupos: la semana de la app, tocable */
.groups { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.groups-copy { display: grid; gap: 22px; justify-items: start; }
.groups-copy p { max-width: 44ch; }
.league { display: grid; gap: 16px; padding: clamp(18px, 2.2vw, 30px); background: var(--surface); border-radius: var(--radius); }
.league-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.league-title { font-family: var(--font-brand); font-weight: 700; font-size: var(--step-lead); }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(4px, 0.8vw, 10px); }
.day { min-height: 60px; padding: 0; font: inherit; font-family: var(--font-brand); font-weight: 700; color: var(--muted); background: var(--surface-high); border: 0; border-radius: 16px; cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 140ms var(--ease); }
.day:hover { color: var(--ink); }
.day:active { transform: scale(0.94); }
.day[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-tint); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.rank { display: grid; gap: 8px; }
.rank li { position: relative; display: grid; grid-template-columns: 2.4em 1fr auto; align-items: center; gap: 10px; min-height: 52px; padding: 8px 16px; background: var(--surface-high); border-radius: 16px; font-variant-numeric: tabular-nums; overflow: hidden; transition: transform 320ms var(--ease); }
.rank li > * { position: relative; }
.rank li::before { content: ""; position: absolute; inset: 0; background: var(--outline); transform-origin: left; transform: scaleX(var(--share, 0)); transition: transform 320ms var(--ease); }
.rank .pos { font-family: var(--font-brand); font-weight: 700; }
.rank .who { font-weight: 600; }
.rank .me { color: var(--accent-text); }
.rank li.is-me::before { background: var(--accent-tint); }
.league-out { font-family: var(--font-brand); font-weight: 700; font-size: var(--step-lead); letter-spacing: -0.02em; }

/* Planes: una tabla de verdad */
.plans-head { display: grid; gap: 20px; margin-bottom: clamp(28px, 5vh, 56px); }
.plans { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.plans th, .plans td { padding: 16px clamp(8px, 1.4vw, 20px); text-align: left; vertical-align: middle; font-weight: 400; }
.plans thead th { font-family: var(--font-brand); font-weight: 700; font-size: var(--step-lead); letter-spacing: -0.02em; padding-bottom: 20px; }
.plans tbody th { width: 34%; font-weight: 600; }
.plans tbody tr:nth-child(odd) > * { background: var(--surface); }
.plans tbody tr > :first-child { border-radius: 16px 0 0 16px; }
.plans tbody tr > :last-child { border-radius: 0 16px 16px 0; }
.plans .price td { font-family: var(--font-brand); font-weight: 700; font-size: var(--step-lead); }
.plans .no { color: var(--muted); }
.plans-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px clamp(24px, 4vw, 64px); margin-top: clamp(28px, 5vh, 48px); }
.plans-notes p { max-width: 60ch; }

/* Privacidad */
.privacy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.privacy-copy { display: grid; gap: 22px; justify-items: start; }
.promises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px) clamp(24px, 4vw, 64px); }
.promises dt { font-family: var(--font-brand); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px; }
.promises dd { margin: 0; color: var(--muted); }

/* Preguntas: índice a la izquierda, una respuesta a la derecha */
.faq-head { margin-bottom: clamp(28px, 5vh, 56px); }
.qa h3 { font-family: var(--font-text); font-size: var(--step-body); font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.qa button { display: flex; align-items: flex-start; gap: 14px; width: 100%; min-height: 48px; padding: 12px 0; font: inherit; font-weight: 600; text-align: left; color: var(--muted); background: none; border: 0; cursor: pointer; transition: color 160ms var(--ease); }
.qa button::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.45em; border-radius: 50%; background: var(--outline); transition: background-color 160ms var(--ease), transform 160ms var(--ease); }
.qa button:hover { color: var(--ink); }
.qa.on button { color: var(--ink); }
.qa.on button::before { background: var(--accent); transform: scale(1.2); }
.qa .a { padding: 0 0 20px 24px; max-width: 60ch; }
.qa .a a { color: var(--ink); }
.js .qa .a { display: none; }
.js .qa.on .a { display: block; animation: rise 260ms var(--ease) backwards; }

/* Cierre: toda la banda es el botón */
.band-wrap { margin-top: var(--gap-section); }
.band { position: relative; display: grid; grid-template-rows: auto 1fr; min-height: clamp(320px, 56svh, 620px); padding: clamp(20px, 2.6vw, 36px) clamp(20px, 2.6vw, 36px) 0; color: var(--on-accent); background: var(--accent); border-radius: 36px 36px 0 0; text-decoration: none; overflow: hidden; transition: background-color 120ms linear, color 120ms linear; }
.band:hover, .band:focus-visible { background: var(--accent-hover); }
.band:focus-visible { outline-offset: -6px; outline-color: var(--on-accent); }
.band-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.band h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.2; max-width: 22ch; }
.band svg { width: clamp(36px, 4vw, 56px); height: auto; flex: none; transition: transform 200ms var(--ease); }
.band:hover svg { transform: translate(6px, -6px); }
.band-word { align-self: end; font-family: var(--font-brand); font-weight: 700; font-size: clamp(4.4rem, 23.5vw, 21.5rem); letter-spacing: -0.06em; line-height: 0.78; margin-left: -0.04em; white-space: nowrap; }

/* Pie */
.footer { background: var(--surface); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; padding-block: clamp(48px, 8vh, 96px) clamp(32px, 5vh, 56px); }
.footer-contact { display: grid; gap: 8px; align-content: start; font-family: var(--font-brand); font-weight: 600; font-size: var(--step-lead); letter-spacing: -0.02em; }
.footer-contact p + p { font-family: var(--font-text); font-weight: 400; font-size: var(--step-body); letter-spacing: 0; color: var(--muted); }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-links div { display: grid; align-content: start; }
.footer-links p { color: var(--muted); margin-bottom: 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-last { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: var(--step-small); }
.footer-mark { width: 100%; margin: clamp(24px, 4vh, 48px) 0 -5.5%; }

/* Entradas: solo con JS (sin JS todo está visible) */
.js .rv { opacity: 0; transform: translateY(26px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }

@media (min-width: 901px) {
  .js .faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(32px, 5vw, 96px); }
  .js .qa { display: contents; }
  .js .qa h3 { grid-column: 1; }
  .js .qa .a { grid-column: 2; grid-row: 1 / span 9; align-self: start; position: sticky; top: 96px; padding: 0; font-size: var(--step-lead); line-height: 1.4; max-width: 40ch; }
}

@media (max-width: 900px) {
  .bar-nav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; gap: 4px 12px; }
  .bar .btn-small { margin-left: auto; }
  .hero, .photo-grid, .groups, .privacy, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-block: 20px 8px; }
  .hero-stage { min-height: 0; height: min(118vw, 520px); border-radius: 28px; }
  .hero-stage .phone-a { left: 6%; top: 6%; width: 56%; }
  .hero-stage .phone-b { right: 5%; top: 24%; width: 46%; }
  .step { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 72px; gap: 24px; }
  .step-copy { position: static; padding-bottom: 0; }
  .step .phone { position: static; order: 2; width: min(100%, 340px); justify-self: start; aspect-ratio: 4 / 5; }
  .step .phone img { height: 100%; object-fit: cover; object-position: top; border-radius: 27px 27px 0 0; }
  .step .phone { padding-bottom: 0; border-radius: 34px 34px 0 0; }
  .promises { gap: 28px 24px; }
}
@media (max-width: 720px) {
  .plans, .plans thead, .plans tbody { display: block; }
  .plans tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .plans thead th:first-child { display: none; }
  .plans thead tr { position: sticky; top: 0; z-index: 1; background: var(--ground); }
  .plans thead th { font-size: 1.0625rem; padding: 12px 8px; }
  .plans tbody th { grid-column: 1 / -1; width: auto; padding: 14px 8px 2px; border-radius: 16px 16px 0 0 !important; }
  .plans td { padding: 6px 8px 14px; font-size: var(--step-small); }
  .plans tbody tr > td:nth-child(2) { border-radius: 0 0 0 16px; }
  .plans tbody tr > :last-child { border-radius: 0 0 16px 0; }
  .plans .price td { font-size: 1.0625rem; }
  .reading { grid-template-columns: minmax(0, 1fr); }
  .sheet { width: 62%; justify-self: center; margin-bottom: -40px; position: relative; z-index: 1; }
  .review { padding-top: 52px; }
  .band { border-radius: 28px 28px 0 0; }
}
@media (max-width: 520px) {
  .promises { grid-template-columns: minmax(0, 1fr); }
  .league { padding: 14px; }
  .days { gap: 3px; }
  .hero-actions, .hero-actions .btn { width: 100%; }
  .hero-actions .text-link { display: none; }
  .footer-mark { margin-bottom: -5%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}
