:root {
  --red: #e10613;
  --red-dark: #a8000c;
  --black: #000;
  --ink: #0d0d0d;
  --panel: #151515;
  --line: #2a2a2a;
  --white: #fff;
  --muted: #a6a6a6;
  --radius: 14px;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.text-red { color: var(--red); }

h1, h2, h3, .nav__brand, .btn, .eyebrow, .stats strong, .plan__price {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.eyebrow {
  color: var(--red);
  font-size: .9rem;
  letter-spacing: .2em;
  margin-bottom: .75rem;
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: var(--white);
  border: 2px solid var(--red);
  padding: .85rem 1.6rem;
  border-radius: 8px;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transform: skewX(-8deg);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { box-shadow: 0 8px 24px rgba(225, 6, 19, .45); transform: skewX(-8deg) translateY(-2px); }
.btn--sm { padding: .5rem 1rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--white); }
.btn--ghost:hover { background: var(--red); }
.btn--light { background: var(--white); color: var(--black); border-color: var(--white); }

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(0,0,0,.92); backdrop-filter: blur(8px); border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__brand { font-size: 1.6rem; font-weight: 700; font-style: italic; }
.brand-fit { color: var(--red); }
.brand-place { color: var(--white); margin-left: .3rem; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; }
.nav__links a:not(.btn) { font-weight: 500; font-size: .95rem; color: #ddd; transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--red); }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; }
.nav__toggle span { width: 26px; height: 3px; background: var(--white); border-radius: 2px; transition: .3s; }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 110px 0 60px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.55) 100%),
    linear-gradient(0deg, var(--black) 0%, transparent 30%),
    radial-gradient(ellipse at 80% 20%, rgba(225,6,19,.35), transparent 55%),
    url("assets/hero-gimnasio.jpg") center 65% / cover no-repeat,
    var(--black);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero__copy { text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: 1.05; margin-bottom: 1.2rem; }
.lead { color: #cfcfcf; font-size: 1.1rem; max-width: 34rem; margin-bottom: 1.6rem; }
.hero__perks { list-style: none; display: grid; gap: .6rem; }
.hero__perks li { padding-left: 1.8rem; position: relative; font-weight: 500; }
.hero__perks li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 14px; height: 10px; background: var(--red);
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
}

/* ===== Join card ===== */
.join-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}
.join-card__logo { width: 130px; height: 80px; object-fit: cover; margin: -.5rem auto .5rem; mix-blend-mode: lighten; }
.join-card h2 { text-align: center; font-size: 1.8rem; }
.join-card__sub { text-align: center; color: var(--muted); margin-bottom: 1.4rem; font-size: .95rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field select {
  width: 100%; padding: .8rem 1rem;
  background: var(--ink); color: var(--white);
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--red) 50%), linear-gradient(135deg, var(--red) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,6,19,.25); }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.error { display: block; color: #ff5a63; font-size: .78rem; min-height: 1em; margin-top: .25rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--red); margin-top: .25rem; }
.join-card .btn { margin-top: 1rem; }

.join-card__success {
  position: absolute; inset: 0; border-radius: var(--radius);
  background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem; gap: .8rem;
  animation: fade .4s ease;
}
.join-card__success[hidden] { display: none; }
.check-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; }
.join-card__success p { color: var(--muted); }
@keyframes fade { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ===== Stats ===== */
.stats { background: linear-gradient(90deg, var(--red-dark), var(--red)); padding: 2.2rem 0; }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 1rem; }
.stats strong { display: block; font-size: 2.6rem; line-height: 1; }
.stats span { font-size: .9rem; opacity: .9; }

/* ===== Sections ===== */
.section { padding: 6rem 0; }
.section--dark { background: var(--ink); }
.section__title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 3rem; line-height: 1.1; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); border-color: var(--red); }
.card__icon { font-family: var(--font-display); font-size: 2.4rem; color: var(--red); font-weight: 700; margin-bottom: .5rem; }
.card h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.card p { color: var(--muted); }

