:root {
  --yellow: #ffcc00;
  --blue: #00247d;
  --red: #cf142b;
  --navy: #0d1d52;
  --ink: #13203f;
  --muted: #5b6680;
  --paper: #f7f8fb;
  --white: #ffffff;
  --line: #dfe4ee;
  --sky: #eef2fb;
  --gold: #e0a800;
  --silver: #9aa4b5;
  --bronze: #b97a46;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Bricolage Grotesque", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* lightbox theme */
  --lb-bg: rgba(13, 29, 82, .94);
  --lb-accent: #ffcc00;
  --lb-font: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-variation-settings: "opsz" 14;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h2 {
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  font-weight: 750;
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--navy);
}

/* ---------- Top bar ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  transition: background .3s, box-shadow .3s;
}
.top.scrolled {
  background: rgba(247, 248, 251, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.mark {
  font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em;
  text-decoration: none; color: var(--navy);
}
.top nav { margin-left: auto; display: flex; gap: 4px; }
.top nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--muted);
  padding: 6px 12px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.top nav a:hover { color: var(--navy); background: var(--sky); }
.stars-progress { width: 76px; height: 33px; overflow: visible; }
.stars-progress .st { fill: none; stroke: var(--navy); stroke-width: 1; stroke-opacity: .45; transition: fill .3s, stroke-opacity .3s; }
.stars-progress .st.on { fill: var(--yellow); stroke: var(--gold); stroke-opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 130px var(--pad) 96px;
  overflow: hidden;
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px);
  align-items: center;
  max-width: 1320px; margin: 0 auto;
}
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-weight: 650; font-size: 1rem; color: var(--muted);
}
.kicker-stars { width: 60px; height: 24px; overflow: visible; flex: none; }
.kicker-stars .st { fill: var(--yellow); stroke: var(--gold); stroke-width: 3; }
.name {
  margin-top: 18px;
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--navy);
}
.name > span { display: block; overflow: hidden; padding-bottom: .06em; }
.name > span > span { display: inline-block; }
.name .l1 { font-size: clamp(3rem, 7vw, 7rem); }
.name .l2 { font-size: clamp(3rem, 7vw, 7rem); color: var(--blue); }
.name .l2 > span { position: relative; }
.name .l2 > span::after {
  /* a short tricolor underline under the surname */
  content: ""; position: absolute; left: .04em; bottom: -.02em;
  width: 1.6em; height: .09em; border-radius: 99px;
  background: linear-gradient(90deg, var(--yellow) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6%);
}
.hero-copy {
  margin-top: 30px;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.5; color: var(--muted);
  max-width: 28em;
}
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; text-decoration: none;
  font-weight: 650; font-size: 1rem;
  padding: 14px 24px; border-radius: 999px;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn.primary { background: var(--navy); color: var(--white); box-shadow: 0 10px 24px -12px rgba(13, 29, 82, .7); }
.btn.primary:hover { transform: translateY(-2px); background: var(--blue); }
.btn.ghost { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); background: var(--white); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }

/* The stage: Daniel rides out of an arch, under the flag's arc of seven stars.
   Every layer shares the photo's 864x1080 box, so the cutout sits exactly on the photo. */
