/* ════════════════════════════════════════════
   FITMENT — Landing
   Paleta: carbón + blanco + petróleo
   ════════════════════════════════════════════ */
:root {
  --bg: #14181c;
  --bg-2: #1b2127;
  --bg-3: #232b32;
  --ink: #f4f6f7;
  --muted: #97a3ab;
  --line: #2d363e;
  --accent: #4fb8af;
  --accent-soft: rgba(79, 184, 175, .14);
  --font: 'Archivo', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* recorte duro del desborde horizontal: los elementos corridos a la espera
   de su animación (reveal) no deben agrandar la página en el celular */
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Preloader ─────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform .8s var(--ease), opacity .4s ease .5s;
}
.preloader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-logo {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 14px;
  animation: logoPulse 1.6s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(79,184,175,0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 24px rgba(79,184,175,.45)); }
}
.preloader-word {
  display: flex; gap: .35em; justify-content: center;
  font-size: 1.6rem; font-weight: 800; letter-spacing: .35em;
  margin-bottom: 26px; padding-left: .35em;
}
.preloader-word span {
  opacity: 0; transform: translateY(14px);
  animation: letterIn .5s var(--ease) forwards;
}
.preloader-word span:nth-child(1) { animation-delay: .10s; }
.preloader-word span:nth-child(2) { animation-delay: .18s; }
.preloader-word span:nth-child(3) { animation-delay: .26s; }
.preloader-word span:nth-child(4) { animation-delay: .34s; }
.preloader-word span:nth-child(5) { animation-delay: .42s; }
.preloader-word span:nth-child(6) { animation-delay: .50s; }
.preloader-word span:nth-child(7) { animation-delay: .58s; }
@keyframes letterIn { to { opacity: 1; transform: translateY(0); } }
.preloader-bar {
  width: 220px; height: 2px; margin: 0 auto;
  background: var(--line); border-radius: 2px; overflow: hidden;
}
.preloader-bar-fill {
  width: 0%; height: 100%;
  background: var(--accent);
  transition: width .25s ease;
}

/* ── Transición de página ──────────────────── */
.page-transition {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg-2);
  transform: translateY(100%);
  transition: transform .55s var(--ease);
  pointer-events: none;
}
.page-transition.active { transform: translateY(0); }

