/* ============ Maratón de Valdivia 2027 · v3 marca ============ */
@font-face { font-family: "Antique Olive Nord"; src: url("../assets/fonts/AntiqueOliveStd-Nord.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Antique Olive"; src: url("../assets/fonts/AntiqueOliveStd-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Antique Olive"; src: url("../assets/fonts/AntiqueOliveStd-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* marca */
  --night: #06185a;
  --indigo: #0a2a8f;
  --blue: #0d47d4;
  --cyan: #00e3d6;
  --sky: #3fb8e0;
  --violet: #00a9d8;
  --sun: #f5a51c;
  --orange: #ef5a24;
  --red: #d8141f;
  --white: #ffffff;
  /* variantes para texto sobre blanco (contraste WCAG AA) */
  --sky-text: #219fc9;
  --orange-text: #d3430f;
  --paper: #f3f5fa;
  --ink: #0e1a33;
  --ink-2: #475569;
  --line: #e0e3ee;
  --grad: linear-gradient(125deg, #06185a 0%, #0a2a8f 30%, #0d47d4 55%, #00a9d8 78%, #00e3d6 100%);
  --nord: "Antique Olive Nord", "Antique Olive", "Arial Black", sans-serif;
  --olive: "Antique Olive", "Arial Black", sans-serif;
  --body: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --maxw: 1240px;
  --nav-h: 76px;
  --r: 16px 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: var(--nav-h); }
.section[id] { scroll-margin-top: calc(var(--nav-h) + 24px - clamp(84px, 10vw, 128px)); }
body { margin: 0; font: 400 16px/1.65 var(--body); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; }
/* Accesibilidad: foco visible con teclado y enlace para saltar al contenido */
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
main:focus { outline: none; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 18px; border-radius: 8px; background: var(--white); color: var(--night); font-weight: 700; text-decoration: none; transform: translateY(-200%); transition: transform .2s; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.small { font-size: 14px; }
.muted { color: var(--ink-2); }

/* ---------- Tipos ---------- */
.eyebrow { margin: 0 0 14px; font: 700 13px/1 var(--body); letter-spacing: .28em; text-transform: uppercase; color: var(--blue); }
.eyebrow--light { color: var(--cyan); }
.h2 { font: 900 clamp(24px, 2.4vw, 32px)/1.1 var(--nord); text-transform: uppercase; color: var(--night); letter-spacing: -.005em; text-wrap: balance; }
.h2--light { color: var(--white); }
.lead { font-size: 16px; color: var(--ink); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px;
  border: 0; border-radius: 12px 0; cursor: pointer; text-decoration: none;
  font: 900 14px/1 var(--olive); letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s, background-color .2s, box-shadow .2s, filter .2s;
}
.btn--lg { min-height: 44px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }
/* CTA: fondo dividido en dos con la curva del logo */
.btn--flame, .btn--color { position: relative; isolation: isolate; overflow: hidden; color: var(--white); }
.btn--flame::before, .btn--color::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-b);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 66C22 30 58 78 100 38V0H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 66C22 30 58 78 100 38V0H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; transition: transform .35s ease; transform-origin: center top; }
.btn--flame:hover::before, .btn--color:hover::before { transform: scaleY(1.25); }
.btn--flame { background: linear-gradient(100deg, var(--red), var(--orange) 60%, var(--sun)); --btn-b: rgba(255,255,255,.15); box-shadow: 0 12px 28px -12px rgba(216,20,31,.7); }
.btn--flame:hover { color: var(--white); transform: translateY(-2px); }
.btn--color { background: var(--c); --btn-b: rgba(255,255,255,.15); }
.btn--color:hover { color: var(--white); filter: brightness(1.08); transform: translateY(-2px); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color .3s, box-shadow .3s; }
.nav.is-scrolled { background: rgba(6,30,110,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 48px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a[data-nav] { position: relative; padding: 6px 0; color: var(--white); text-decoration: none; font: 700 13px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; }
.nav__links a[data-nav]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 2px; background: var(--sun); transform: scaleX(0); transition: transform .25s; }
.nav__links a[data-nav]:hover::after, .nav__links a[data-nav].is-active::after { transform: scaleX(1); }
.nav:not(.is-scrolled) .nav__links a[data-nav] { text-shadow: 0 1px 8px rgba(6,24,90,.5); }
.nav__toggle { display: none; width: 44px; height: 44px; padding: 11px; border: 0; background: none; cursor: pointer; }
.nav__toggle span { display: block; height: 2px; margin: 6px 0; background: var(--white); transition: transform .25s; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; color: var(--white); overflow: hidden; background: #06185a; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; opacity: 0; transform: scale(1.08); transition: opacity 1.4s ease, transform 8s ease-out; }
.hero__media img.is-active { opacity: 1; transform: scale(1); }
.hero__tint { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(6,24,90,.82) 0, rgba(6,24,90,.7) 20px, rgba(6,24,90,.53) 45px, rgba(6,24,90,.33) 70px, rgba(6,24,90,.16) 95px, rgba(6,24,90,.06) 120px, rgba(6,24,90,0) 140px),
  linear-gradient(90deg, rgba(8,30,120,.88) 0%, rgba(13,71,212,.55) 38%, rgba(0,150,215,.18) 70%, rgba(0,227,214,.18) 100%),
  linear-gradient(0deg, rgba(6,24,90,.92) 0%, rgba(8,40,140,.4) 28%, transparent 55%); }
.hero__dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.5) 1.3px, transparent 1.7px); background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 50%); mask-image: radial-gradient(ellipse at 0% 0%, #000 0%, transparent 50%); }
.hero__inner { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: 40px 64px; padding-top: calc(var(--nav-h) + 48px); padding-bottom: 48px; }
.hero__kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; font: 700 14px/1 var(--body); letter-spacing: .24em; text-transform: uppercase; }
.hero__kicker .sep { width: 36px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--orange), var(--sun)); }
.hero__logo { width: min(520px, 100%); height: auto; }
.hero__main { max-width: 760px; }
.hero__kicker { margin-bottom: 20px; font-size: 13px; }
.hero__info { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 0; margin: 40px 0 0; }
.hero__info div { padding: 0 28px; border-left: 1px solid rgba(255,255,255,.28); }
.hero__info div:first-child { padding-left: 0; border-left: 0; }
.hero__info dt { margin-bottom: 8px; font: 700 11px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.hero__info dd { margin: 0; font: 900 clamp(16px, 1.5vw, 20px)/1.2 var(--olive); white-space: nowrap; }
.hero__info div:first-child dd { color: var(--sun); }
.hero__date { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hero__day { display: flex; align-items: center; gap: 18px; }
.hero__day b { font: 900 clamp(110px, 13vw, 200px)/.8 var(--nord); letter-spacing: -.04em; background: linear-gradient(180deg, var(--sun) 0%, var(--orange) 55%, var(--red) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__day span { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.hero__day em { font: 900 clamp(22px, 2.4vw, 34px)/1 var(--nord); font-style: normal; text-transform: uppercase; }
.hero__day em + em { color: var(--cyan); }
.hero__meta { margin: 20px 0 0; padding-top: 16px; border-top: 2px solid rgba(255,255,255,.25); font: 700 15px/1.5 var(--body); letter-spacing: .04em; }
.hero__bar { position: relative; border-top: 1px solid rgba(255,255,255,.16); background: rgba(6,30,110,.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; padding-top: 18px; padding-bottom: 18px; }
.countdown { display: flex; gap: 28px; }
.countdown div { display: flex; align-items: baseline; gap: 8px; }
.countdown b { font: 900 clamp(24px, 2.4vw, 32px)/1 var(--nord); font-variant-numeric: tabular-nums; }
.countdown small { font: 700 11px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.hero__progress { flex: 1; display: flex; gap: 8px; }
.hero__progress button { flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.hero__progress span { position: relative; display: block; width: 100%; height: 3px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; }
.hero__progress span::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: var(--white); }
.hero__progress .is-done span::after { --p: 1; }
.hero__progress .is-active span::after { animation: heroProg var(--dur, 6s) linear forwards; }
@keyframes heroProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(84px, 10vw, 128px) 0; }
.head { margin-bottom: 52px; position: relative; }
.head--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.head--light .h2 { color: var(--white); }
.head--light .eyebrow { color: var(--cyan); }
.head__sub { margin: 16px 0 24px; font-size: 16px; color: var(--ink-2); }
.fine { margin-top: 24px; font-size: 14px; }
.fine--light { color: rgba(255,255,255,.75); text-align: center; }

/* ---------- Historia ---------- */
.historia { background: var(--white); overflow: hidden; }
.historia__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; align-items: center; }
.historia__media { position: relative; }
.hslide { position: relative; aspect-ratio: 4 / 5; border-radius: 20px 0; overflow: hidden; background: var(--night); box-shadow: 0 40px 80px -40px rgba(6,24,70,.55); }
.hslide__track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1s ease, transform 6s ease-out; }
.hslide__track img.is-active { opacity: 1; transform: scale(1); }
.hslide::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(0deg, rgba(6,24,90,.75), transparent); pointer-events: none; }
.hslide__dots { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.hslide__dots button { width: 20px; height: 20px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.hslide__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); transition: background .2s, transform .2s; }
.hslide__dots button.is-active::before { background: var(--white); transform: scale(1.25); }
.historia__text .h2 { margin-bottom: 24px; }
.historia__text p { color: var(--ink-2); }
.historia__text .lead { color: var(--ink); }
.historia__text strong { color: var(--ink); }
.historia__claim { margin: 24px 0 0; font: 900 17px/1.25 var(--olive); color: var(--orange-text) !important; text-transform: uppercase; }

/* ---------- Distancias ---------- */
.distancias { background: var(--grad); color: var(--white); overflow: hidden; }
.dots-bg { position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.35) 1.3px, transparent 1.7px); background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(115deg, #000 0%, transparent 40%, transparent 65%, #000 100%); mask-image: linear-gradient(115deg, #000 0%, transparent 40%, transparent 65%, #000 100%); pointer-events: none; }
.dist-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dist { position: relative; display: flex; flex-direction: column; background: var(--white); color: var(--ink); border-radius: 20px 0; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(4,20,70,.6); transition: transform .3s; }
.dist:hover { transform: translateY(-6px); }
.dist__photo { position: relative; aspect-ratio: 4 / 4.2; overflow: hidden; }
.dist__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .8s; }
.dist:hover .dist__photo img { transform: scale(1.05); }
.dist__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--c) 0%, transparent 55%); opacity: .95; }
.dist__title { position: relative; margin-top: -62px; padding: 0 24px 18px; background: none; color: var(--white); z-index: 1; }
.dist__km { display: block; font: 900 clamp(46px, 4.6vw, 62px)/1 var(--nord); text-box: trim-both cap alphabetic; letter-spacing: -.01em; }
.dist__name { display: block; margin-top: 2px; font: 700 12px/1 var(--body); letter-spacing: .24em; text-transform: uppercase; }
.dist__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; background: var(--white); font-size: 17px; line-height: 1.6; }
.dist__age { margin: 0 0 14px; font-weight: 700; }
.dist__prices { margin: 0 0 22px; }
.dist__prices div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.dist__prices dt { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
.dist__prices dd { margin: 0; font: 900 19px/1 var(--olive); font-variant-numeric: tabular-nums; }
.dist__prices div:first-child dd { color: var(--c-text, var(--c)); }
.dist__body .btn { margin-top: auto; }
.dist__soon { display: block; margin-top: 12px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6b6e87; }
.dist__badge { position: absolute; top: 16px; right: 16px; z-index: 2; padding: 7px 12px; border-radius: 8px 0; background: var(--white); color: var(--red); font: 900 11px/1 var(--olive); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Kit ---------- */
.kit { background: var(--paper) url("../assets/img/puntos-valdivia.png") left top / 820px auto no-repeat; }
.pill { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 12px 20px; border-radius: 12px 0; background: var(--white); border: 1px solid var(--line); font-size: 16px; }
.pill__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(239,90,36,.2); flex: none; }
.kit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kit-card { position: relative; padding: 30px 28px 28px; border-radius: var(--r); background: var(--white); box-shadow: 0 1px 0 var(--line), 0 20px 40px -30px rgba(6,24,70,.4); overflow: hidden; transition: transform .3s; }
.kit-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--c); transform: scaleX(.18); transform-origin: left; transition: transform .4s; }
.kit-card:hover { transform: translateY(-4px); }
.kit-card:hover::after { transform: scaleX(1); }
.kit-card__n { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-bottom: 22px; border-radius: 12px 0; background: var(--c); color: var(--white); font: 900 15px/1 var(--nord); }
.kit-card h3 { margin-bottom: 10px; font: 900 18px/1.2 var(--olive); text-transform: uppercase; }
.kit-card p { margin: 0; color: var(--ink-2); }
.kit-card p + p { margin-top: 8px; }