.stage {
  --top: 31.5%;            /* where the arch begins; his head rides above it */
  position: relative; justify-self: end;
  width: min(100%, 520px); aspect-ratio: 864 / 1080;
  container-type: inline-size;
}
.stage > * { position: absolute; }
.stage::before {
  /* the arch's shadow (clip-path would cut a box-shadow off) */
  content: ""; position: absolute; left: 3%; right: 3%; bottom: 0; top: calc(var(--top) + 6%);
  border-radius: 50cqw 50cqw 22px 22px;
  box-shadow: 0 50px 70px -30px rgba(13, 29, 82, .55);
}
.stage-sun {
  left: calc(49.1% - 24cqw); top: calc(26% - 24cqw);
  width: 48cqw; height: 48cqw; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffe680 0%, var(--yellow) 48%, #f4b400 100%);
  box-shadow: 0 0 0 1.4cqw rgba(255, 204, 0, .18), 0 0 0 3.4cqw rgba(255, 204, 0, .08);
}
.stage-stars { inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage-stars .st { fill: var(--blue); }
.stage-frame {
  inset: 0;
  clip-path: inset(var(--top) 0 0 0 round 50cqw 50cqw 22px 22px);
  background: var(--line);
}
.stage-plate, .stage-cut { width: 100%; height: 100%; object-fit: cover; }
.stage-cut { inset: 0; pointer-events: none; }
.badge {
  left: -30px; top: 52%;
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: var(--white); color: var(--navy);
  box-shadow: 0 14px 30px -12px rgba(13, 29, 82, .4);
  line-height: .95;
}
.badge b { font-size: 2.6rem; font-weight: 800; letter-spacing: -.04em; }
.badge i { font-style: normal; font-size: .85rem; font-weight: 600; color: var(--muted); }
.credit { right: 0; bottom: -30px; font-size: .78rem; color: var(--muted); }

/* hero load sequence (motion only) */
.motion .name > span > span { animation: rise .9s var(--ease) both; }
.motion .name .l2 > span { animation-delay: .1s; }
.motion .stage-frame { animation: archIn 1.3s cubic-bezier(.7, 0, .2, 1) .1s both; }
.motion .stage-cut { animation: cutIn 1s var(--ease) .75s both; }
.motion .stage-sun { animation: sunIn 1.4s var(--ease) .5s both; }
.motion .stage-stars .st { transform-box: fill-box; transform-origin: center; animation: starPop .6s cubic-bezier(.2, 1.7, .4, 1) both; }
.motion .stage-stars .st:nth-child(1) { animation-delay: 1.15s; } .motion .stage-stars .st:nth-child(2) { animation-delay: 1.23s; }
.motion .stage-stars .st:nth-child(3) { animation-delay: 1.31s; } .motion .stage-stars .st:nth-child(4) { animation-delay: 1.39s; }
.motion .stage-stars .st:nth-child(5) { animation-delay: 1.47s; } .motion .stage-stars .st:nth-child(6) { animation-delay: 1.55s; }
.motion .stage-stars .st:nth-child(7) { animation-delay: 1.63s; }
.motion .badge { animation: fade .8s ease 1.2s both; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes archIn { from { clip-path: inset(100% 0 0 0 round 50cqw 50cqw 22px 22px); } }
@keyframes cutIn { from { opacity: 0; transform: translateY(6%); } to { opacity: 1; transform: none; } }
@keyframes sunIn { from { opacity: 0; transform: translateY(30%) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes starPop { from { opacity: 0; transform: scale(0) rotate(-40deg); } to { opacity: 1; transform: none; } }

/* ---------- Tricolor rule ---------- */
.tricolor { display: flex; height: 6px; max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.tricolor i { flex: 1; }
.tricolor i:nth-child(1) { background: var(--yellow); }
.tricolor i:nth-child(2) { background: var(--blue); }
.tricolor i:nth-child(3) { background: var(--red); }

/* ---------- Rider card ---------- */
.ficha {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  padding: 120px var(--pad);
  max-width: 1320px; margin: 0 auto;
}
.ficha-copy p { margin-top: 22px; max-width: 30em; font-size: 1.15rem; color: var(--muted); }
.ficha-copy .hint { font-size: .9rem; margin-top: 14px; }
.card-stage { perspective: 1200px; display: grid; place-items: center; }
.card {
  width: min(100%, 360px); margin-top: 90px; outline: none;
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 0%; --go: 0; --px: 0; --py: 0;
}
.card-inner {
  position: relative;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 30px 60px -28px rgba(13, 29, 82, .45), 0 0 0 1px var(--line);
  padding: 12px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease);
}
.card:hover .card-inner, .card:focus-visible .card-inner { transition: transform .1s linear; }
/* .card-art is the shared coordinate box: the window shows rows 30%-96% of the
   portrait and the helmet rides out above it. */
.card-art { position: relative; container-type: inline-size; }
.card-photo {
  position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3.3;
  background: linear-gradient(160deg, #e9eef8, #c9d4ea);
}
.card-plate, .card-cut { position: absolute; left: 0; top: -37.5cqw; width: 100cqw; height: auto; max-width: none; }
.card-cut {
  pointer-events: none;
  clip-path: inset(0 0 5cqw 0);
  translate: calc(var(--px) * 1px) calc(var(--py) * 1px);
  transition: translate .6s var(--ease);
  filter: drop-shadow(0 10px 14px rgba(13, 29, 82, .25));
}
.card:hover .card-cut { transition: translate .1s linear; }
.card-num {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.foil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 204, 0, .5) 36%, rgba(80, 160, 255, .45) 48%, rgba(255, 80, 120, .4) 60%, transparent 76%);
  background-size: 260% 260%;
  background-position: var(--gx) var(--gy);
  opacity: calc(var(--go) * .55); transition: opacity .3s;
}
.card-body { padding: 16px 6px 6px; }
.card-name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-name strong { font-weight: 750; font-size: 1.3rem; letter-spacing: -.02em; color: var(--navy); }
.flag { display: inline-flex; flex-direction: column; width: 28px; height: 18px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--line); }
.flag i { flex: 1; } .flag i:nth-child(1) { background: var(--yellow); } .flag i:nth-child(2) { background: var(--blue); } .flag i:nth-child(3) { background: var(--red); }
.card-stars { width: 116px; height: 16px; margin: 10px 0 12px; display: block; }
.card-stars .st { fill: var(--yellow); stroke: var(--gold); stroke-width: 1.2; }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card-stats div { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.card-stats dt { font-size: .78rem; font-weight: 600; color: var(--muted); }
.card-stats dd { font-weight: 750; font-size: 1.6rem; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.card-stats dd.small { font-size: 1rem; padding-top: 6px; }
.glare {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 3;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.5), rgba(255,255,255,0) 50%);
  opacity: var(--go); transition: opacity .3s;
}

/* ---------- Moment band ---------- */
.momento { padding: 0 var(--pad) 120px; }
.momento-fig {
  position: relative; max-width: 1320px; margin: 0 auto;
  border-radius: 28px; overflow: hidden;
  aspect-ratio: 21 / 9; min-height: 340px; background: var(--navy);
  box-shadow: 0 40px 70px -40px rgba(13, 29, 82, .6);
}
.momento-fig img {
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%;
  transform: scale(var(--z, 1)); transform-origin: 70% 40%;
}
.momento-fig::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13, 29, 82, .78) 0%, rgba(13, 29, 82, .35) 38%, rgba(13, 29, 82, 0) 62%);
}
.momento-fig figcaption {
  position: absolute; z-index: 1; left: clamp(24px, 5vw, 72px); bottom: clamp(24px, 5vw, 64px);
  color: var(--white); display: flex; flex-direction: column; gap: 10px;
}
.m-k { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: .95rem; color: var(--yellow); }
.m-k::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: currentColor; }
.m-t {
  font-variation-settings: "opsz" 96; font-weight: 750;
  font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: .95; letter-spacing: -.04em; max-width: 9em;
}