/* Products */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.product {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; transition: transform .25s, border-color .25s;
}
.product:hover { transform: translateY(-6px); border-color: var(--red); }
.product__media {
  position: relative; aspect-ratio: 1; border-radius: 10px; margin-bottom: 1rem;
  overflow: hidden; background: #0a0a0a; border-bottom: 4px solid var(--red);
}
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product:hover .product__media img { transform: scale(1.06); }
.product__media--pack { background: var(--white); }
.product__media--pack img { object-fit: contain; padding: 2.2rem 1rem 1rem; }
.product__tag {
  position: absolute; top: .75rem; left: .75rem;
  background: var(--red); color: var(--white);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em;
  font-size: .78rem; font-weight: 700; padding: .25rem .7rem; border-radius: 4px;
  transform: skewX(-8deg);
}
.product h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.product .product__ref { color: var(--white); font-size: .8rem; font-weight: 600; flex: 0; margin-bottom: .5rem; opacity: .85; }
.product p { color: var(--muted); font-size: .9rem; flex: 1; }
.product__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.price { font-weight: 700; font-size: 1.1rem; color: var(--red); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.plan {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.2rem 2rem; display: flex; flex-direction: column;
}
.plan--featured { border: 2px solid var(--red); transform: scale(1.04); box-shadow: 0 20px 50px rgba(225,6,19,.25); }
.plan__badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--red); padding: .25rem .9rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase;
}
.plan h3 { font-size: 1.5rem; }
.plan__price { font-size: 2.4rem; font-weight: 700; margin: .4rem 0 1.2rem; }
.plan__price span { font-size: 1rem; color: var(--muted); }
.plan ul { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.8rem; flex: 1; }
.plan li { padding-left: 1.5rem; position: relative; color: #ddd; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 700; }

/* Quotes */
.quote { background: var(--panel); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 2rem; }
.quote p { font-size: 1.05rem; margin-bottom: 1rem; }
.quote cite { color: var(--red); font-style: normal; font-weight: 600; }

/* CTA */
.cta { background: linear-gradient(115deg, var(--red-dark), var(--red)); padding: 5rem 0; text-align: center; }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); }
.cta p { margin: .6rem 0 1.8rem; font-size: 1.1rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--red); }
.footer__copy { color: var(--muted); font-size: .85rem; width: 100%; }

/* Reveal animation */
.reveal { transform: translateY(16px); transition: transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__bg {
    bottom: auto; height: 100vh;
    background:
      linear-gradient(0deg, var(--black) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,.25) 100%),
      radial-gradient(ellipse at 80% 20%, rgba(225,6,19,.35), transparent 55%),
      url("assets/hero-gimnasio.jpg") center top / cover no-repeat,
      var(--black);
  }
  .products { grid-template-columns: repeat(2, 1fr); }
  .cards, .plans { grid-template-columns: 1fr; }
  .plan--featured { transform: none; }
  .stats__grid { row-gap: 1.6rem; }
}
@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 1.2rem; padding: 1.5rem;
    background: rgba(0,0,0,.97); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); opacity: 0; pointer-events: none; transition: .3s;
  }
  .nav__links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav { background: rgba(0,0,0,.92); }
  .section { padding: 4rem 0; }
  .join-card { padding: 1.5rem; }
}
@media (max-width: 520px) {
  .products { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Título con texto de apoyo */
.section__title--tight { margin-bottom: 1rem; }
.section__lead { color: #cfcfcf; font-size: 1.1rem; max-width: 40rem; margin-bottom: 3rem; }

/* Logo en menú y pie de página */
.nav__brand { display: flex; align-items: center; }
.nav__logo { height: 44px; width: auto; mix-blend-mode: lighten; }
.footer .nav__logo { height: 40px; }

/* Fondo zona cardio en la sección comunidad */
#comunidad {
  background:
    linear-gradient(180deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.88) 100%),
    url("assets/zona-cardio.jpg") center / cover no-repeat,
    var(--black);
}
#comunidad .card { background: rgba(21,21,21,.85); backdrop-filter: blur(4px); }

/* Fondo comunidad en testimonios */
#testimonios {
  background:
    linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.75) 100%),
    linear-gradient(180deg, rgba(0,0,0,.6) 0%, transparent 35%, rgba(0,0,0,.7) 100%),
    url("assets/comunidad-selfie.jpg") center 35% / cover no-repeat,
    var(--ink);
}
#testimonios .quote { background: rgba(21,21,21,.85); backdrop-filter: blur(4px); }

/* Fondo de tienda en suplementos */
#productos {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(225,6,19,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.65) 45%, rgba(0,0,0,.9) 100%),
    url("assets/tienda.jpg") center / cover no-repeat,
    var(--ink);
}
#productos .product { background: rgba(21,21,21,.88); backdrop-filter: blur(4px); }

/* Botón de WhatsApp en la confirmación de registro */
.btn--wa { margin-top: .6rem; }

