/* GymTracker · web de presentación */
:root {
    --ink: #0E1420;
    --ink-2: #161E2E;
    --ink-line: #2B3447;
    --ink-line-2: #3A4356;
    --paper: #F5F6F2;
    --paper-2: #E9ECE4;
    --card: #FFFFFF;
    --line: #E1E3DC;
    --text: #0E1420;
    --text-2: #4A5263;
    --text-3: #596274;
    --on-ink: #F5F6F2;
    --on-ink-2: #C9CED8;
    --on-ink-3: #9AA3B5;
    --accent: #C6F432;
    --danger: #8A3B12;
    --radius: 20px;
    --display: "Space Grotesk", system-ui, sans-serif;
    --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.55; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.dark { background: var(--ink); color: var(--on-ink); }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.dark .eyebrow { color: var(--on-ink-3); }
.h2 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -0.01em; }
.section { padding: 96px 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; margin-bottom: 40px; }
.muted { color: var(--text-2); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { filter: brightness(1.05); }
.btn-outline-light { border-color: var(--ink-line-2); color: var(--on-ink); }
.btn-outline-light:hover { border-color: var(--on-ink-3); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 54px; font-size: 17px; }

/* ---------- Cabecera ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--ink); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--ink-line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--on-ink-2); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--on-ink); }
.nav-links .btn { min-height: 44px; padding: 0 20px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--ink-line-2); color: var(--on-ink); width: 44px; height: 44px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }

@media (max-width: 820px) {
    .menu-toggle { display: inline-flex; }
    .nav { flex-wrap: wrap; }
    .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 0 20px; }
    .nav-links.open { display: flex; }
    .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--ink-line); }
    .nav-links .btn { margin-top: 12px; }
}

/* ---------- Portada ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding: 72px 24px 96px; }
.hero-copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.pill { align-self: flex-start; border: 1px solid var(--ink-line); color: var(--on-ink-2); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero-lead { font-size: 19px; color: var(--on-ink-2); max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: var(--on-ink-3); list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 8px; }

.hero-visual { flex: 1 1 420px; min-width: 0; position: relative; display: flex; justify-content: center; padding: 10px 0 40px; }
.phone { width: 290px; background: var(--paper); color: var(--ink); border-radius: 38px; border: 8px solid #222B3C; padding: 22px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.phone-head { display: flex; justify-content: space-between; align-items: baseline; }
.phone-head b { font-family: var(--display); font-size: 18px; }
.phone-head span { font-size: 12px; color: var(--text-3); }
.ex-card { background: var(--card); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ex-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; }
.delta { font-size: 12px; font-weight: 700; color: #0E6B3A; background: #DDF5E6; padding: 2px 8px; border-radius: 999px; }
.set-row { display: grid; grid-template-columns: 30px repeat(3, minmax(0, 1fr)); gap: 6px; font-size: 13px; align-items: center; }
.set-row.head { font-size: 11px; color: var(--text-3); font-weight: 600; }
.set-badge { background: #E7E9E3; border-radius: 6px; text-align: center; font-weight: 700; }
.set-badge.warm { background: #F2C94C; }
.record { font-size: 12px; color: #7A5300; background: #FFF3D1; border-radius: 8px; padding: 6px 8px; font-weight: 600; }
.rest { background: var(--ink); color: var(--on-ink); border-radius: 16px; padding: 14px; display: flex; justify-content: space-between; align-items: center; }
.rest small { display: block; font-size: 11px; color: var(--on-ink-3); }
.rest b { font-family: var(--display); font-size: 26px; }
.rest span { font-size: 12px; color: var(--on-ink-3); }
.web-card { position: absolute; right: 0; bottom: 0; width: 250px; background: var(--card); color: var(--ink); border-radius: 18px; padding: 16px; box-shadow: 0 24px 50px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 10px; }
.web-card small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.web-card b { font-family: var(--display); font-size: 16px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bar-row div:first-child { display: flex; justify-content: space-between; }
.bar { height: 6px; background: #E7E9E3; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
@media (max-width: 560px) {
    .web-card { position: static; width: 100%; max-width: 290px; margin-top: 16px; }
    .hero-visual { flex-direction: column; align-items: center; }
}

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-feat { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
@media (max-width: 400px) { .grid-feat, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 20px; }
.card p { color: var(--text-2); }
.before { font-size: 14px; color: var(--danger); font-weight: 600; }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; }
.banner { margin-top: 20px; border-radius: 24px; padding: 32px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.banner p { font-family: var(--display); font-size: 24px; font-weight: 600; max-width: 760px; }

/* ---------- Pasos ---------- */
.steps-bg { background: var(--paper-2); }
.step { display: flex; flex-direction: column; gap: 12px; }
.step-n { font-family: var(--display); font-weight: 700; font-size: 56px; line-height: 1; }
.step h3 { font-size: 20px; }
.step p { color: var(--text-2); }

/* ---------- Cliente / entrenador ---------- */
.side { border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 18px; }
.side.light { background: var(--card); border: 1px solid var(--line); }
.side h3 { font-family: var(--display); font-size: 28px; line-height: 1.15; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 10px; }
.ticks svg { flex-shrink: 0; margin-top: 2px; }
.side.light .ticks { color: #2B3447; }
.side.dark .ticks { color: #D5D9E1; }

/* ---------- CrossFit ---------- */
.cf { background: var(--accent); color: var(--ink); border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.cf-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cf-copy .eyebrow { color: var(--ink); font-weight: 700; }
.cf-copy h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.cf-copy p { font-size: 18px; max-width: 520px; }
.cf-tiles { flex: 1 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.tile.dark small { color: var(--on-ink-3); }
.tile small { font-size: 13px; }
.tile b { font-family: var(--display); font-size: 32px; }
.tile.wide { grid-column: span 2; background: var(--card); }
.tile.wide small { color: var(--text-2); }
.tile.wide b { font-size: 24px; }
@media (max-width: 560px) { .cf { padding: 32px 24px; } }

/* ---------- Privacidad ---------- */
.privacy { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.privacy-head { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.privacy-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.privacy-items { flex: 2 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.privacy-items h3 { font-size: 18px; color: var(--accent); margin-bottom: 8px; }
.privacy-items p { color: var(--on-ink-2); }

/* ---------- Precios ---------- */
.plan { border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.plan.light { background: var(--card); border: 1px solid var(--line); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-size: 20px; }
.tag { background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font-family: var(--display); font-weight: 700; font-size: 44px; }
.plan.light .price span, .plan.light p { color: var(--text-2); }
.plan.dark .price span { color: var(--on-ink-3); }
.plan.dark p { color: var(--on-ink-2); }
.plan ul { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.plan.dark ul { color: #D5D9E1; }
.plan .btn { margin-top: auto; }

/* ---------- Preguntas ---------- */
.faq { max-width: 860px; margin: 0 auto; padding: 0 24px 96px; display: flex; flex-direction: column; gap: 28px; }
.faq h2 { text-align: center; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--text-2); }

/* ---------- Llamada final ---------- */
.cta { border-radius: 32px; padding: 64px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.cta h2 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; max-width: 820px; }
.cta p { font-size: 19px; color: var(--on-ink-2); max-width: 620px; }
.signup { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; max-width: 560px; }
.signup input { flex: 1 1 260px; min-width: 0; min-height: 54px; border-radius: 999px; border: 1px solid var(--ink-line-2); background: var(--ink-2); color: var(--on-ink); padding: 0 22px; font: inherit; }
.signup input::placeholder { color: var(--on-ink-3); }
.signup-error { color: #FFB4A8; font-size: 14px; min-height: 1.2em; }
@media (max-width: 560px) { .cta { padding: 44px 22px; } }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding: 40px 24px; font-size: 14px; color: var(--text-2); }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); text-decoration: underline; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; display: flex; flex-direction: column; gap: 16px; }
.legal h1 { font-family: var(--display); font-size: 40px; }
.legal h2 { font-family: var(--display); font-size: 22px; margin-top: 16px; }
.legal p, .legal li { color: var(--text-2); }
.todo { background: #FFF3D1; color: #7A5300; border-radius: 12px; padding: 14px 16px; }

/* ---------- Aparición suave al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

[hidden] { display: none !important; }