/* ---------- Podium ---------- */
.podios {
  background: var(--navy); color: var(--white);
  padding: 110px var(--pad) 0;
  text-align: center;
  position: relative; overflow: hidden;
}
.podios h2 { color: var(--white); }
.podios .lede { margin-top: 14px; font-size: 1.1rem; color: rgba(255,255,255,.7); }
.podium {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 220px));
  justify-content: center; align-items: end; gap: 10px;
  margin-top: 64px;
}
.podium li { display: flex; flex-direction: column; align-items: center; }
.podium .count { font-weight: 800; font-size: clamp(3.4rem, 7vw, 6rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.podium .label { font-weight: 500; font-size: 1rem; color: rgba(255,255,255,.72); margin: 6px 0 20px; }
.podium .block {
  width: 100%; border-radius: 14px 14px 0 0;
  display: grid; place-items: start center; padding-top: 16px;
  font-weight: 800; font-size: 2.2rem;
}
.p1 .block { height: 260px; background: var(--yellow); color: var(--navy); }
.p2 .block { height: 190px; background: rgba(255,255,255,.14); color: var(--white); }
.p3 .block { height: 140px; background: rgba(255,255,255,.08); color: var(--white); }
.p1 .count { color: var(--yellow); }

/* ---------- Results ---------- */
.resultados { padding: 120px var(--pad) 100px; max-width: 1320px; margin: 0 auto; }
.res-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 24px; }
.filters { display: flex; gap: 4px; padding: 4px; background: var(--white); border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }
.filters button {
  font: 600 .95rem var(--body);
  border: 0; border-radius: 999px;
  background: none; color: var(--muted);
  padding: 8px 18px; cursor: pointer;
  transition: background .2s, color .2s;
}
.filters button:hover { color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.res-table { width: 100%; border-collapse: collapse; margin-top: 40px; }
.res-table th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 12px 10px; border-bottom: 1px solid var(--line); }
.res-table td { padding: 18px 10px; border-bottom: 1px solid var(--line); font-size: 1.15rem; font-weight: 600; vertical-align: middle; }
.res-table td span { display: block; font-size: .88rem; font-weight: 450; color: var(--muted); }
.res-table td.pos { width: 84px; }
.medal {
  display: inline-grid !important; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.15rem !important; font-weight: 800 !important; color: var(--white) !important;
}
.medal.g { background: var(--gold); }
.medal.s { background: var(--silver); }
.medal.b { background: var(--bronze); }
.res-table .yr { color: var(--muted); font-variant-numeric: tabular-nums; width: 80px; }
.t { font-style: normal; font-size: .82rem; font-weight: 650; padding: 4px 12px; border-radius: 999px; }
.t.ruta { background: var(--sky); color: var(--blue); }
.t.mtb { background: #fff4cc; color: #7a5a00; }
.res-table tbody tr { transition: background .2s; }
.res-table tbody tr:hover { background: var(--white); }
.res-table tr.hide { display: none; }

/* ---------- Gallery ---------- */
.fotos { padding: 20px var(--pad) 120px; max-width: 1320px; margin: 0 auto; }
.fotos-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 24px; flex-wrap: wrap; }
.fotos-head p { color: var(--muted); font-size: 1rem; }
.bento {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 16vw, 215px); grid-auto-flow: dense; gap: 14px;
}
.ph {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius); background: var(--line);
  isolation: isolate;
}
.ph.tall { grid-row: span 2; }
.ph.wide { grid-column: span 2; }
.ph.big { grid-column: span 2; grid-row: span 3; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.ph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(13, 29, 82, .65), rgba(13, 29, 82, 0) 45%);
  opacity: 0; transition: opacity .4s;
}
.ph span {
  position: absolute; z-index: 1; left: 16px; bottom: 14px;
  color: var(--white); font-weight: 650; font-size: 1rem;
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease);
}
.ph:hover img, .ph:focus-visible img { transform: scale(1.05); }
.ph:hover::after, .ph:focus-visible::after, .ph:hover span, .ph:focus-visible span { opacity: 1; transform: none; }
.ph.big span { font-size: 1.3rem; left: 22px; bottom: 20px; }
.photo-credit { margin-top: 18px; font-size: .85rem; color: var(--muted); }

