/* Mismos colores y letras que la app (apps/mobile/src/theme.ts). Las letras vienen de Google Fonts. */
:root {
  --bg: #050506; --surface: #141416; --surface2: #1E1E21; --line: #232326;
  --text: #F5F5F3; --soft: #D6D6D3; --muted: #A8A8AD; --dim: #6C6C71;
  --accent: #1E3A8A; --accent-text: #8BA2E0; --navy: #0A1532; --warning: #F2B544; --ok: #3DDC97;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--soft); font: 400 16px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
/* Grano fino encima de todo, como la foto del login de la app */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }
.kicker { font: 600 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); }

/* ── Barra superior ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(5, 5, 6, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font: 400 21px/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.top nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--text); background: var(--surface2); }

/* ── Portada ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/img/gym.jpg') center 30% / cover; opacity: .55; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--bg) 8%, rgba(5, 5, 6, .82) 45%, rgba(5, 5, 6, .55) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(5, 5, 6, 0) 40%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding-block: clamp(48px, 9vw, 104px) 0; }
.hero-copy { display: grid; gap: 22px; padding-bottom: clamp(48px, 9vw, 104px); }
.wordmark { font: 400 clamp(84px, 15vw, 172px)/.84 var(--display); text-transform: uppercase; color: var(--text); margin: 0; letter-spacing: -.005em; }
.wordmark em { font-style: normal; color: var(--accent-text); display: block; }
.lede { font-size: clamp(18px, 2.1vw, 22px); line-height: 1.45; color: var(--soft); max-width: 30ch; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li { font: 500 13px/1 var(--body); color: var(--soft); background: rgba(30, 30, 33, .8); border: 1px solid rgba(255, 255, 255, .07); padding: 9px 13px; border-radius: 999px; }
.soon { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.soon::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 151, .15); }

.phones { position: relative; height: clamp(440px, 52vw, 600px); align-self: end; }
.phone { position: absolute; width: clamp(200px, 22vw, 268px); padding: 6px; border-radius: 40px; background: #0c0c0e;
  box-shadow: 0 0 0 1.5px #2c2c31, 0 40px 90px rgba(0, 0, 0, .65); }
.phone img { width: 100%; height: auto; border-radius: 34px; }
.phone::after { content: ''; position: absolute; top: 15px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #000; }
.phone.front { left: 4%; top: 6%; z-index: 2; }
.phone.back { right: 0; top: 22%; transform: rotate(4deg); opacity: .9; }
.glow { position: absolute; z-index: 0; left: 10%; top: 30%; width: 80%; height: 60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(30, 58, 138, .7), rgba(30, 58, 138, 0)); filter: blur(10px); }

/* Entrada: una sola secuencia al cargar */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-copy > *, .phone { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .06s; } .hero-copy > :nth-child(3) { animation-delay: .14s; }
.hero-copy > :nth-child(4) { animation-delay: .22s; } .hero-copy > :nth-child(5) { animation-delay: .3s; }
.phone.front { animation-delay: .2s; } .phone.back { animation-name: rise-tilt; animation-delay: .34s; }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(30px) rotate(4deg); } to { opacity: .9; transform: rotate(4deg); } }

