/* ZGym · web de presentación
   Paleta tomada de la app: fondo #020617, superficies #0f172a / #1e293b, azul de acción #2563eb. */

@font-face { font-family: "Big Shoulders Display"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("../fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-style: normal; font-display: swap;
  src: url("../fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-style: normal; font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bg: #020617;
  --bg-soft: #070d1f;
  --panel: #0f172a;
  --panel-2: #1e293b;
  --line: #1e293b;
  --line-hi: #334155;
  --text: #e2e8f0;
  --text-hi: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-hi: #3b82f6;
  --sky: #38bdf8;
  --green: #34d399;
  --amber: #fbbf24;
  --violet: #a855f7;
  --radius: 14px;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --header-h: 64px;
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: #7dd3fc; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; color: var(--text-hi); line-height: .98; margin: 0; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }

/* ───────── Cabecera ───────── */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgb(2 6 23 / .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-hi); font: 900 1.7rem/1 var(--display); letter-spacing: .02em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.main-nav a:hover { background: var(--panel); color: var(--text-hi); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 600 1rem/1 var(--body); padding: 14px 22px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 30px -8px rgb(37 99 235 / .7); }
.btn-primary:hover { background: #1d4ed8; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: var(--panel); border-color: var(--line-hi); color: var(--text-hi); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text-hi); }
.btn-sm { padding: 10px 16px; font-size: .92rem; }
.menu-toggle { display: none; margin-left: auto; background: var(--panel); border: 1px solid var(--line-hi); color: var(--text-hi); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; margin: auto; }

/* ───────── Hero ───────── */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 8vw, 110px); isolation: isolate; }
.hero::before { /* resplandor de la cubierta */
  content: ""; position: absolute; z-index: -2; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgb(37 99 235 / .38), transparent 70%); }
.hero-grid { position: absolute; inset: 0; z-index: -2; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(100deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 100%); }
.hero-line { position: absolute; z-index: -1; right: 0; bottom: 0; width: min(78%, 980px); height: 78%; opacity: .9; pointer-events: none; }
.hero-line path { fill: none; stroke: var(--blue-hi); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s .4s cubic-bezier(.3,.7,.2,1) forwards; filter: drop-shadow(0 0 10px rgb(59 130 246 / .8)); }
.hero-line circle { fill: var(--sky); opacity: 0; animation: pop .5s forwards; filter: drop-shadow(0 0 8px rgb(56 189 248 / .9)); }
.hero-line circle:nth-of-type(1) { animation-delay: 1.2s; } .hero-line circle:nth-of-type(2) { animation-delay: 1.7s; } .hero-line circle:nth-of-type(3) { animation-delay: 2.2s; } .hero-line circle:nth-of-type(4) { animation-delay: 2.7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(3.4rem, 8.4vw, 6.4rem); line-height: .9; }
.hero .lead { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--text); max-width: 34em; margin: 26px 0 30px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 30px; color: var(--muted); font-size: .95rem; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgb(15 23 42 / .8); border: 1px dashed var(--line-hi); color: var(--text); font-size: .9rem; font-weight: 500; }
.badge svg { width: 18px; height: 18px; }
.badge b { color: var(--amber); font-weight: 600; }