/* ---------- Support ---------- */
.apoyo { padding: 0 var(--pad) 120px; }
.apoyo-inner {
  max-width: 1320px; margin: 0 auto;
  background: var(--white); border-radius: 28px;
  box-shadow: 0 0 0 1px var(--line);
  padding: clamp(32px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; align-items: start;
  position: relative; overflow: hidden;
}
.apoyo-inner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--yellow) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6%);
}
.apoyo-copy p { font-size: 1.15rem; color: var(--muted); max-width: 30em; }
.apoyo-copy .btn { margin-top: 26px; }
.apoyo .fine { margin-top: 16px; font-size: .9rem; }
.sponsors { grid-column: 1 / -1; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sponsors li {
  height: 84px; display: grid; place-items: center;
  border: 1.5px dashed var(--line); border-radius: 14px;
  font-weight: 600; font-size: .95rem; color: var(--muted);
}

/* ---------- Footer ---------- */
.foot { background: var(--navy); color: var(--white); text-align: center; padding: 70px var(--pad) 90px; }
.foot-stars { width: min(220px, 60%); margin: 0 auto; display: block; overflow: visible; }
.foot-stars .st { fill: var(--white); }
.foot-name { font-weight: 750; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.03em; margin-top: -4px; }
.foot-small { margin-top: 10px; color: rgba(255,255,255,.65); font-size: .95rem; }

/* ---------- Reveal (only when JS + motion) ---------- */
.motion .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .8s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .podium .block { transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--ease); }
.motion .podium.in .block { transform: none; }
.motion .podium.in .p1 .block { transition-delay: .12s; }
.motion .podium.in .p3 .block { transition-delay: .24s; }
.motion .bento .ph { opacity: 0; transform: translateY(30px) scale(.98); transition: opacity .8s ease, transform .9s var(--ease); }
.motion .bento .ph.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .top nav { display: none; }
  .stars-progress { margin-left: auto; }
  .hero { padding-top: 104px; padding-bottom: 80px; }
  .hero-grid { grid-template-columns: 1fr; }
  .stage { justify-self: center; width: min(100%, 400px); margin-top: 6px; }
  .badge { left: -8px; width: 88px; height: 88px; }
  .badge b { font-size: 2.1rem; }
  .ficha { grid-template-columns: 1fr; gap: 20px; padding: 90px var(--pad); }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 42vw; gap: 10px; }
  .ph.big { grid-row: span 2; }
  .ph span { opacity: 1; transform: none; font-size: .9rem; left: 12px; bottom: 10px; }
  .ph::after { opacity: 1; }
  .apoyo-inner { grid-template-columns: 1fr; }
  .sponsors { grid-template-columns: 1fr 1fr; }
  .momento-fig { aspect-ratio: 4 / 5; min-height: 0; }
  .momento-fig img { object-position: 78% 50%; }
  .momento-fig::after { background: linear-gradient(0deg, rgba(13, 29, 82, .85) 0%, rgba(13, 29, 82, 0) 55%); }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .ph { border-radius: 12px; }
  .podium { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 48px; }
  .podium .label { font-size: .85rem; }
  .p1 .block { height: 180px; } .p2 .block { height: 130px; } .p3 .block { height: 96px; }
  .podium .block { font-size: 1.6rem; }
  .res-table th:nth-child(3), .res-table td:nth-child(3) { display: none; }
  .res-table td.pos { width: 56px; }
  .medal { width: 36px; height: 36px; }
  .res-table td { font-size: 1rem; padding: 14px 6px; }
  .res-table .yr { width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-inner, .ph img, .btn, .card-cut { transition: none; }
}