/* ── Secciones de la portada ────────────────────────────────── */
.block { padding-block: clamp(56px, 8vw, 96px) 0; display: grid; gap: 28px; }
.block-head { display: grid; gap: 10px; }
.block h2 { font: 400 clamp(34px, 5vw, 52px)/1 var(--display); text-transform: uppercase; color: var(--text); margin: 0; text-wrap: balance; }
.block-head p { margin: 0; color: var(--muted); max-width: 60ch; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.plan { background: var(--surface); border-radius: 18px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.plan.featured { background: linear-gradient(160deg, #1E3A8A 0%, #0A1532 75%); }
.plan h3 { margin: 0; font: 400 30px/1 var(--display); text-transform: uppercase; color: var(--text); }
.plan .price { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.plan.featured .price { color: #C9D6FF; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 15px; }
.plan li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; align-items: baseline; }
.plan li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--accent-text); transform: translateY(-1px); }
.plan.featured li::before { background: #fff; }

.support { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.mailcard { background: var(--surface); border-radius: 18px; padding: clamp(22px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.mailcard .addr { font: 600 clamp(20px, 2.6vw, 28px)/1.2 var(--body); color: var(--text); overflow-wrap: anywhere; text-decoration: none; }
.mailcard p { margin: 0; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { font: 600 14px/1 var(--body); border: 0; border-radius: 999px; padding: 13px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: var(--surface2); color: var(--text); }
.btn.done { background: var(--ok); color: #06210F; }
.docs { display: grid; gap: 8px; }
.docs a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--text); font-weight: 600; transition: background .15s; }
.docs a:hover { background: var(--surface2); }
.docs a small { grid-column: 1; color: var(--muted); font-weight: 400; font-size: 14px; }
.docs a::after { content: '→'; grid-column: 2; grid-row: 1 / span 2; color: var(--accent-text); font-size: 18px; }

/* ── Documentos legales ─────────────────────────────────────── */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-block: clamp(40px, 6vw, 72px) 0; }
.toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 4px; }
.toc .kicker { margin-bottom: 10px; color: var(--dim); }
.toc a { display: grid; grid-template-columns: 26px 1fr; color: var(--muted); text-decoration: none; font-size: 14px; padding: 6px 0; line-height: 1.35; }
.toc a span { font: 600 12px/1.6 var(--mono); color: var(--dim); }
.toc a:hover { color: var(--text); }
article { max-width: 68ch; min-width: 0; }
article h1 { font: 400 clamp(48px, 8vw, 84px)/.92 var(--display); text-transform: uppercase; color: var(--text); margin: 14px 0 24px; text-wrap: balance; }
.meta { background: var(--surface); border-radius: 14px; padding: 16px 18px; color: var(--soft); font-size: 15px; margin: 0 0 8px; }
.meta b { color: var(--text); font-weight: 600; }
.draft { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(242, 181, 68, .35); background: rgba(242, 181, 68, .08); color: var(--warning); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0 0 16px; }
.draft::before { content: '!'; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--warning); color: var(--bg); font: 700 13px/20px var(--body); text-align: center; }
article section { padding-top: 36px; }
article h2 { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; margin: 0 0 12px; color: var(--text); font: 600 21px/1.3 var(--body); letter-spacing: -.01em; }
article h2 span { font: 600 13px/1 var(--mono); color: var(--accent-text); }
article p, article ul, article ol { margin: 0 0 12px; padding-left: 44px; }
article ul, article ol { padding-left: 64px; }
article li { margin: 6px 0; }
article li::marker { color: var(--dim); }
article ol li::marker { font: 600 13px var(--mono); color: var(--accent-text); }
article b { color: var(--text); font-weight: 600; }

/* ── Pie ────────────────────────────────────────────────────── */
footer { margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-block: 28px 40px; color: var(--dim); font-size: 13px; }
footer .fbrand { font: 400 16px/1 var(--display); letter-spacing: .03em; color: var(--muted); margin-right: auto; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── Celular ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-bottom: 8px; }
  .phones { height: 420px; }
  .phone { width: 196px; }
  .phone.front { left: calc(50% - 170px); top: 24px; }
  .phone.back { right: calc(50% - 170px); top: 70px; }
  .plans, .support { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .top nav a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 520px) {
  .top .wrap { flex-wrap: wrap; gap: 4px 12px; padding-block: 10px 6px; }
  .top nav { width: 100%; margin-inline: -9px; }
  article p, article h2 { padding-left: 0; }
  article h2 { grid-template-columns: 34px 1fr; }
  article p { padding-left: 0; }
  article ul, article ol { padding-left: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *, .phone { animation: none; }
}
