/* ============================================
   RB GYM — Acá se forja
   carbón + tiza + cobre incandescente
   ============================================ */

:root {
  --carbon: #0c0b0a;
  --graphite: #171514;
  --steel: #2a2724;
  --chalk: #ede7dc;
  --chalk-dim: #9a938a;
  --ember: #e4570f;
  --ember-hot: #ffb25c;
  --ember-grad: linear-gradient(100deg, #e4570f 0%, #ffb25c 100%);
  --font-display: "Big Shoulders Display", Impact, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--carbon);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

a { color: inherit; text-decoration: none; }

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ember { color: var(--ember); }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--carbon);
  display: grid; place-items: center;
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader.done { transform: translateY(-100%); }
.loader-inner { text-align: center; }
.loader-bar {
  display: flex; align-items: center; gap: 6px;
  justify-content: center;
}
.loader-logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 64px; line-height: 1;
  padding: 0 18px;
  color: var(--chalk);
}
.plate {
  width: 10px; height: 56px; border-radius: 3px;
  background: var(--ember);
  opacity: 0; transform: scaleY(0.2);
  animation: plateIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.plate.p2, .plate.p3 { height: 40px; background: var(--chalk-dim); }
.plate.p1 { animation-delay: 0.5s; }
.plate.p2 { animation-delay: 0.35s; }
.plate.p3 { animation-delay: 0.35s; }
.plate.p4 { animation-delay: 0.5s; }
@keyframes plateIn { to { opacity: 1; transform: scaleY(1); } }
.loader-tag {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.35em;
  color: var(--chalk-dim);
}

/* ---------- Barra de progreso (barbell) ---------- */
.barbell {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  z-index: 60; background: rgba(237, 231, 220, 0.07);
}
.barbell-fill {
  height: 100%; width: 0%;
  background: var(--ember-grad);
}
.barbell-plate {
  position: absolute; top: -3px;
  width: 4px; height: 10px; border-radius: 2px;
  background: var(--steel);
  transition: background 0.4s, box-shadow 0.4s;
}
.barbell-plate.on {
  background: var(--ember-hot);
  box-shadow: 0 0 10px rgba(255, 178, 92, 0.8);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: rgba(12, 11, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px var(--pad);
  border-bottom: 1px solid rgba(237, 231, 220, 0.06);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 26px; line-height: 1;
  letter-spacing: 0.01em;
}
.nav-logo span { color: var(--ember); }
.nav-serie {
  color: var(--chalk-dim);
  display: none;
}
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--ember);
  border-radius: 3px;
  color: var(--ember-hot);
  transition: background 0.3s, color 0.3s;
}
.nav-cta:hover { background: var(--ember); color: var(--carbon); }
.nav-burger {
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  display: grid; place-items: center; gap: 0;
}
.nav-burger span {
  display: block; width: 24px; height: 2px;
  background: var(--chalk); margin: 3px 0;
  transition: transform 0.35s, opacity 0.35s;
}
.nav-burger.open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger.open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Menú fullscreen ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--graphite);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}
.menu.open { clip-path: inset(0 0 0% 0); }
.menu-links { display: flex; flex-direction: column; gap: 4px; }
.menu-links a {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(40px, 9vw, 88px);
  line-height: 1.05; text-transform: uppercase;
  color: var(--chalk);
  display: flex; align-items: baseline; gap: 14px;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s, transform 0.5s, color 0.3s;
}
.menu.open .menu-links a { opacity: 1; transform: none; }
.menu.open .menu-links a:nth-child(1) { transition-delay: 0.15s; }
.menu.open .menu-links a:nth-child(2) { transition-delay: 0.22s; }
.menu.open .menu-links a:nth-child(3) { transition-delay: 0.29s; }
.menu.open .menu-links a:nth-child(4) { transition-delay: 0.36s; }
.menu.open .menu-links a:nth-child(5) { transition-delay: 0.43s; }
.menu-links a::before {
  content: attr(data-i);
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 400;
  color: var(--ember);
}
.menu-links a:hover { color: var(--ember-hot); }
.menu-foot {
  position: absolute; bottom: 28px; left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between;
  color: var(--chalk-dim);
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -12% 0;
  z-index: 0; will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--carbon) 4%, rgba(12, 11, 10, 0.55) 45%, rgba(12, 11, 10, 0.75) 100%);
}
.hero-bg img { filter: saturate(0.7) contrast(1.08); }
.hero-content {
  position: relative; z-index: 1;
  padding: 0 var(--pad);
  margin-top: auto;
}
.hero-eyebrow {
  color: var(--ember-hot);
  letter-spacing: 0.3em;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(78px, 21vw, 240px);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.hero-sub {
  max-width: 420px;
  margin-top: 22px;
  color: var(--chalk-dim);
  font-size: 15px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--pad) 22px;
  color: var(--chalk-dim);
}
.hero-scroll { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 26px;
  border-radius: 3px;
  transition: transform 0.25s, background 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn-ember {
  background: var(--ember-grad);
  color: var(--carbon);
  font-weight: 500;
}
.btn-ember:hover { box-shadow: 0 6px 30px rgba(228, 87, 15, 0.45); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid rgba(237, 231, 220, 0.25);
  color: var(--chalk);
}
.btn-ghost:hover { border-color: var(--ember); color: var(--ember-hot); transform: translateY(-2px); }
.btn-big { padding: 18px 34px; font-size: 14px; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(237, 231, 220, 0.08);
  border-bottom: 1px solid rgba(237, 231, 220, 0.08);
  padding: 14px 0;
  background: var(--graphite);
}
.marquee-track {
  display: flex; white-space: nowrap;
  animation: marquee 28s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  letter-spacing: 0.12em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 231, 220, 0.35);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones / reveals ---------- */
.section {
  padding: clamp(80px, 12vw, 150px) var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}
.section-wide { max-width: 1360px; }

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

.serie-head { margin-bottom: clamp(36px, 6vw, 64px); }
.serie-tag {
  display: inline-block;
  color: var(--ember);
  border: 1px solid rgba(228, 87, 15, 0.4);
  border-radius: 3px;
  padding: 5px 10px;
  margin-bottom: 16px;
}
.serie-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(52px, 10vw, 110px);
  line-height: 0.92;
  text-transform: uppercase;
}
.serie-head-center { text-align: center; }
.serie-sub {
  color: var(--chalk-dim);
  max-width: 460px;
  margin: 18px auto 0;
  font-size: 15px;
}