/* ───────── Teléfono ───────── */
.phone { position: relative; width: min(100%, 320px); aspect-ratio: 390 / 844; margin-inline: auto; padding: 9px; border-radius: 44px;
  background: linear-gradient(160deg, #1e293b, #0b1224 60%); border: 1px solid #334155;
  box-shadow: 0 40px 90px -30px rgb(37 99 235 / .55), 0 0 0 1px #020617 inset, 0 30px 60px -20px #000; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); }
.phone-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s ease; }
.phone-screen img.is-active { opacity: 1; }
.hero .phone { transform: rotate(2.5deg); }

/* ───────── Cifras ───────── */
.facts { border-block: 1px solid var(--line); background: var(--bg-soft); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 28px 24px; border-left: 1px solid var(--line); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts strong { display: block; font: 900 clamp(2.4rem, 4.6vw, 3.6rem)/1 var(--display); color: var(--text-hi); }
.facts span { color: var(--muted); font-size: .98rem; }

/* ───────── Secciones ───────── */
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.section-head p { color: var(--muted); font-size: 1.15rem; margin-top: 18px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.pillars h3 { font-size: 2rem; margin-bottom: 12px; }
.pillars p { color: var(--muted); }

/* ───────── Índice de capítulos (pegajoso) ───────── */
.chapter-nav { position: sticky; top: var(--header-h); z-index: 40; background: rgb(2 6 23 / .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); height: var(--nav-h); }
.chapter-nav .wrap { height: 100%; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chapter-nav .wrap::-webkit-scrollbar { display: none; }
.chapter-nav a { flex: none; color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; }
.chapter-nav a:hover { color: var(--text-hi); background: var(--panel); }
.chapter-nav a[aria-current="true"] { color: #fff; background: var(--blue); }

/* ───────── Capítulos ───────── */
.chapter { padding: clamp(56px, 8vw, 104px) 0 clamp(20px, 4vw, 48px); border-top: 1px solid var(--line); }
.chapter-nav + .chapter { border-top: 0; }
.chapter-head { max-width: 46rem; margin-bottom: clamp(24px, 4vw, 48px); }
.chapter-head h2 { font-size: clamp(3rem, 7.5vw, 6rem); }
.chapter-head p { color: var(--muted); font-size: 1.15rem; margin-top: 16px; }
.chapter-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 96px); align-items: start; }
.features { display: flex; flex-direction: column; }
.feature { position: relative; padding: 4px 0 clamp(36px, 7vh, 72px) 28px; border-left: 2px solid var(--line); transition: border-color .25s; scroll-margin-top: calc(var(--header-h) + var(--nav-h) + 24px); }
.feature:last-child { padding-bottom: 8px; }
.feature.is-active { border-left-color: var(--blue-hi); }
.feature h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; color: var(--text-hi); }
.feature p { color: var(--text); max-width: 38em; }
.feature p:last-child { margin-bottom: 0; }
.feature ul { margin: 0 0 1em; padding-left: 1.2em; color: var(--text); max-width: 38em; }
.feature li { margin-bottom: .35em; }
.feature li::marker { color: var(--blue-hi); }
.feature .tag { display: inline-block; font: 600 .78rem/1 var(--body); padding: 5px 9px; border-radius: 6px; margin-bottom: 10px; background: rgb(168 85 247 / .16); color: #d8b4fe; border: 1px solid rgb(168 85 247 / .35); }
.feature .tag.soft { background: rgb(56 189 248 / .12); color: var(--sky); border-color: rgb(56 189 248 / .3); }
.feature .note { color: var(--muted); font-size: .94rem; }
.feature-shot { display: block; height: auto; width: min(100%, 300px); margin: 18px 0 0; border-radius: 26px; border: 1px solid var(--line-hi); box-shadow: 0 24px 60px -24px rgb(37 99 235 / .5); }
.phone-col { position: sticky; top: calc(var(--header-h) + var(--nav-h) + 24px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.phone-col .phone { width: 300px; }
.phone-cap { margin: 0; text-align: center; font-size: .92rem; color: var(--muted); min-height: 3em; max-width: 300px; }
.phone-cap em { color: #d8b4fe; font-style: normal; }
.chapter-extra { margin-top: clamp(28px, 4vw, 44px); padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); max-width: 52rem; }
.chapter-extra h3 { font-size: 1.6rem; margin-bottom: 8px; }
.chapter-extra p { color: var(--muted); margin: 0; }

/* Todo lo demás */
.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); }
.more div { padding: 20px 0; border-top: 1px solid var(--line); }
.more h3 { font-size: 1.6rem; margin-bottom: 6px; }
.more p { color: var(--muted); margin: 0; }

/* ───────── Móvil próximamente / autoalojar ───────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.soon-box { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.store { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-radius: 14px; border: 1px dashed var(--line-hi); background: var(--panel); min-width: 210px; }
.store svg { width: 30px; height: 30px; flex: none; color: var(--text-hi); }
.store small { display: block; color: var(--amber); font-weight: 600; font-size: .82rem; line-height: 1.2; }
.store strong { font: 800 1.45rem/1.1 var(--display); color: var(--text-hi); letter-spacing: .02em; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font: 800 1.2rem/1 var(--display); }
.steps li::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps strong { color: var(--text-hi); }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 2px 7px; border-radius: 6px; color: #bae6fd; }
.credits { color: var(--muted); font-size: .96rem; }
.credits li { margin-bottom: .5em; }

/* ───────── Pie ───────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: clamp(40px, 6vw, 72px) 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font: 800 1.3rem/1 var(--display); margin-bottom: 14px; letter-spacing: .03em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-grid a { color: var(--text); text-decoration: none; }
.foot-grid a:hover { color: var(--sky); text-decoration: underline; }
.foot-brand p { color: var(--muted); max-width: 26em; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Páginas legales / 404 */
.doc { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 110px); }
.doc .wrap { max-width: 780px; }
.doc h1 { font-size: clamp(2.8rem, 8vw, 5rem); margin-bottom: 8px; }
.doc .updated { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 1.9rem; margin: 40px 0 10px; }
.doc ul { padding-left: 1.2em; } .doc li { margin-bottom: .4em; }
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px var(--gutter); }
.notfound h1 { font-size: clamp(6rem, 24vw, 14rem); line-height: .8; color: var(--blue-hi); }
.notfound p { color: var(--muted); font-size: 1.2rem; margin: 22px 0 28px; }

/* ───────── Responsive ───────── */
@media (max-width: 1020px) {
  .chapter-body { grid-template-columns: minmax(0, 1fr); }
  .phone-col { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-line { width: 100%; height: 38%; }
  .hero .phone { width: min(78%, 300px); margin-top: 20px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .facts ul { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .main-nav { position: absolute; top: var(--header-h); left: 0; right: 0; margin: 0; flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 12px; font-size: 1.05rem; }
  .pillars, .more, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; text-align: center; }
  .cta-row .btn { flex: 1 1 100%; }
  .feature { padding-left: 18px; }
}
@media (min-width: 1021px) {
  .js .feature-shot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .hero-line path { stroke-dashoffset: 0; }
  .hero-line circle { opacity: 1; }
}
