/* ============================================================
   PACE — Estilos base · dark cinematográfico + ADN retro del logo
   ============================================================ */

:root {
  --orange: #E8541E;
  --orange-dark: #C8410F;
  --orange-soft: #FBE3D6;
  --ink: #0D0D0D;
  --black: #141210;
  --cream: #F4EFE9;
  --cream-dim: rgba(244, 239, 233, 0.62);
  --cream-faint: rgba(244, 239, 233, 0.38);
  --line: rgba(244, 239, 233, 0.12);
  --font-display: "Anton", "Archivo Black", sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-dur: 1s;
  --reveal-y: 34px;
  --reveal-blur: 10px;
  --marquee-dur: 26s;
}

/* Motion intensity levels */
[data-motion="sutil"] {
  --reveal-dur: 0.55s;
  --reveal-y: 14px;
  --reveal-blur: 0px;
  --marquee-dur: 48s;
}
[data-motion="max"] {
  --reveal-dur: 1.25s;
  --reveal-y: 52px;
  --reveal-blur: 16px;
  --marquee-dur: 18s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--orange); color: #fff; }

img { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.font-display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.92;
}
.font-mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

/* ---------- Reveal on scroll ---------- */
.rv {
  opacity: 0;
  transform: translateY(var(--reveal-y)) scale(0.99);
  filter: blur(var(--reveal-blur));
  transition:
    opacity var(--reveal-dur) var(--ease-out),
    transform var(--reveal-dur) var(--ease-out),
    filter var(--reveal-dur) var(--ease-out);
  will-change: opacity, transform, filter;
}
.rv.in { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Hero line reveal ---------- */
.hero-line { display: block; overflow: hidden; }
.hero-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}
.hero-ready .hero-line > span { transform: translateY(0); }

@keyframes slowZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.slow-zoom { animation: slowZoom 2.8s var(--ease-out) forwards; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marquee var(--marquee-dur) linear infinite;
  will-change: transform;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Grain ---------- */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Speed lines (ADN del logo) ---------- */
.speed-lines { position: absolute; pointer-events: none; }
.speed-lines span {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: var(--orange);
  margin-bottom: 9px;
  transform-origin: left center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  padding: 17px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  white-space: nowrap;
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream:hover { background: var(--orange); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(244, 239, 233, 0.32);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--cream); background: rgba(244, 239, 233, 0.08); }

/* Magnetic wrapper */
.magnetic { display: inline-block; will-change: transform; }

/* Link underline grow */
.link-grow { position: relative; font-weight: 600; }
.link-grow::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}
.link-grow:hover::after { transform: scaleX(1); }

/* ---------- Goal selector ---------- */
.goal-tab {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream-faint);
  transition: color 0.4s var(--ease-out);
  padding: 18px 0 14px;
  text-align: center;
  flex: 1;
}
.goal-tab:hover { color: var(--cream-dim); }
.goal-tab.active { color: var(--cream); }
.goal-tab .km {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 56px);
  line-height: 1;
  display: block;
}
.goal-tab .goal-name {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 8px;
  display: block;
}

.goal-panel { transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out); }
.goal-panel.swap { opacity: 0; transform: translateY(16px); }

/* ---------- Cards ---------- */
.card-hover {
  transition: transform 0.55s var(--ease-out), box-shadow 0.55s var(--ease-out),
    border-color 0.55s var(--ease-out);
}
.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 84, 30, 0.55);
  box-shadow: 0 24px 60px -24px rgba(232, 84, 30, 0.35);
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font-body);
}
.faq-a {
  overflow: hidden;
  transition: max-height 0.55s var(--ease-out), opacity 0.45s var(--ease-out);
}
.faq-icon { transition: transform 0.45s var(--ease-out); flex-shrink: 0; }
.faq-open .faq-icon { transform: rotate(45deg); }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--orange);
  transform: translate(-50%, -50%);
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(232, 84, 30, 0.65);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
    background 0.3s var(--ease-out), opacity 0.3s;
}
.cursor-ring.hot {
  width: 64px; height: 64px;
  background: rgba(232, 84, 30, 0.12);
}
body.cursor-on, body.cursor-on a, body.cursor-on button { cursor: none; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2.5px;
  background: var(--orange);
  z-index: 200;
  width: 0%;
}

/* ---------- Ticker numbers ---------- */
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 96px);
  line-height: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.5s var(--ease-out), backdrop-filter 0.5s, border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Botón exclusivo Athletics ---------- */
.btn-athletics {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cream);
  border: 1.5px solid var(--orange);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(232, 84, 30, 0.12);
  transition: background 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.btn-athletics:hover {
  background: var(--orange);
  box-shadow: 0 0 28px -6px rgba(232, 84, 30, 0.8);
}
.new-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--orange);
  color: #fff;
  border-radius: 99px;
  padding: 3px 8px;
  animation: newPulse 2.2s ease-in-out infinite;
}
.btn-athletics:hover .new-pill { background: #fff; color: var(--orange); animation: none; }
@keyframes newPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 84, 30, 0.55); }
  55% { box-shadow: 0 0 0 7px rgba(232, 84, 30, 0); }
}
@media (prefers-reduced-motion: reduce) { .new-pill { animation: none; } }

/* ---------- Nav dropdowns ---------- */
.nav-drop { position: relative; }
.nav-drop-btn {
  background: none;
  border: none;
  color: rgba(244, 239, 233, 0.85);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.011em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 24px 0;
}
.nav-drop.open .nav-drop-btn { color: var(--cream); }
.drop-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 240px;
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.65);
}
.nav-drop.open .drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.drop-item {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--cream-dim);
  transition: background 0.25s, color 0.25s;
}
.drop-item:hover { background: rgba(244, 239, 233, 0.07); color: var(--cream); }

/* ---------- Explore cards (home) ---------- */
.explore-card {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px 36px;
  background: rgba(244, 239, 233, 0.03);
  overflow: hidden;
}
.explore-card .arrow {
  position: absolute;
  top: 30px;
  right: 32px;
  font-size: 24px;
  color: var(--orange);
  transform: translateX(-6px);
  opacity: 0.55;
  transition: transform 0.45s var(--ease-out), opacity 0.45s;
}
.explore-card:hover .arrow { transform: translateX(0); opacity: 1; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .rv, .hero-line > span { transition: none; }
  .rv { opacity: 1; transform: none; filter: none; }
  .hero-line > span { transform: none; }
  .marquee-track { animation: none; }
  .slow-zoom { animation: none; }
  html { scroll-behavior: auto; }
}
