/* =========================================================
   Ibarra SkyRace — sistema visual del sitio
   Basado en el Manual de identidad v1.0
   ========================================================= */

:root {
  --red: #E31920;
  --red-dark: #b8121a;
  --gold: #F9AA12;
  --ink: #111419;
  --ink-2: #171b21;
  --ink-3: #20252c;
  --line-dark: #2c323a;
  --cream: #F5F2EA;
  --paper: #ffffff;
  --line: #e1ded5;
  --muted: #697079;
  --muted-dark: #a3a9b1;

  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--ink);
  color: #f4f5f6;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .92;
}
.h1 { font-size: clamp(52px, 9vw, 128px); }
.h2 { font-size: clamp(40px, 6vw, 80px); }
.h3 { font-size: clamp(28px, 3.4vw, 42px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase;
  color: var(--red);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; }
.on-dark .eyebrow, .eyebrow.gold { color: var(--gold); }

.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted-dark); max-width: 680px; }
.section-light .lead { color: #444b52; }

.accent { color: var(--gold); }
.accent-red { color: var(--red); }

/* Franja de marca 70/30 rojo-oro */
.stripe { height: 8px; background: linear-gradient(90deg, var(--red) 70%, var(--gold) 70%); }
.stripe.thin { height: 4px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-family: var(--font-display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 19px; letter-spacing: .03em; line-height: 1; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-ghost { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.section-light .btn-ghost { border-color: var(--ink); color: var(--ink); }
.section-light .btn-ghost:hover { background: var(--ink); color: #fff; }
.btn .arrow { font-style: normal; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(17, 20, 25, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.brand-link { display: flex; align-items: center; flex: none; }
.brand-link img { height: 40px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 10px 12px; border-radius: 6px;
  font-size: 14px; font-weight: 600; color: #cfd3d8; text-decoration: none;
  transition: color .15s, background-color .15s;
}
.main-nav a:hover { color: #fff; background: var(--ink-3); }
.main-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--red); border-radius: 6px 6px 0 0; }

.header-cta { flex: none; padding: 11px 18px; font-size: 17px; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line-dark); background: transparent;
  border-radius: var(--radius-sm); color: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink);
    padding: 24px var(--gutter) 40px; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease; visibility: hidden;
  }
  .nav-open .main-nav { transform: none; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
    font-size: 34px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); border-radius: 0; color: #fff;
  }
  .main-nav a:hover { background: transparent; color: var(--gold); }
  .main-nav a[aria-current="page"] { box-shadow: none; color: var(--red); }
  .main-nav .mobile-cta { display: inline-flex; margin-top: 28px; }
  body.nav-open { overflow: hidden; }
}
.main-nav .mobile-cta { display: none; }
@media (max-width: 1080px) { .main-nav .mobile-cta { display: inline-flex; } }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-light { background: var(--cream); color: var(--ink); }
.section-light .eyebrow::before { background: var(--red); }
.section-paper { background: var(--paper); color: var(--ink); }
.section-red { background: var(--red); color: #fff; }
.section-ink2 { background: var(--ink-2); }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 860px; }
.section-head.split {
  max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px;
}
@media (max-width: 760px) { .section-head.split { grid-template-columns: 1fr; } }

/* Patrón topográfico */
.topo {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.2'%3E%3Cpath d='M-20 420c80-60 140-30 210-90s110-150 200-150 130 70 230 40'/%3E%3Cpath d='M-20 450c90-55 150-25 225-85s120-140 205-140 120 75 210 55'/%3E%3Cpath d='M-20 480c95-50 165-20 240-80s125-125 210-125 115 80 190 70'/%3E%3Cpath d='M-20 510c100-45 175-15 255-75s130-110 215-110 110 85 170 85'/%3E%3Cpath d='M-20 540c110-40 185-10 270-70s135-95 220-95 105 90 150 100'/%3E%3Cpath d='M-20 570c120-35 195-5 285-65s140-80 225-80 100 95 130 115'/%3E%3Cpath d='M-20 390c75-65 130-35 195-95s100-165 195-165 140 65 250 25'/%3E%3Cpath d='M-20 360c70-70 120-40 180-100s95-180 190-180 150 60 270 10'/%3E%3Cpath d='M-20 330c65-75 110-45 165-105s90-195 185-195 160 55 290-5'/%3E%3Cpath d='M260 260c20-30 60-40 90-20s20 60-20 70-80-20-70-50z'/%3E%3Cpath d='M240 270c25-45 85-60 125-30s30 85-30 100-110-25-95-70z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 600px;
}

/* ---------- Hero inicio ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(56px, 8vw, 110px) 0 0;
  background: radial-gradient(ellipse at 80% 0%, #3a1016 0%, transparent 55%), var(--ink);
}
.hero::after {
  content: "SKY"; position: absolute; right: -2vw; top: 40px; z-index: -1;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: clamp(200px, 34vw, 520px); line-height: .8; color: rgba(255, 255, 255, .035);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: end; }
.hero h1 { margin: 22px 0 26px; }
.hero h1 .line-red { color: var(--red); }
.hero .lead { margin-bottom: 32px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 99px;
  background: var(--ink-3); border: 1px solid var(--line-dark); font-size: 13px; color: #d6d9dd;
}
.hero-badge b {
  background: var(--gold); color: var(--ink); padding: 3px 10px; border-radius: 99px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
}
.hero-card {
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.hero-card .label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-dark); font-weight: 700; }
.hero-card .big { font-size: 64px; margin: 6px 0 4px; }
.hero-card ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.hero-card li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-top: 1px solid var(--line-dark); padding-top: 10px; }
.hero-card li span:last-child { color: #fff; font-weight: 600; text-align: right; }

.hero-banner { margin: clamp(48px, 7vw, 90px) 0 0; position: relative; }
figure { margin: 0; }
.hero-banner img { width: 100%; height: auto; aspect-ratio: 2400 / 486; object-fit: cover; }
@media (max-width: 700px) {
  .hero-banner img { aspect-ratio: 3 / 1; object-position: 0 50%; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (internas) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 6vw, 80px);
  background: radial-gradient(ellipse at 90% 10%, #3a1016 0%, transparent 50%), var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.page-hero .iso {
  position: absolute; right: -40px; bottom: -30px; width: min(520px, 55vw); opacity: .12; z-index: -1;
}
.page-hero h1 { margin: 18px 0 20px; }
.breadcrumb { font-size: 13px; color: var(--muted-dark); margin-bottom: 4px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }

/* ---------- Ticker ---------- */
.ticker { background: var(--red); color: #fff; overflow: hidden; white-space: nowrap; padding: 14px 0; }
.ticker-track { display: inline-flex; gap: 40px; animation: ticker 38s linear infinite; }
.ticker span {
  font-family: var(--font-display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: 26px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 40px;
}
.ticker span::after { content: "▲"; color: var(--gold); font-size: 16px; font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink); padding: 28px 24px; }
.stat .num { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: clamp(44px, 5vw, 64px); line-height: 1; color: #fff; }
.stat .num small { font-size: .45em; color: var(--gold); margin-left: 4px; }
.stat p { margin: 8px 0 0; color: var(--muted-dark); font-size: 14px; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tarjetas de carrera ---------- */
.race-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .race-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .race-grid { grid-template-columns: repeat(2, 1fr); } }

.race-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 300px; padding: 22px; border-radius: var(--radius); text-decoration: none;
  background: var(--ink-2); border: 1px solid var(--line-dark); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.race-card:hover { transform: translateY(-4px); border-color: var(--red); }
.race-card.featured { background: var(--red); border-color: var(--red); }
.race-card.featured:hover { border-color: var(--gold); }
.race-card .tag {
  align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: var(--gold);
}
.race-card.featured .tag { background: var(--ink); }
.race-card .code { font-size: 76px; color: #fff; }
.race-card .name { font-family: var(--font-display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 26px; line-height: 1; }
.race-card .meta { font-size: 13px; color: var(--muted-dark); margin-top: 8px; }
.race-card.featured .meta { color: #ffe1e2; }
.race-card .go { position: absolute; right: 20px; bottom: 20px; font-size: 22px; color: var(--gold); }
.race-card svg.mini-profile { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; opacity: .14; pointer-events: none; }

/* ---------- Bloques split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.wide-left { grid-template-columns: 1.2fr .8fr; }
@media (max-width: 900px) { .split, .split.wide-left { grid-template-columns: 1fr; } }

.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.media-frame.video { aspect-ratio: 16 / 9; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Vista previa de YouTube (carga el reproductor al hacer clic) */
.yt { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .3s ease; filter: brightness(.78); }
.yt::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .65)); }
.yt-play {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%);
  width: clamp(64px, 12vw, 92px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff;
  box-shadow: 0 0 0 10px rgba(227, 25, 32, .25), 0 12px 30px rgba(0, 0, 0, .4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.yt-play svg { width: 42%; height: 42%; margin-left: 6%; }
.yt-label {
  position: absolute; left: 18px; bottom: 14px; z-index: 1;
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 20px;
}
.yt:hover img { transform: scale(1.03); filter: brightness(.9); }
.yt:hover .yt-play, .yt:focus-visible .yt-play { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 0 0 16px rgba(227, 25, 32, .2), 0 12px 30px rgba(0, 0, 0, .4); }

/* ---------- Cards genéricas ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  padding: 28px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line-dark);
}
.card h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.01em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted-dark); }
.section-light .card, .section-paper .card { background: var(--paper); border-color: var(--line); }
.section-light .card p, .section-paper .card p { color: #535b62; }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(227, 25, 32, .12); color: var(--red);
}
.card .icon svg { width: 24px; height: 24px; }
.card.value h3 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 30px; }

.quote-block {
  border-left: 6px solid var(--red); padding: 8px 0 8px 28px;
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(32px, 4.4vw, 58px); line-height: 1;
}

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-dark); }
.section-light .table-wrap { border-color: var(--line); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
table.data th, table.data td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-dark); }
table.data thead th { background: var(--ink-3); color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td strong.code { font-family: var(--font-display); font-style: italic; font-size: 26px; color: var(--red); }
.section-light table.data th, .section-light table.data td { border-color: var(--line); }
.section-light table.data thead th { background: var(--ink); }
.section-light table.data tbody { background: #fff; }

/* ---------- Detalle de carreras ---------- */
.race-nav {
  position: sticky; top: var(--header-h); z-index: 50; background: rgba(17, 20, 25, .95);
  border-bottom: 1px solid var(--line-dark); backdrop-filter: blur(8px);
}
.race-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.race-nav ul::-webkit-scrollbar { display: none; }
.race-nav a {
  display: block; padding: 16px 16px; white-space: nowrap; text-decoration: none; color: #c4c9ce;
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 20px;
  border-bottom: 3px solid transparent;
}
.race-nav a:hover, .race-nav a.active { color: #fff; border-bottom-color: var(--red); }

.race-detail { padding: clamp(56px, 8vw, 100px) 0; border-bottom: 1px solid var(--line-dark); }
.race-detail:nth-of-type(even) { background: var(--ink-2); }
.race-detail-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 70px); }
@media (max-width: 900px) { .race-detail-grid { grid-template-columns: 1fr; } }
.race-detail .code-xl { font-size: clamp(110px, 16vw, 200px); color: var(--red); line-height: .8; }
.race-detail .code-xl.gold { color: var(--gold); }
.race-detail h2 { font-size: clamp(38px, 5vw, 64px); margin: 18px 0 12px; }
.race-detail .pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px;
  border: 1px solid var(--line-dark); font-size: 13px; color: #d6d9dd;
}
.pill.red { background: var(--red); border-color: var(--red); color: #fff; }
.pill.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.section-light .pill { border-color: #c9c5bb; color: var(--ink); }

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-dark); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-dark); }
.spec { background: var(--ink); padding: 20px; }
.race-detail:nth-of-type(even) .spec { background: var(--ink-2); }
.spec .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); font-weight: 700; }
.spec .v { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 34px; line-height: 1.05; margin-top: 4px; }
.spec .v small { font-size: .5em; color: var(--gold); margin-left: 3px; }
@media (max-width: 560px) { .spec-grid { grid-template-columns: repeat(2, 1fr); } }

.profile-svg { width: 100%; height: auto; margin-top: 18px; border-radius: var(--radius); background: var(--ink-3); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 4px;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.checklist.gold li::before { background-color: var(--gold); }

/* ---------- Barras comparativas ---------- */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 14px; }
.bar-row .lbl { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 24px; }
.bar-row .track { height: 14px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 99px; width: 0; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: #fff; }
.section-light .bar-row .track { background: #e4e0d5; }
.section-light .bar-row .val { color: var(--ink); }

/* ---------- Timeline / agenda ---------- */
.agenda { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .agenda { grid-template-columns: 1fr; } }
.agenda-day { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.agenda-day header { background: var(--ink); color: #fff; padding: 18px 22px; }
.agenda-day header .d { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; }
.agenda-day header .s { font-size: 13px; color: var(--muted-dark); }
.agenda-day ol { list-style: none; margin: 0; padding: 8px 22px 18px; }
.agenda-day li { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agenda-day li:last-child { border-bottom: 0; }
.agenda-day time { font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; }
.agenda-day li b { display: block; color: var(--ink); }
.agenda-day li span { font-size: 13px; color: var(--muted); }

/* ---------- Tabs ---------- */
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tabs [role="tab"] {
  padding: 10px 18px; border-radius: 99px; border: 1px solid var(--line-dark); background: transparent; color: #cfd3d8;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 20px; text-transform: uppercase; cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.section-light .tabs [role="tab"] { border-color: #c9c5bb; color: var(--ink); }
.section-light .tabs [role="tab"][aria-selected="true"] { color: #fff; border-color: var(--red); }
.tabs [role="tabpanel"][hidden] { display: none; }

/* ---------- Acordeón FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line-dark); border-radius: var(--radius-sm); background: var(--ink-2); }
.section-light .faq details { background: #fff; border-color: var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 22px; position: relative; font-weight: 700; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff;
  font-size: 20px; line-height: 1; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 22px 22px; color: var(--muted-dark); }
.section-light .faq .answer { color: #4b535a; }
.faq .answer p:last-child { margin: 0; }

/* ---------- Notas ---------- */
.note {
  border-left: 4px solid var(--gold); background: rgba(249, 170, 18, .08); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px; color: #d9dcdf;
}
.section-light .note, .section-paper .note { background: #fff6e1; color: #4b4232; }
.note strong { color: var(--gold); }
.section-light .note strong, .section-paper .note strong { color: #a96b00; }

/* ---------- Podio ---------- */
.podium { display: grid; gap: 10px; }
.podium-row {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 18px; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius-sm);
}
.podium-row .pos { font-family: var(--font-display); font-weight: 800; font-style: italic; font-size: 34px; line-height: 1; color: var(--muted-dark); }
.podium-row:first-child .pos { color: var(--gold); }
.podium-row:first-child { border-color: rgba(249, 170, 18, .5); }
.podium-row .who b { display: block; font-size: 16px; }
.podium-row .who span { font-size: 13px; color: var(--muted-dark); }
.podium-row .time { font-variant-numeric: tabular-nums; font-weight: 700; }

.edition-card { background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.edition-card > header { padding: 26px 28px; border-bottom: 1px solid var(--line-dark); display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.edition-card > header .year { font-size: 72px; color: var(--red); }
.edition-card .body { padding: 26px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.edition-card .body h4 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 12px; }
.edition-card .body .podium-row { background: var(--ink); }
@media (max-width: 760px) { .edition-card .body { grid-template-columns: 1fr; } }

/* ---------- Tienda ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button {
  padding: 10px 18px; border-radius: 99px; border: 1px solid var(--line-dark); background: transparent; color: #cfd3d8;
  font: 600 14px var(--font-body); cursor: pointer; transition: all .15s;
}
.filters button:hover { border-color: #fff; color: #fff; }
.filters button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1050px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.product { display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.product:hover { border-color: var(--red); transform: translateY(-3px); }
.product[hidden] { display: none; }
.product .ph { position: relative; aspect-ratio: 4 / 5; background: #131313; display: grid; place-items: center; overflow: hidden; }
.product .ph img { width: 100%; height: 100%; object-fit: contain; transition: opacity .3s, transform .4s; }
.product .ph img.alt { position: absolute; inset: 0; opacity: 0; }
.product:hover .ph img.alt { opacity: 1; }
.product:hover .ph img:not(.alt) { transform: scale(1.03); }
.product .badge { position: absolute; left: 12px; top: 12px; z-index: 2; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; background: var(--red); color: #fff; }
.product .badge.gold { background: var(--gold); color: var(--ink); }
.product .info { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .cat { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.product h3 { font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; line-height: 1.05; }
.product p { font-size: 13px; color: var(--muted-dark); margin: 4px 0 12px; }
.product .row { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; }
.product .price { font-size: 13px; font-weight: 700; color: #fff; }
.product .ask { font-size: 13px; font-weight: 700; color: var(--gold); text-decoration: none; white-space: nowrap; }
.product .ask:hover { text-decoration: underline; }

/* ---------- Social links ---------- */
.channel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .channel-grid { grid-template-columns: 1fr; } }
.channel {
  display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: var(--radius); text-decoration: none;
  background: var(--ink-2); border: 1px solid var(--line-dark); transition: transform .2s, border-color .2s;
}
.channel:hover { transform: translateY(-2px); border-color: var(--gold); }
.channel .ic { width: 52px; height: 52px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--ink-3); color: var(--gold); }
.channel .ic svg { width: 24px; height: 24px; }
.channel b { display: block; font-size: 17px; }
.channel span { color: var(--muted-dark); font-size: 14px; }
.channel .arr { margin-left: auto; color: var(--gold); font-size: 22px; }

/* ---------- CTA banda ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--red); color: #fff; padding: clamp(56px, 8vw, 96px) 0; }
.cta-band .iso { position: absolute; right: -60px; bottom: -40px; width: min(560px, 60vw); opacity: .16; filter: brightness(0); }
.cta-band .inner { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta-band .lead { color: #ffe4e5; }
@media (max-width: 800px) { .cta-band .inner { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: #0b0d10; color: #c6cbd0; padding: 72px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; color: #c6cbd0; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand img { width: 220px; margin-bottom: 16px; }
.footer-brand p { color: var(--muted-dark); max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-3); color: #fff; }
.footer-social a:hover { background: var(--red); color: #fff; }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: #868d95; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Ajustes móvil ---------- */
@media (max-width: 1080px) {
  /* backdrop-filter crea un contenedor para los hijos fixed y rompería el menú */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink); }
}

/* Indicador de desplazamiento en la navegación de carreras */
.race-nav .wrap { position: relative; }
@media (max-width: 760px) {
  .race-nav .wrap::after {
    content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 48px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--ink));
  }
  .race-nav a { padding: 14px 12px; font-size: 19px; }
}

/* Tabla apilada en tarjetas */
@media (max-width: 700px) {
  table.data.stack { min-width: 0; }
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
  table.data.stack tbody tr:last-child { border-bottom: 0; }
  table.data.stack td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 110px 1fr; gap: 12px; white-space: normal; }
  table.data.stack td::before {
    content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted); padding-top: 3px;
  }
  table.data.stack td.head { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; }
  table.data.stack td.head::before { display: none; }
  table.data.stack td.head br { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 30px; }
  .card { padding: 22px; }
  .lead { font-size: 17px; }

  /* Hero */
  .hero { padding-top: 40px; }
  .hero h1 { font-size: clamp(54px, 15vw, 80px); margin: 18px 0 20px; }
  .hero .btn-row .btn { flex: 1 1 auto; }
  .hero-card { padding: 22px; }
  .hero-card .big { font-size: 52px; }
  .hero-card li { font-size: 13px; }
  .hero-banner { margin-top: 40px; }
  .page-hero { padding: 48px 0 40px; }
  .ticker span { font-size: 22px; }

  /* Tarjetas de carrera compactas: 2 columnas, la prueba reina a lo ancho */
  .race-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .race-card { min-height: 0; padding: 16px; gap: 26px; }
  .race-card.featured { grid-column: 1 / -1; order: -1; }
  .race-card .code { font-size: 54px; }
  .race-card .name { font-size: 20px; }
  .race-card .meta { font-size: 12px; margin-top: 6px; }
  .race-card .tag { font-size: 10px; padding: 4px 8px; }
  .race-card .go { right: 14px; bottom: 14px; }

  /* Stats */
  .stat { padding: 20px 16px; }
  .stat .num { font-size: 42px; }
  .stat p { font-size: 13px; }

  /* Fichas de carrera */
  .race-detail { padding: 56px 0; }
  .race-detail .code-xl { font-size: 110px; }
  .spec { padding: 16px; }
  .spec .v { font-size: 28px; }
  .bar-row { grid-template-columns: 52px 1fr 70px; gap: 10px; }
  .bar-row .lbl { font-size: 22px; }

  /* Categorías y logos en 2 columnas */
  .grid-3.cats, .grid-2.logos { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid-3.cats .card { padding: 16px; }
  .grid-3.cats .card h3 { font-size: 17px; }
  .grid-3.cats .card p { font-size: 13px; }
  .grid-2.logos .card { min-height: 120px !important; padding: 16px; }

  /* Podios */
  .edition-card > header, .edition-card .body { padding: 20px 16px; }
  .edition-card > header .year { font-size: 60px; }
  .podium-row { grid-template-columns: 30px 1fr auto; gap: 10px; padding: 12px 14px; }
  .podium-row .pos { font-size: 28px; }
  .podium-row .who b { font-size: 15px; }
  .podium-row .who span { font-size: 12px; }
  .podium-row .time { font-size: 14px; }

  /* Tienda */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)) 22px; padding: 0 var(--gutter); scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  .product .info { padding: 12px 12px 14px; }
  .product h3 { font-size: 20px; }
  .product p { display: none; }
  .product .row { margin-top: 10px; }

  /* Agenda */
  .agenda-day header .d { font-size: 26px; }

  /* CTA */
  .cta-band .btn-row .btn { flex: 1 1 auto; }

  /* Footer: grupos de enlaces en 2 columnas */
  .site-footer { padding-top: 56px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 36px; flex-direction: column; }

  .yt-label { font-size: 17px; left: 14px; bottom: 10px; }
}

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0; }
.mt-s { margin-top: 16px; }
.mt-m { margin-top: 32px; }
.mt-l { margin-top: 56px; }
.center { text-align: center; }
.muted { color: var(--muted-dark); font-size: 14px; }
.section-light .muted { color: var(--muted); }