@media (pointer: coarse) { .ficha-copy .hint { display: none; } }

/* ---------- MTB moment ---------- */
/* Split panel: copy on the left, the whole photo on the right (a 21:9 crop
   of this 5:4 shot cuts his head off) */
.momento-mtb { padding-top: clamp(72px, 9vw, 120px); }
.momento-mtb .momento-fig {
  aspect-ratio: auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  background: #0f3a2b radial-gradient(110% 120% at 0% 100%, #1d5a3f 0%, rgba(29, 90, 63, 0) 60%);
  box-shadow: 0 40px 70px -40px rgba(15, 58, 43, .7);
}
.momento-mtb .momento-fig::after { display: none; }
.momento-mtb .momento-fig img {
  grid-column: 2; grid-row: 1; height: 100%; aspect-ratio: 5 / 4;
  object-fit: cover; object-position: 50% 40%; transform: none;
}
.momento-mtb .momento-fig figcaption {
  position: static; grid-column: 1; grid-row: 1; align-self: center;
  padding: clamp(28px, 4.5vw, 72px);
}
.momento-mtb .m-k { color: #b9e27a; }
.momento-mtb .m-t { font-size: clamp(2.2rem, 4vw, 4rem); }
.m-p { color: rgba(233, 243, 228, .8); max-width: 30ch; font-size: 1.05rem; line-height: 1.5; }
.m-link { color: #b9e27a; font-weight: 650; text-decoration: none; margin-top: 8px; }
.m-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Season: race by race ---------- */
.carreras { padding: 40px var(--pad) 90px; }
.car-head {
  max-width: 1240px; margin: 0 auto 72px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end;
}
.car-head p { color: var(--muted); max-width: 44ch; font-size: 1.1rem; }
.car-list { list-style: none; max-width: 1240px; margin: 0 auto; position: relative; }
.car-list::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 60px; width: 4px; border-radius: 4px;
  background: linear-gradient(var(--yellow) 0 33.3%, var(--blue) 33.3% 66.6%, var(--red) 66.6%);
}
.car {
  position: relative; z-index: 0;
  display: grid; grid-template-columns: minmax(240px, .8fr) 2fr; gap: clamp(24px, 4vw, 64px);
  padding: 0 0 96px 92px;
}
.car-info { position: sticky; top: 100px; align-self: start; }
.car-n {
  position: absolute; left: -92px; top: -6px;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--white); border: 3px solid var(--navy); color: var(--navy);
  font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em;
  box-shadow: 0 0 0 8px var(--paper);
}
.car:has(.car-res.is-gold) .car-n { background: var(--yellow); border-color: var(--yellow); }
.car-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.car-meta time { font-weight: 650; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.car-res { font-size: .82rem; font-weight: 750; padding: 4px 12px; border-radius: 999px; }
.car-res.is-gold { background: var(--yellow); color: var(--navy); }
.car-res.is-podio { background: var(--navy); color: var(--white); }
.car h3 {
  font-variation-settings: "opsz" 96; font-weight: 750; color: var(--navy);
  font-size: clamp(1.7rem, 2.7vw, 2.5rem); line-height: 1.02; letter-spacing: -.03em;
  margin: 16px 0 6px;
}
.car-place { font-weight: 650; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.car-place::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.car-text { margin-top: 16px; max-width: 34ch; }
.car-credit { margin-top: 16px; font-size: .8rem; color: var(--muted); }

/* Justified photo rows: every photo in a row shares one height */
.jrow { display: flex; gap: 12px; }
.jrow + .jrow { margin-top: 12px; }
.jph {
  flex: var(--ar) 1 0; aspect-ratio: var(--ar); min-width: 0;
  position: relative; display: block; overflow: hidden; border-radius: 16px; background: var(--sky);
}
.jph img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.jph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(13, 29, 82, .7), rgba(13, 29, 82, 0) 45%);
  opacity: 0; transition: opacity .4s;
}
.jph span {
  position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px;
  color: var(--white); font-weight: 650; font-size: .98rem; line-height: 1.2;
  opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease);
}
.jph:hover img, .jph:focus-visible img { transform: scale(1.05); }
.jph:hover::after, .jph:focus-visible::after, .jph:hover span, .jph:focus-visible span { opacity: 1; transform: none; }