/* ── Nav ───────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  transition: padding .4s ease, box-shadow .4s ease;
}
/* el blur va en una capa interna: si se aplicara al nav, el menú mobile
   (position fixed) quedaría atrapado dentro de la barra y se rompe */
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: rgba(20, 24, 28, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease;
}
.nav.scrolled { padding: 12px 40px; box-shadow: 0 1px 0 var(--line); }
.nav.scrolled::before { opacity: 1; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { width: 36px; height: 36px; border-radius: 9px; }
.nav-name { font-weight: 800; letter-spacing: .25em; font-size: .95rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  color: var(--muted); position: relative;
  transition: color .25s ease;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); transition: transform .3s ease, opacity .3s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Botones ───────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font); font-size: .85rem; font-weight: 700; letter-spacing: .1em;
  border-radius: 10px; border: 0; cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-accent { background: var(--accent); color: #0c1413; }
.btn-accent:hover { box-shadow: 0 8px 28px rgba(79,184,175,.35); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.btn-ghost { background: var(--bg-3); color: var(--ink); }
.btn-ghost:hover { background: var(--accent); color: #0c1413; }
.btn-sm { padding: 10px 20px; font-size: .78rem; }
.btn-block { display: block; text-align: center; width: 100%; }

/* ── Hero ──────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 40px 80px;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.12) translate(-1.5%, -2%); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,24,28,.55) 0%, rgba(20,24,28,.35) 45%, var(--bg) 100%),
    linear-gradient(90deg, rgba(20,24,28,.75) 0%, transparent 70%);
}
.hero-content { position: relative; max-width: 1100px; margin: 0 auto; width: 100%; }
.hero-kicker {
  font-size: .8rem; font-weight: 700; letter-spacing: .4em;
  color: var(--accent); margin-bottom: 22px;
}
.hero-title {
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900; line-height: .98; letter-spacing: -.01em;
  margin-bottom: 28px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .word { display: inline-block; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--muted); margin-bottom: 38px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* entrada escalonada del hero (la dispara el JS al cerrar el preloader) */
.stagger { opacity: 0; transform: translateY(40px); }
body.loaded .stagger {
  animation: staggerIn .9s var(--ease) forwards;
  animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes staggerIn { to { opacity: 1; transform: translateY(0); } }

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: fadeIn 1s ease 1.8s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.hero-scroll-line {
  width: 1.5px; height: 46px; background: var(--line);
  position: relative; overflow: hidden;
}
.hero-scroll-line::after {
  content: ''; position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%; background: var(--accent);
  animation: scrollDrop 1.8s ease-in-out infinite;
}
@keyframes scrollDrop { 0% { top: -100%; } 60%, 100% { top: 100%; } }
.hero-scroll-txt { font-size: .62rem; font-weight: 700; letter-spacing: .35em; color: var(--muted); }

/* ── Marquee ───────────────────────────────── */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 18px 0; background: var(--bg-2);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 38px;
  animation: marquee 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-size: 1rem; font-weight: 800; letter-spacing: .3em; color: var(--ink);
}
.marquee-track i { color: var(--accent); font-style: normal; font-size: .7rem; }
@keyframes marquee { to { transform: translateX(-33.333%); } }

/* ── Secciones base ────────────────────────── */
.section { padding: 110px 40px; }
.section-dark { background: var(--bg-2); }
.container { max-width: 1200px; margin: 0 auto; }
.kicker {
  font-size: .75rem; font-weight: 700; letter-spacing: .4em;
  color: var(--accent); margin-bottom: 14px;
}
.h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; line-height: 1.08; letter-spacing: -.01em;
  margin-bottom: 28px;
}
.h2 em { font-style: normal; color: var(--accent); }
.body { color: var(--muted); margin-bottom: 18px; max-width: 56ch; }

/* reveal genérico al scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
/* escalonado entre hermanos */
.reveal.in:nth-child(2) { transition-delay: .08s; }
.reveal.in:nth-child(3) { transition-delay: .16s; }
.reveal.in:nth-child(4) { transition-delay: .24s; }

/* ── Split (El gimnasio) ───────────────────── */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 40px; margin-top: 40px; }
.stat { border-left: 2px solid var(--accent); padding-left: 16px; }
.stat-num { font-size: 2.4rem; font-weight: 900; line-height: 1; }
.stat-suffix { font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-left: 2px; }
.stat-label { display: block; font-size: .8rem; color: var(--muted); letter-spacing: .05em; margin-top: 6px; }

.split-media { position: relative; }
.reveal-img { opacity: 0; transform: translateX(50px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal-img.in { opacity: 1; transform: translateX(0); }
.media-frame {
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.media-frame img { transition: transform .8s var(--ease); }
.media-frame:hover img { transform: scale(1.05); }
.media-frame-b {
  position: absolute; right: -30px; bottom: -50px;
  width: 55%; border: 4px solid var(--bg);
}

/* ── Galería ───────────────────────────────── */
.gallery {
  display: grid; gap: 18px; margin-top: 50px;
  grid-template-columns: repeat(4, 1fr);
}
.gallery-item {
  position: relative; border-radius: 14px; overflow: hidden;
  cursor: zoom-in; aspect-ratio: 4 / 3;
}
.g-wide { grid-column: span 2; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .5s ease;
}
.gallery-item:hover img { transform: scale(1.07); filter: brightness(1.08); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 36px 18px 14px;
  background: linear-gradient(transparent, rgba(12,16,19,.85));
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  transform: translateY(100%); transition: transform .45s var(--ease);
}
.gallery-item:hover figcaption { transform: translateY(0); }

/* ── Cards entrenamientos ──────────────────── */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 50px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 34px 26px;
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s ease, background .35s ease;
}
.card:hover { transform: translateY(-8px); border-color: var(--accent); background: var(--bg-3); }
.card-num {
  font-size: .8rem; font-weight: 800; color: var(--accent);
  letter-spacing: .2em; display: block; margin-bottom: 40px;
}
.card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 12px; }
.card p { font-size: .88rem; color: var(--muted); }
.card-line {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.card:hover .card-line { transform: scaleX(1); }

/* ── Banner parallax ───────────────────────── */
.banner { position: relative; padding: 150px 40px; overflow: hidden; }
.banner-bg { position: absolute; inset: -20% 0; }
.banner-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.32) saturate(.85);
  will-change: transform;
}
.banner-content { position: relative; text-align: center; max-width: 900px; margin: 0 auto; }
.banner-title {
  font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.1;
  margin-bottom: 34px;
}
.banner-title em { font-style: normal; color: var(--accent); }

/* ── Planes ────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; align-items: stretch; }
.plan {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 38px 30px; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s ease, box-shadow .35s ease;
}
.plan:hover { transform: translateY(-8px); border-color: var(--accent); box-shadow: 0 24px 50px rgba(0,0,0,.4); }
.plan h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.plan-desc { font-size: .85rem; color: var(--muted); margin-bottom: 22px; }
.plan-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 24px; }
.plan-currency { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
.plan-num { font-size: 2.6rem; font-weight: 900; letter-spacing: -.02em; }
.plan-per { font-size: .85rem; color: var(--muted); margin-left: 4px; }
.plan ul { margin-bottom: 30px; flex: 1; }
.plan li {
  font-size: .88rem; color: var(--muted);
  padding: 9px 0 9px 26px; position: relative;
  border-bottom: 1px dashed var(--line);
}
.plan li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--accent); font-weight: 800;
}
.plan-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-2) 45%);
  transform: scale(1.03);
}
.plan-featured:hover { transform: scale(1.03) translateY(-8px); }
.plan-tag {
  align-self: flex-start;
  font-size: .65rem; font-weight: 800; letter-spacing: .25em;
  color: #0c1413; background: var(--accent);
  padding: 6px 12px; border-radius: 6px; margin-bottom: 18px;
}

/* ── Footer ────────────────────────────────── */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 80px 40px 0; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 60px;
}
.footer-logo { width: 44px; height: 44px; border-radius: 11px; margin-bottom: 14px; }
.footer-name { font-weight: 800; letter-spacing: .25em; display: block; margin-bottom: 8px; }
.footer-claim { color: var(--muted); font-size: .85rem; }
.footer-col h4 {
  font-size: .72rem; font-weight: 800; letter-spacing: .25em;
  color: var(--accent); margin-bottom: 16px;
}
.footer-col p { font-size: .88rem; color: var(--muted); margin-bottom: 8px; }
.footer-col a { transition: color .25s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0; text-align: center;
  font-size: .78rem; color: var(--muted);
}