.retiro { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 10px 18px; border-radius: 10px; background: color-mix(in srgb, var(--sun) 12%, var(--white)); border: 1px solid color-mix(in srgb, var(--sun) 45%, var(--white)); color: var(--ink-2); font: 400 15px/1.4 var(--body); text-align: left; }
.retiro b { font-weight: 700; color: var(--ink); }
.retiro__dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.retiro__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--orange); animation: retiroPulse 1.8s ease-out infinite; }
@keyframes retiroPulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .retiro__dot::after { animation: none; } }

.msr { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 26px; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: "liga"; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24; }

/* ---------- Bases ---------- */
.bases { background: var(--white); }
.bases-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bases-grid > .base { grid-column: auto; }
.base { padding: 30px; border-radius: var(--r); background: var(--paper); }
.base--wide { grid-column: span 2; }
.base h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 900 16px/1.2 var(--olive); text-transform: uppercase; color: var(--indigo); }
.base { font-size: 16px; line-height: 1.6; }
.base p { color: var(--ink-2); }
.base .small { font-size: 14px; }
.base p:last-child { margin-bottom: 0; }
.base strong { color: var(--ink); }
.prices { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-variant-numeric: tabular-nums; }
.prices th { padding: 0 0 16px; text-align: right; font: 700 11px/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.prices th:first-child, .prices td:first-child { text-align: left; }
.prices th:nth-child(2) { color: var(--blue); }
.prices td { padding: 14px 0; text-align: right; border-top: 1px solid var(--line); font-size: 15px; font-weight: 400; }
.prices td:first-child { font: 700 16px/1 var(--body); color: var(--indigo); }
.prices td:nth-child(2) { font-weight: 700; color: var(--blue); }
.rows { list-style: none; margin: 0 0 18px; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rows li span { font: 900 14px/1.3 var(--nord); color: var(--indigo); }
.base--cta { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; justify-content: flex-start; gap: 6px 14px; background: var(--grad); color: var(--white); text-decoration: none; font: 900 clamp(18px, 1.6vw, 20px)/1.2 var(--nord); text-transform: uppercase; transition: transform .3s; }
.base--cta:hover { color: var(--white); transform: translateY(-4px); }
.base__arrow { display: inline-block; font: 400 1.3em/1 var(--body); vertical-align: -.08em; transition: transform .3s; }
.base--cta:hover .base__arrow { transform: translateX(8px); }

/* Bases · opción A: fondo llamativo + cards con blur */
.bases--a { background: var(--grad); color: var(--white); overflow: hidden; }
.bases--a .wrap { position: relative; }
.bases--a .h2 { color: var(--white); }
.bases--a .eyebrow { color: var(--cyan); }
.bases--a .base { background: rgba(4,16,64,.62); border: 0; backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.bases--a .base h3, .bases--a .base strong, .bases--a .prices td:first-child, .bases--a .rows li span { color: var(--white); }
.bases--a .base p, .bases--a .prices th, .bases--a .muted { color: rgba(255,255,255,.82); }
.bases--a .prices th:nth-child(2), .bases--a .prices td:nth-child(2) { color: var(--cyan); }
.bases--a .prices td, .bases--a .rows li { border-color: rgba(255,255,255,.18); }
.bases--a .base a { color: var(--cyan); }
.bases--a .base--cta { background: rgba(255,255,255,.16); color: var(--white); border: 0; }
.bases--a .base--cta:hover { background: rgba(255,255,255,.24); color: var(--white); }

/* Bases · opción B: fondo claro + cards de color */
.bases--b .base { background: color-mix(in srgb, var(--c, var(--sky)) 11%, var(--white)); border-top: 4px solid var(--c, var(--sky)); }
.bases--b .base h3 { color: color-mix(in srgb, var(--c, var(--sky)) 70%, var(--night)); }
.bases--b .prices td, .bases--b .rows li { border-color: color-mix(in srgb, var(--c, var(--sky)) 25%, var(--white)); }
.bases--b .base--dark { background: var(--night); border-top-color: var(--cyan); }
.bases--b .base--dark h3, .bases--b .base--dark strong, .bases--b .base--dark .prices td:first-child { color: var(--white); }
.bases--b .base--dark p, .bases--b .base--dark .prices th, .bases--b .base--dark .muted { color: rgba(255,255,255,.8); }
.bases--b .base--dark .prices th:nth-child(2), .bases--b .base--dark .prices td:nth-child(2) { color: var(--cyan); }
.bases--b .base--dark .prices td { border-color: rgba(255,255,255,.16); color: var(--white); }
.bases--b .base--cta { border-top: 0; }

/* ---------- Auspiciadores ---------- */
.sponsors { padding: 72px 0; background: var(--paper); }
.sponsors__grid { display: flex; flex-direction: column; align-items: center; gap: 0; }
.sp { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 0; }
.sp + .sp { border-top: 1px solid var(--line); }
.sp:first-child { padding-top: 0; }
.sp:last-child { padding-bottom: 0; }
.sp__lbl { margin: 0 0 18px; font: 700 12px/1 var(--body); letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); }
.sp__logos { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sp__logos .logo-slot { width: 180px; }
.sp--main .sp__logos .logo-slot { width: 220px; }
.logo-slot { display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 12px; text-align: center; border-radius: 12px 0; background: repeating-linear-gradient(135deg, #fff 0 9px, #eef1f7 9px 18px); border: 1px dashed #c8cde0; font: 400 12px/1.3 ui-monospace, Menlo, monospace; color: var(--ink-2); }
.sp--main .logo-slot { min-height: 110px; }
.logo-slot--img { background: none; border: 0; border-radius: 0; }
.logo-slot--img img { display: block; max-width: 100%; max-height: 60px; width: auto; height: auto; object-fit: contain; }
.sp--main .sp__logos .logo-slot--img { width: auto; }
.sp__logos .logo-slot--img:nth-child(n) { width: auto; }
.sp:not(.sp--main) .logo-slot--img img { height: 44px; max-height: none; max-width: none; }
.sp:not(.sp--main) img[src*="foc-race"] { height: 40px; }
.sp:not(.sp--main) img[src*="eventrid"] { height: 28px; }
.sp:not(.sp--main) img[src*="rincon-runner"] { height: 46px; }
.sp:not(.sp--main) img[src*="municipalidad"] { height: 72px; }
.sp:not(.sp--main) img[src*="manuel-plaza"] { height: 60px; }
.sp:not(.sp--main) img[src*="menta"] { height: 46px; }
.sp:not(.sp--main) img[src*="radio-biobio"] { height: 44px; }
.sp--main .logo-slot--img img { height: 62px; max-height: none; max-width: none; }
.sp--main .sp__logos .logo-slot--img:first-child { flex-basis: 100%; }
.sp--main .sp__logos .logo-slot--img:first-child img { height: 78px; }
/* altura por logo (no por posición), para poder quitar o agregar auspiciadores sin descuadrar */
.sp--main .sp__logos .logo-slot--img img[src*="powerade"] { height: 52px; }
.sp--main .sp__logos .logo-slot--img img[src*="clinica-alemana"] { height: 50px; }
@media (max-width: 640px) { .sp--main .sp__logos .logo-slot--img { width: auto; max-width: 100%; } .sp--main .sp__logos .logo-slot--img:nth-child(n) img { height: auto; } .sp--main .logo-slot--img img { max-width: 100%; height: auto; max-height: 62px; } .sp--main .sp__logos .logo-slot--img:first-child img { height: auto; max-height: 78px; } }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 600px; background: var(--white); --edge: max(32px, calc((100vw - var(--maxw)) / 2 + 32px)); }
.contacto__side { position: relative; overflow: hidden; color: var(--white); background: var(--night); }
.contacto__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.contacto__side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,24,90,.96) 10%, rgba(10,42,143,.7) 50%, rgba(0,227,214,.2) 100%); }
.contacto__side-in { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px clamp(24px, 3vw, 48px) 40px var(--edge); }
.mails { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mails li { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.25); }
.mails span { font: 700 11px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.mails a { color: var(--white); font-weight: 700; font-size: 15px; text-decoration: none; word-break: break-all; }
.mails a:hover { color: var(--sun); }

.form { display: grid; align-content: center; gap: 14px; width: 100%; padding: clamp(40px, 5vw, 64px) var(--edge) clamp(40px, 5vw, 64px) clamp(24px, 4vw, 64px); }
.chips { border: 0; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { width: 100%; margin-bottom: 16px; padding: 0; font: 900 clamp(20px, 2vw, 26px)/1.2 var(--nord); text-transform: uppercase; color: var(--ink); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px 0; border: 1.5px solid var(--line); font-size: 15px; font-weight: 700; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover span { border-color: var(--blue); }
.chip input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font: 700 11px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.field em { font-style: normal; text-transform: none; letter-spacing: 0; color: #6b6e87; }
.form__head { margin-bottom: 8px; }
.form.is-sent > :not(.form__done) { display: none; }
.form__done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 24px 0; animation: doneIn .5s cubic-bezier(.2,.8,.2,1) both; }
.form__done[hidden] { display: none; }
.form__done .h2 { margin: 0; }
.form__done p:not(.eyebrow) { margin: 0 0 14px; max-width: 34ch; color: var(--ink-2); }
.form__done-ic { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px; border-radius: 12px 0; background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); }
.form__done-ic .msr { font-size: 40px; }
.form__again { appearance: none; border: 0; background: none; padding: 8px 4px; cursor: pointer; font: 700 14px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--blue) 30%, transparent); transition: text-decoration-color .2s; }
.form__again:hover { text-decoration-color: var(--blue); }
@keyframes doneIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.form__head .h2 { margin: 0; }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--paper); font: 400 15px/1.4 var(--body); color: var(--ink); transition: border-color .2s, background-color .2s; }
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field select:invalid { color: #8a93a6; }
.field select option { color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); background-color: var(--white); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--red); }
.hp { position: absolute; left: -9999px; }
.cf-turnstile { min-height: 65px; }
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.form__route { margin: 0; font-size: 14px; color: var(--ink-2); }
.form__route strong { color: var(--ink); }
.form__status { margin: 0; min-height: 1.4em; font-size: 16px; }
.form__status.is-ok { color: var(--blue); }
.form__status.is-error { color: var(--red); }
.form [type="submit"]:disabled { opacity: .6; cursor: wait; transform: none; }
.form__captcha { min-height: 78px; }
/* reCAPTCHA v2 mide 304px fijos: se escala en pantallas angostas */
@media (max-width: 360px) { .form__captcha { width: 268px; height: 69px; min-height: 0; } .form__captcha > div { transform: scale(.88); transform-origin: left top; } }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: rgba(255,255,255,.72); padding: 80px 0 32px; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer__logo { height: 72px; width: auto; margin-bottom: 24px; }
.footer__home { display: inline-block; transition: opacity .2s; }
.footer__home:hover { opacity: .85; }
.footer__brand p { margin: 0; max-width: 32ch; font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer__h { margin: 0 0 8px; font: 700 12px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--white); }
.footer__col a { color: rgba(255,255,255,.72); text-decoration: none; font-size: 15px; transition: color .2s; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--cyan); }
.footer__col a.footer__social, .footer__col a.footer__icon { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.footer__col a.footer__social svg, .footer__col a.footer__icon svg { flex: none; width: 18px; height: 18px; }
.footer__icon small { font-size: .8em; opacity: .7; }
.footer__col a.footer__social + a.footer__icon { margin-top: 0; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.footer__bottom p { margin: 0; font: 400 12px/1.4 var(--body); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.footer__bottom b { margin-left: 8px; font-weight: 700; color: var(--white); }
.footer__bottom b a { color: inherit; text-decoration: none; transition: color .2s; }
.footer__bottom b a:hover { color: var(--cyan); }

/* ---------- Página de inscripciones ---------- */
.page-inscripciones .nav { background: var(--night); }
.inscripcion { min-height: 70vh; min-height: 70svh; padding: calc(var(--nav-h) + clamp(40px, 6vw, 72px)) 0 clamp(64px, 8vw, 96px); }
.inscripcion iframe { display: block; width: 1px; min-width: 100%; border: 0; }
.nav__links a[aria-current="page"] { pointer-events: none; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img { transition: opacity .6s ease; transform: none !important; }
  .hero__progress .is-active span::after { animation: none; --p: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dist-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .historia__grid { gap: 48px; }
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__date { align-items: flex-start; text-align: left; }
  .hero__bar-inner { flex-wrap: wrap; }
  .hero__progress { order: -1; flex-basis: 100%; }
  .nav__toggle { display: block; }
  .nav__links { position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 32px 28px; background: rgba(6,30,110,.97); opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s, visibility 0s .25s; }
  .nav.is-open { background: rgba(6,30,110,.97); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .25s, transform .25s; }
  .nav__links a[data-nav] { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav__links a[data-nav]::after { display: none; }
  .nav__cta { margin-top: 20px; }
  .historia__grid { grid-template-columns: 1fr; }
  .hslide { aspect-ratio: 4 / 3.4; }
  .kit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bases-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bases-grid > .base, .bases-grid > .base:nth-last-child(-n+2) { grid-column: auto; }
  .contacto { grid-template-columns: 1fr; }
  .contacto__side-in, .form { padding-left: var(--edge); padding-right: var(--edge); }
  .contacto__side { min-height: 420px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .contacto { --edge: 20px; }
  .hero__inner { padding-bottom: 28px; }
  .hero__info { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .hero__info div { padding: 0; border-left: 0; }
  .hero__info dd { white-space: normal; }
  .hero__bar-inner { gap: 14px; }
  .countdown { width: 100%; justify-content: space-between; gap: 8px; }
  .hero__bar .btn { width: 100%; }
  .dist-grid, .kit-grid, .bases-grid, .form__row { grid-template-columns: 1fr; }
  .sp__logos .logo-slot, .sp--main .sp__logos .logo-slot { width: calc(50% - 6px); }
  .bases-grid > .base, .bases-grid > .base:nth-last-child(-n+2) { grid-column: auto; }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .countdown div { gap: 4px; }
  .countdown b { font-size: min(24px, 6.2vw); }
  .countdown small { letter-spacing: .08em; }
}