/* ---------- Serie 01: about + stats ---------- */
.about-lead {
  font-size: clamp(19px, 2.6vw, 26px);
  line-height: 1.5;
  max-width: 720px;
}
.about-lead em {
  font-style: normal;
  color: var(--ember-hot);
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(237, 231, 220, 0.08);
  border: 1px solid rgba(237, 231, 220, 0.08);
  margin-top: clamp(40px, 6vw, 72px);
}
.stat { background: var(--carbon); padding: 26px 20px; }
.stat-num {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  color: var(--chalk);
  line-height: 1;
}
.stat-label {
  margin-top: 8px;
  color: var(--chalk-dim);
  font-size: 13px;
}

/* ---------- Serie 02: zonas ---------- */
.zones { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 90px); }
.zone { display: grid; gap: 22px; }
.zone-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
}
.zone-img img {
  filter: saturate(0.75) contrast(1.05);
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s;
}
.zone:hover .zone-img img { transform: scale(1.05); filter: saturate(1) contrast(1.05); }
.zone-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
}
.zone-desc { color: var(--chalk-dim); margin-top: 10px; max-width: 420px; }
.zone-list {
  margin-top: 20px;
  list-style: none;
  border-top: 1px solid rgba(237, 231, 220, 0.1);
}
.zone-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(237, 231, 220, 0.1);
  color: var(--chalk);
}
.zone-list li span { color: var(--ember-hot); white-space: nowrap; }

/* ---------- Serie 03: coaching ---------- */
.coaching { display: grid; gap: 36px; }
.coaching-img {
  aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: 4px;
}
.coaching-img img { filter: saturate(0.75) contrast(1.05); }
.coaching-body p { color: var(--chalk-dim); max-width: 480px; font-size: 15.5px; }
.coach-list { list-style: none; margin-top: 28px; }
.coach-list li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 0;
  border-top: 1px solid rgba(237, 231, 220, 0.1);
  font-size: 15px;
}
.coach-list li .mono { color: var(--ember); }