/* ── Lightbox ──────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(12, 15, 18, .94);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 88vw; max-height: 80vh;
  border-radius: 12px;
  transform: scale(.92);
  transition: transform .4s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lightbox-caption { margin-top: 16px; color: var(--muted); font-size: .85rem; letter-spacing: .08em; }
.lightbox-close {
  position: absolute; top: 24px; right: 30px;
  background: var(--bg-3); color: var(--ink);
  border: 0; width: 44px; height: 44px; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.lightbox-close:hover { background: var(--accent); color: #0c1413; transform: rotate(90deg); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; gap: 80px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .plan-featured { transform: none; }
  .plan-featured:hover { transform: translateY(-8px); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding: 12px 20px; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    background: rgba(20, 24, 28, .97);
    flex-direction: column; align-items: center; justify-content: center; gap: 30px;
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; }
  .nav-links a { font-size: 1.1rem; }
  .nav-burger { display: flex; }
  .nav-actions .btn { display: none; }
  .section, .hero, .banner { padding-left: 20px; padding-right: 20px; }
  .hero-kicker { font-size: .68rem; letter-spacing: .25em; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .g-wide { grid-column: span 1; }
  .media-frame-b { right: 0; bottom: -30px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* accesibilidad: respetar reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-img, .stagger { opacity: 1 !important; transform: none !important; }
}