/* The mountain race gets its own forest-green panel */
.car.mtb { color: #e9f3e4; }
.car.mtb::after {
  content: ""; position: absolute; z-index: -1; inset: -48px -36px 48px 60px;
  border-radius: 32px; background: #0f3a2b;
  background-image: radial-gradient(120% 90% at 0% 0%, #1d5a3f 0%, rgba(29, 90, 63, 0) 60%);
}
.car.mtb .car-n { border-color: #b9e27a; background: #0f3a2b; color: #b9e27a; box-shadow: none; }
.car.mtb h3 { color: var(--white); }
.car.mtb .car-place { color: #b9e27a; }
.car.mtb .car-meta time, .car.mtb .car-credit { color: rgba(233, 243, 228, .65); }
.car.mtb .t.mtb { background: #b9e27a; color: #0f3a2b; }
.car.mtb .car-res.is-podio { background: var(--white); color: #0f3a2b; }
.car.mtb .jph { background: #174a37; }
.car.mtb .jph::after { background: linear-gradient(0deg, rgba(10, 44, 32, .75), rgba(10, 44, 32, 0) 45%); }
.car.mtb + .car { margin-top: 48px; }

.motion .car-photos .jph { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s var(--ease); }
.motion .car-photos.in .jph { opacity: 1; transform: none; }
.motion .car-photos.in .jph:nth-child(2) { transition-delay: 80ms; }
.motion .car-photos.in .jph:nth-child(3) { transition-delay: 160ms; }

@media (max-width: 900px) {
  .momento-mtb .momento-fig { grid-template-columns: 1fr; }
  .momento-mtb .momento-fig img { grid-column: 1; grid-row: 1; height: auto; }
  .momento-mtb .momento-fig figcaption { grid-column: 1; grid-row: 2; padding: 26px 24px 30px; }
  .car-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 48px; }
  .car { grid-template-columns: 1fr; gap: 22px; padding: 0 0 72px 64px; }
  .car-info { position: relative; top: 0; }
  .car-n { left: -64px; width: 44px; height: 44px; font-size: .9rem; top: -2px; }
  .car-list::before { left: 20px; }
  .car.mtb::after { inset: -32px -16px 32px 44px; border-radius: 24px; }
  .car.mtb { padding-right: 4px; }
  .jph span { opacity: 1; transform: none; font-size: .85rem; left: 12px; bottom: 10px; }
  .jph::after { opacity: 1; }
}
@media (max-width: 640px) {
  .car { padding-left: 0; }
  .car-list::before { display: none; }
  .car-n { position: static; display: inline-grid; margin-bottom: 14px; box-shadow: none; }
  .car.mtb::after { inset: -28px calc(-1 * var(--pad)) 28px calc(-1 * var(--pad)); border-radius: 0; }
  /* photos become a swipeable strip */
  .car-photos {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 6px; scrollbar-width: none;
  }
  .car-photos::-webkit-scrollbar { display: none; }
  .jrow { display: contents; }
  .jph { flex: 0 0 auto; height: min(78vw, 420px); width: auto; scroll-snap-align: start; scroll-margin-left: var(--pad); border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .jph img { transition: none; } }
.car h3.long { font-size: clamp(1.5rem, 2.2vw, 2.05rem); }