/* ===== Calculadora ===== */
.calc { --ok: #2fbf71; --warn: #f2a516; --low: #4aa3df; }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; align-items: start; }
.calc__form {
  background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--red);
  border-radius: var(--radius); padding: 1.75rem; display: grid; gap: 1.1rem;
}
.calc__field { border: 0; min-width: 0; }
.calc__field label, .calc__field legend { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; }
.calc__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.calc__form select, .unit input {
  width: 100%; padding: .75rem .9rem; background: var(--ink); color: var(--white);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .95rem;
}
.calc__form select:focus, .unit input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(225,6,19,.25); }
.unit { position: relative; }
.unit input { padding-right: 3.2rem; font-variant-numeric: tabular-nums; }
.unit span { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; pointer-events: none; }
.segmented { display: grid; grid-template-columns: repeat(2, 1fr); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px; gap: 4px; }
.segmented--3 { grid-template-columns: repeat(3, 1fr); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { margin: 0; text-align: center; padding: .6rem .4rem; border-radius: 6px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.segmented input:checked + label { background: var(--red); color: var(--white); }
.segmented input:focus-visible + label { outline: 2px solid var(--white); outline-offset: 2px; }
.calc__error { color: #ff5a63; font-size: .85rem; min-height: 1em; }
.calc__error:empty { display: none; }
.calc__note { color: var(--muted); font-size: .78rem; }

.calc__results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.calc__sample { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.calc__sample[hidden] { display: none; }
.result { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; min-width: 0; }
.result h3 { font-size: .95rem; color: var(--muted); letter-spacing: .08em; }
.result__value { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; line-height: 1.1; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.result__value small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.result__hint { color: var(--muted); font-size: .82rem; margin-top: .2rem; }
.result--imc { grid-column: 1 / -1; }
.result__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.result__badge { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .7rem; border-radius: 999px; background: var(--ok); color: #0b0b0b; }
.result__badge[data-cat="bajo"] { background: var(--low); }
.result__badge[data-cat="sobre"] { background: var(--warn); }
.result__badge[data-cat="obes"] { background: var(--red); color: var(--white); }
.imc-bar { position: relative; display: grid; grid-template-columns: 14fr 26fr 20fr 40fr; gap: 3px; margin-top: .9rem; height: 10px; }
.imc-bar__seg { border-radius: 3px; opacity: .85; }
.imc-bar__seg--bajo { background: var(--low); }
.imc-bar__seg--normal { background: var(--ok); }
.imc-bar__seg--sobre { background: var(--warn); }
.imc-bar__seg--obes { background: var(--red); }
.imc-bar__marker {
  position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px;
  background: var(--white); border-radius: 2px; box-shadow: 0 0 0 2px var(--black);
  transition: left .4s ease;
}
/* Escala de 15 a 40: 18,5 cae en 14 %, 25 en 40 %, 30 en 60 % */
.imc-bar__labels { position: relative; height: 1.2em; margin-top: .35rem; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.imc-bar__labels span { position: absolute; transform: translateX(-50%); }
.imc-bar__labels span:nth-child(1) { left: 14%; }
.imc-bar__labels span:nth-child(2) { left: 40%; }
.imc-bar__labels span:nth-child(3) { left: 60%; }

.calc__cta { grid-column: 1 / -1; display: grid; gap: .9rem; padding-top: .5rem; }
.calc__tip { color: #ddd; font-size: .95rem; }
.calc__tip strong { color: var(--white); }
.calc__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

@media (max-width: 960px) {
  .calc__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .calc__row { grid-template-columns: 1fr 1fr; }
  .calc__row .calc__field:last-child { grid-column: 1 / -1; }
  .calc__results { grid-template-columns: 1fr; }
  .result__value { font-size: 2rem; }
  .calc__actions .btn { width: 100%; }
}

/* ===== Escala de letra para celular ===== */
@media (max-width: 600px) {
  html { font-size: 15px; }
  .eyebrow { font-size: .75rem; letter-spacing: .16em; }
  .nav__logo { height: 36px; }
  .hero { padding-top: 96px; }
  .hero h1 { font-size: 1.95rem; margin-bottom: .9rem; }
  .lead { font-size: .95rem; margin-bottom: 1.2rem; }
  .hero__perks li { font-size: .92rem; }
  .join-card h2 { font-size: 1.4rem; }
  .join-card__sub { font-size: .88rem; }
  .stats { padding: 1.6rem 0; }
  .stats strong { font-size: 1.9rem; }
  .stats span { font-size: .78rem; }
  .section { padding: 3.25rem 0; }
  .section__title { font-size: 1.6rem; margin-bottom: 2rem; }
  .section__title--tight { margin-bottom: .8rem; }
  .section__lead { font-size: .95rem; margin-bottom: 2rem; }
  .card { padding: 1.5rem; }
  .card__icon { font-size: 1.8rem; }
  .card h3 { font-size: 1.1rem; }
  .card p, .product p, .plan li { font-size: .9rem; }
  .result__value { font-size: 1.7rem; }
  .product h3 { font-size: 1rem; }
  .price { font-size: 1rem; }
  .plan { padding: 1.8rem 1.5rem; }
  .plan h3 { font-size: 1.25rem; }
  .plan__price { font-size: 1.9rem; }
  .quote { padding: 1.5rem; }
  .quote p { font-size: .95rem; }
  .cta { padding: 3.5rem 0; }
  .cta h2 { font-size: 1.6rem; }
  .cta p { font-size: .95rem; }
  .btn { font-size: .9rem; padding: .75rem 1.3rem; }
}