/* ---------- Serie 04: planes ---------- */
.plans {
  display: grid;
  gap: 18px;
}
.plan {
  position: relative;
  background: var(--graphite);
  border: 1px solid rgba(237, 231, 220, 0.08);
  border-radius: 6px;
  padding: 34px 28px;
  display: flex; flex-direction: column;
  transition: transform 0.35s, border-color 0.35s;
}
.plan:hover { transform: translateY(-6px); border-color: rgba(237, 231, 220, 0.2); }
.plan-hot {
  border: 1px solid var(--ember);
  background:
    linear-gradient(var(--graphite), var(--graphite)) padding-box,
    var(--ember-grad) border-box;
  box-shadow: 0 10px 50px rgba(228, 87, 15, 0.18);
}
.plan-flag {
  position: absolute; top: -11px; left: 24px;
  background: var(--ember-grad);
  color: var(--carbon);
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 500;
}
.plan-name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 30px;
}
.plan-price {
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  line-height: 1;
}
.plan-price .cur { font-size: 0.5em; color: var(--chalk-dim); }
.plan-price .per { font-size: 0.38em; color: var(--chalk-dim); margin-left: 6px; }
.plan-save {
  margin-top: 10px;
  color: var(--ember-hot);
  font-size: 11px;
}
.plan-feats {
  list-style: none;
  margin: 22px 0 28px;
  flex: 1;
}
.plan-feats li {
  padding: 9px 0 9px 22px;
  position: relative;
  color: var(--chalk-dim);
  font-size: 14.5px;
  border-bottom: 1px solid rgba(237, 231, 220, 0.06);
}
.plan-feats li::before {
  content: "+";
  position: absolute; left: 0;
  color: var(--ember);
  font-family: var(--font-mono);
}
.plan-btn { text-align: center; }
.plan-day {
  text-align: center;
  margin-top: clamp(36px, 5vw, 56px);
  color: var(--chalk-dim);
  letter-spacing: 0.14em;
}

/* ---------- Serie 05: contacto ---------- */
.contact-grid { display: grid; gap: 40px; }
.block-label {
  color: var(--ember);
  letter-spacing: 0.3em;
  margin-bottom: 20px;
}
.hours-list { display: flex; flex-direction: column; }
.hours-list div {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(237, 231, 220, 0.1);
  font-size: 13px;
}
.hours-list dt { color: var(--chalk-dim); }
.hours-list dd { color: var(--chalk); }
.where-addr { font-size: clamp(20px, 3vw, 26px); line-height: 1.4; }
.where-note { color: var(--chalk-dim); margin-top: 12px; font-size: 14px; }
.where-links { display: flex; gap: 24px; margin-top: 24px; }
.where-links a {
  color: var(--ember-hot);
  border-bottom: 1px solid rgba(255, 178, 92, 0.3);
  padding-bottom: 3px;
  transition: border-color 0.3s;
}
.where-links a:hover { border-color: var(--ember-hot); }

.final-cta {
  margin-top: clamp(70px, 10vw, 120px);
  text-align: center;
}
.final-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 11vw, 130px);
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 34px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(237, 231, 220, 0.08);
  padding: 36px var(--pad);
  display: flex; flex-direction: column; gap: 18px;
  align-items: center; text-align: center;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 30px;
}
.footer-logo span { color: var(--ember); }
.footer-meta {
  display: flex; flex-direction: column; gap: 6px;
  color: var(--chalk-dim);
}
.footer-meta a { color: var(--chalk); }
.footer-meta a:hover { color: var(--ember-hot); }

/* ============================================
   Desktop
   ============================================ */
@media (min-width: 760px) {
  .nav-serie { display: block; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .zone { grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
  .zone-flip .zone-img { order: 2; }
  .zone-img { aspect-ratio: 16 / 11; }
  .coaching { grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
  .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .plan-hot { transform: translateY(-10px); }
  .plan-hot:hover { transform: translateY(-16px); }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
  .footer { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer-meta { flex-direction: row; gap: 28px; }
  .marquee-track span { font-size: 30px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader { display: none; }
  .marquee-track { animation: none; }
  .hero-scroll { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-bg { inset: 0; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
