/* ==========================================================================
   21K Puerto Montt — hoja de estilos principal
   Paleta: morado #2b2150 · morado claro #55438d · fucsia #d6307c · lima #a1c02c
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Tipografías (alojadas en el propio servidor: sin dependencias externas)
   -------------------------------------------------------------------------- */

/* Archivo — texto corrido. Fuente variable: cubre los pesos 400 a 800. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Krona One — títulos. Reemplaza a Vortice Concept, que no tenía tildes ni ñ. */
@font-face {
  font-family: "Krona One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/krona-one-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Krona One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/krona-one-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --c-bg:          #2b2150;
  --c-bg-2:        #55438d;
  --c-bg-deep:     #221a42;
  --c-footer:      #221a40;
  --c-pink:        #d6307c;
  --c-pink-soft:   #ff8fb4;
  --c-pink-error:  #ff2e77;
  --c-lime:        #a1c02c;
  --c-lime-soft:   #cde85e;
  --c-paper:       #f5f3f9;
  --c-white:       #fff;

  --ff-display: "Krona One", "Archivo", system-ui, sans-serif;
  --ff-body:    "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw:   1240px;
  --pad-x:  clamp(20px, 5vw, 72px);
  --pad-y:  clamp(64px, 8vw, 110px);
  --radius: 20px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* compensa el header sticky al saltar a un ancla */
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-white);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

img, svg { max-width: 100%; }
img { height: auto; border: 0; }

a { color: var(--c-lime); text-decoration: none; }
a:hover { color: var(--c-pink); }

h1, h2, h3 { margin: 0; font-family: var(--ff-display); line-height: 1.05; text-transform: uppercase; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--c-lime-soft);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--c-lime);
  color: var(--c-bg);
  font-weight: 700;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; color: var(--c-bg); }

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

/* ancla auxiliar para enlaces internos */
.anchor { position: relative; display: block; height: 0; visibility: hidden; }

/* --------------------------------------------------------------------------
   3. Layout genérico
   -------------------------------------------------------------------------- */
.section { padding: var(--pad-y) var(--pad-x); }
.section--purple { background: var(--c-bg); }

.section--texture {
  position: relative;
  background-color: var(--c-bg-2);
  background-image: url("../img/bg-clean.svg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.section--texture > .section-veil { position: absolute; inset: 0; background: rgba(85, 67, 141, .88); }

.section--paper { background: var(--c-paper); color: var(--c-bg); }

.wrap {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 4vw, 48px);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.section-title { font-size: clamp(21px, 2vw, 30px); }
.section-lead {
  font-size: clamp(13px, 1.25vw, 16px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .78);
  text-wrap: pretty;
}
.section--paper .section-title { color: var(--c-bg); }

.btn {
  display: inline-block;
  padding: 17px 32px;
  border: 0;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.btn--pink {
  background: var(--c-pink);
  color: #fff;
  box-shadow: 0 16px 34px rgba(214, 48, 124, .4);
}
.btn--pink:hover { background: var(--c-lime); color: var(--c-bg); transform: translateY(-3px); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, .55); background: transparent; color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--sm { padding: 14px 26px; font-size: 13px; letter-spacing: .12em; box-shadow: 0 10px 24px rgba(214, 48, 124, .35); }

/* --------------------------------------------------------------------------
   4. Header + navegación
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px var(--pad-x);
  background: rgba(43, 33, 80, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  transition: padding .25s ease, background .25s ease;
}
.site-header.is-scrolled { padding-block: 6px; background: rgba(43, 33, 80, .92); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--maxw);
  margin-inline: auto;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img {
  height: 66px;
  width: auto;
  display: block;
  transition: height .25s ease;
}
.site-header.is-scrolled .brand img { height: 48px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--c-lime);
  transition: width .25s ease;
}
.nav-link:hover { color: var(--c-lime); }
.nav-link:hover::after,
.nav-link.is-active::after { width: 100%; }
.nav-link.is-active { color: var(--c-lime); }

.nav-cta {
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--c-pink);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(214, 48, 124, .35);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.nav-cta:hover { background: var(--c-lime); color: var(--c-bg); transform: translateY(-2px); }

/* botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px;
  background: rgba(43, 33, 80, .5);
  color: #fff;
  cursor: pointer;
}
.nav-toggle span {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform .25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
  padding: clamp(48px, 6vw, 96px) var(--pad-x);
  background-color: var(--c-bg);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* encuadre desplazado hacia arriba: conserva el cielo y el volcán, que el
     recorte centrado dejaba fuera */
  object-position: 50% 38%;
  display: block;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(43,33,80,.78) 0%, rgba(43,33,80,.66) 40%, rgba(43,33,80,.94) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: var(--maxw);
}
.hero-copy { display: flex; flex-direction: column; gap: 20px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: rgba(43, 33, 80, .35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-lime);
  flex: 0 0 auto;
  display: block;
}

.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(26px, 3.1vw, 46px);
  letter-spacing: .01em;
  text-shadow: 0 14px 40px rgba(43, 33, 80, .55);
}
.hero-title span { white-space: nowrap; }
.hero-title .accent { color: var(--c-lime); }

.hero-text {
  max-width: 46ch;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: rgba(255, 255, 255, .9);
  text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(18px, 3vw, 44px);
  row-gap: 22px;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact--wide { flex-basis: 100%; }
.fact dt, .fact-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-lime);
}
.fact dd, .fact-value { margin: 0; font-weight: 700; font-size: 19px; line-height: 1.3; }

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  min-width: 0;
}
.hero-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: min(330px, 72vw);
  aspect-ratio: 1;
}
.hero-logo img {
  position: relative;
  width: 100%;
  display: block;
  animation: floaty 6s ease-in-out infinite;
  filter: drop-shadow(0 22px 40px rgba(43, 33, 80, .6));
}
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(161, 192, 44, .7);
  animation: pulseRing 3.4s ease-out infinite;
}
.ring--2 { border-color: rgba(255, 255, 255, .35); animation-delay: 1.7s; }

@keyframes floaty   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseRing { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.85); opacity: 0; } }

/* cuenta regresiva */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: min(420px, 86vw);
  padding: 18px;
  border-radius: 20px;
  background: rgba(43, 33, 80, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.countdown div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.countdown b {
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .65);
}
.countdown div:last-child b { color: var(--c-lime); }

/* --------------------------------------------------------------------------
   6. Distancias
   -------------------------------------------------------------------------- */
.grid-races {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
  padding-top: 18px;
}
.race {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: clamp(460px, 44vw, 540px);
  padding: 44px 30px 30px;
  border-radius: 26px;
  background: rgba(85, 67, 141, .4);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: transform .22s ease, border-color .22s ease;
}
.race:hover { transform: translateY(-8px); border-color: rgba(214, 48, 124, .7); }
.race--10k { background: rgba(85, 67, 141, .5); }
.race--21k { background: rgba(85, 67, 141, .62); }

.race-texture {
  position: absolute;
  inset: 0;
  border-radius: 26px;
  overflow: hidden;
  pointer-events: none;
  display: block;
}
.race-texture::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background-image: url("../img/bg-clean.svg");
  background-size: cover;
  background-position: center;
  opacity: .1;
}
.race--10k .race-texture::before { transform: rotate(90deg); }
.race--21k .race-texture::before { transform: rotate(210deg); }

.race > *:not(.race-texture):not(.race-chip) { position: relative; }

.race-chip {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  background: #f2f0f7;
  color: #a1152f;
}
.race-level {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}
.race-name { margin-top: 14px; font-size: clamp(40px, 4.6vw, 60px); line-height: 1; }
.race-rule {
  width: 56px;
  height: 3px;
  margin-top: 22px;
  border-radius: 2px;
  background: var(--c-pink);
  display: block;
}
.race-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.6;
}
/* dos tramos de precio por tarjeta: pre-venta destacada y venta general */
.race-prices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.price { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.price-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  text-wrap: balance;
}
.price-value {
  font-family: var(--ff-display);
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1;
  color: var(--c-lime);
}
.price--destacado .price-label { color: var(--c-lime-soft); }
.price:not(.price--destacado) .price-value {
  font-size: clamp(19px, 1.9vw, 23px);
  color: rgba(255, 255, 255, .88);
}
.race-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  padding-top: 28px;
}
.race-actions .btn { padding: 16px 20px; font-size: 13px; letter-spacing: .14em; box-shadow: none; }
.race-soon {
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .5);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  cursor: not-allowed;
}
.note { text-align: center; font-size: 14px; color: rgba(255, 255, 255, .7); }

/* --------------------------------------------------------------------------
   7. Qué incluye
   -------------------------------------------------------------------------- */
.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(161, 192, 44, .22);
  border: 1px dashed rgba(161, 192, 44, .8);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .9);
  text-align: left;
}
.badge-info .dot { width: 8px; height: 8px; }

.grid-perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 16px;
}
.perk {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  border-radius: var(--radius);
  background: rgba(43, 33, 80, .5);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .2s ease, background .2s ease;
}
.perk:hover { transform: translateY(-6px); background: rgba(43, 33, 80, .72); }
.perk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(161, 192, 44, .14);
  border: 1px solid rgba(161, 192, 44, .4);
  flex: 0 0 auto;
}
.perk-title {
  margin: 8px 0 0;
  font-family: var(--ff-display);
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
}
.perk p { font-size: 15px; line-height: 1.6; text-wrap: pretty; }

/* --------------------------------------------------------------------------
   8. Bases
   -------------------------------------------------------------------------- */
.grid-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 16px;
}
.rule {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  border-radius: var(--radius);
  background: rgba(85, 67, 141, .4);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.rule:hover { transform: translateY(-6px); border-color: rgba(214, 48, 124, .6); background: rgba(85, 67, 141, .62); }
.rule h3 { font-size: clamp(14px, 1.25vw, 16px); line-height: 1.2; letter-spacing: .02em; margin-bottom: 6px; }
.rule ul { display: flex; flex-direction: column; gap: 7px; }

/* tabla de valores por distancia dentro de la tarjeta de bases */
.tabla-precios {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  /* el encabezado de la tabla no tiene interlineado sobrante como los <li> de
     las otras tarjetas: se compensa para que el aire bajo el título sea igual */
  margin-top: 2px;
}
.tabla-precios th,
.tabla-precios td { padding: 11px 0; text-align: right; }
.tabla-precios th:first-child,
.tabla-precios td:first-child { text-align: left; }

.tabla-precios thead th {
  padding: 0 0 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  white-space: nowrap;
}
.tabla-precios thead .col-pre { color: var(--c-lime); }

.tabla-precios tbody th {
  font-family: var(--ff-body);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.tabla-precios tbody td { font-size: 15px; color: #fff; white-space: nowrap; }
.tabla-precios tbody .col-pre { font-weight: 700; color: var(--c-lime); }
.tabla-precios tbody tr + tr > * { border-top: 1px solid rgba(255, 255, 255, .12); }

.rule--valores ul { margin-top: 4px; }
/* el selector lleva ul para ganarle en especificidad a `.rule li`, que fija 15px */
.rule--valores ul li { font-size: 14px; color: rgba(255, 255, 255, .72); }
.rule--valores .nota-preventa { color: #fff; }
.rule--valores .nota-fina { font-size: 13px; color: rgba(255, 255, 255, .6); }
.rule li { font-size: 15px; line-height: 1.6; text-wrap: pretty; }

.rule--cta {
  justify-content: center;
  background: var(--c-pink);
  border-color: var(--c-pink);
  color: #fff;
}
.rule--cta:hover { background: var(--c-lime); border-color: var(--c-lime); color: var(--c-bg); }
.rule--cta span { font-size: 14px; line-height: 1.6; opacity: .9; }

/* --------------------------------------------------------------------------
   9. Auspiciadores
   -------------------------------------------------------------------------- */
.tiers { display: flex; flex-direction: column; gap: clamp(46px, 5vw, 64px); }
.tier { display: flex; flex-direction: column; gap: 16px; }
.tier-label {
  align-self: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-pink);
  text-align: center;
}
.tier-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
}
/* la primera fila conserva la separación amplia original */
.tier--a .tier-logos { gap: clamp(28px, 5vw, 64px); }
.tier-logos li {
  display: grid;
  place-items: center;
  padding: 6px 4px;
  min-width: 150px;
}
.tier-logos img { width: auto; object-fit: contain; display: block; }
.tier--a .tier-logos li { height: 110px; }
.tier--b .tier-logos li { height: 86px; }
.tier--c .tier-logos li,
.tier--d .tier-logos li { height: 96px; }

.sponsor-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
  border-radius: 22px;
  background: var(--c-bg-2);
  color: #fff;
}
.sponsor-cta div { display: flex; flex-direction: column; gap: 6px; }
.sponsor-cta strong { font-family: var(--ff-display); font-weight: 400; font-size: 17px; text-transform: uppercase; }
.sponsor-cta p { font-size: 15px; color: rgba(255, 255, 255, .8); }
.sponsor-cta .btn { padding: 15px 28px; font-size: 13px; letter-spacing: .12em; white-space: nowrap; box-shadow: none; }

/* --------------------------------------------------------------------------
   10. Contacto y formulario
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  padding: var(--pad-y) var(--pad-x);
  background-color: var(--c-bg);
  background-image: url("../img/bg-clean.svg");
  background-size: cover;
  background-position: center;
}
.contact > .section-veil { position: absolute; inset: 0; background: rgba(43, 33, 80, .86); }
.contact-grid {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(30px, 5vw, 60px);
}
.contact-aside { display: flex; flex-direction: column; gap: 16px; }
.contact-aside .section-title { text-align: left; overflow-wrap: anywhere; }
.contact-aside p { color: rgba(255, 255, 255, .8); line-height: 1.6; }

.contact-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.contact-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  transition: background .18s ease, transform .18s ease;
}
.contact-list a:hover { background: rgba(255, 255, 255, .15); transform: translateX(4px); color: #fff; }
.contact-list small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-lime);
}
.contact-list span { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }

/* panel del formulario */
.form-card,
.form-done {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 24px;
  background: rgba(85, 67, 141, .55);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.form-title {
  margin-bottom: 10px;
  font-family: var(--ff-display);
  font-size: 17px;
  text-transform: uppercase;
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field > .label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.req { color: var(--c-pink-soft); }
.opt { font-weight: 400; opacity: .6; letter-spacing: .06em; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(43, 33, 80, .55);
  color: #fff;
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 16px; /* 16px evita el zoom automático en iOS */
  line-height: 1.4;
  outline: none;
  transition: border-color .18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { line-height: 1.6; resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, .55); opacity: 1; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, .45); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #fff; outline: none; }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--c-pink-error); }

.field select {
  padding-right: 46px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px 18px;
}
.field select:invalid { color: rgba(255, 255, 255, .55); }
.field select option { background: var(--c-bg-deep); color: #fff; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
}

.field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-pink-soft);
}
.has-error > .field-error { display: block; }

/* desplegable de "Motivo": se construye sobre el <select> nativo, que queda
   oculto pero sigue siendo el que envía el valor (y el único que se ve si el
   visitante tiene JavaScript desactivado) */
.js .field select.tiene-desplegable { display: none; }

.dropdown { position: relative; display: flex; flex-direction: column; }

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(43, 33, 80, .55);
  color: #fff;
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  outline: none;
  cursor: pointer;
  transition: border-color .18s ease;
}
.dropdown-toggle:hover { border-color: rgba(255, 255, 255, .6); }
.dropdown-toggle:focus-visible { border-color: #fff; outline: 2px solid var(--c-lime-soft); outline-offset: 2px; }

/* con el panel abierto el foco pasa a las opciones, pero el botón conserva el
   borde blanco para que el campo siga leyéndose como activo */
.dropdown.is-open .dropdown-toggle { border-color: #fff; }

.dropdown-label { color: rgba(255, 255, 255, .55); }
.dropdown.tiene-valor .dropdown-label { color: #fff; }
.dropdown-chevron { flex: 0 0 auto; }

.dropdown-menu {
  position: absolute;
  /* separación con el botón: subir o bajar este valor los junta o los separa */
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: var(--c-bg-deep);
  box-shadow: 0 22px 44px rgba(15, 9, 34, .55);
  overflow: hidden;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.dropdown-option:hover,
.dropdown-option:focus-visible { background: rgba(214, 48, 124, .35); outline: none; }
.dropdown-option[aria-selected="true"] { background: rgba(161, 192, 44, .18); }

.dropdown-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, .28);
  display: block;
}
.dropdown-option[aria-selected="true"] .dropdown-dot { background: var(--c-lime); }

.has-error .dropdown-toggle { border-color: var(--c-pink-error); }

/* verificación (reCAPTCHA): el widget de Google ya trae su propio marco,
   así que va suelto dentro del campo, sin caja alrededor */
.g-recaptcha { line-height: 0; }

.form-alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.form-alert--error { background: rgba(255, 46, 119, .12); border: 1px solid rgba(255, 46, 119, .5); color: var(--c-pink-soft); }

.form-submit { margin-top: 2px; padding: 17px 24px; font-size: 14px; letter-spacing: .12em; }
.form-submit[disabled] { opacity: .6; cursor: progress; }

/* panel "gracias" */
.form-done {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
  min-height: 520px;
}
.form-done-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(161, 192, 44, .18);
  border: 1px solid rgba(161, 192, 44, .6);
}
.form-done h3 { font-size: clamp(15px, 1.35vw, 21px); line-height: 1.15; text-wrap: balance; }
.form-done p { max-width: 42ch; font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.link-reset {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-pink-soft);
  font-family: var(--ff-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-underline-offset: 6px;
  cursor: pointer;
  transition: color .18s ease;
}
.link-reset:hover { color: #fff; text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: clamp(40px, 5vw, 64px) var(--pad-x) 28px;
  background: var(--c-footer);
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.footer-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-brand { gap: 18px; }
.footer-brand img { max-height: 64px; max-width: 190px; width: auto; object-fit: contain; display: block; }
.footer-brand p { max-width: 32ch; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .65); }
.footer-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--c-lime);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 20px;
}
.footer-col a {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  overflow-wrap: anywhere;
}
.footer-col a:hover { color: var(--c-lime); }
.footer-social { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.icon-round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  transition: background .18s ease, border-color .18s ease;
}
.icon-round:hover { background: var(--c-pink); border-color: var(--c-pink); color: #fff; }
.footer-col .btn { margin-top: 6px; align-self: flex-start; }

.footer-bottom {
  max-width: var(--maxw);
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
}

/* --------------------------------------------------------------------------
   12. Animaciones de entrada
   -------------------------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s var(--ease);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Alturas máximas por logo. Las medidas base son las del diseño original;
   --logo-escala las multiplica todas a la vez, así que para agrandar o achicar
   el conjunto basta con cambiar ese único número. */
.tier-logos { --logo-escala: 1.04; }
.tier-logos img { max-width: calc(220px * var(--logo-escala)); }

.logo--caja     { max-height: calc(82px * var(--logo-escala)); }
.logo--powerade { max-height: calc(46px * var(--logo-escala)); }
.logo--achs     { max-height: calc(82px * var(--logo-escala)); }
.logo--spartan  { max-height: calc(62px * var(--logo-escala)); }
/* Estos archivos llegan más pequeños que el tamaño al que se muestran, así que
   `max-height` no los agranda. Se usa `height`, que sí amplía, a cambio de algo
   de nitidez. PENDIENTE: cuando lleguen los logos en alta resolución (o SVG),
   volver a `max-height` para que no se estiren. */
.logo--foco     { height: calc(58px * var(--logo-escala)); }
.logo--eventrid { height: calc(58px * var(--logo-escala)); }
/* Rincón Runner se deja a su tamaño real: era el que más se estiraba */
.logo--rincon   { max-height: calc(48px * var(--logo-escala)); }
.logo--muni     { max-height: calc(82px * var(--logo-escala)); }
.logo--deportes { max-height: calc(82px * var(--logo-escala)); }
.logo--menta    { height: calc(60px * var(--logo-escala)); }
.logo--stronger { max-height: calc(82px * var(--logo-escala)); }
.logo--pb       { max-height: calc(82px * var(--logo-escala)); }

@media (max-width: 640px) {
  .logo--caja, .logo--muni, .logo--deportes, .logo--stronger, .logo--pb, .logo--achs { max-height: calc(64px * var(--logo-escala)); }
  .logo--spartan { max-height: calc(52px * var(--logo-escala)); }
  .logo--foco, .logo--eventrid, .logo--rincon { max-height: calc(46px * var(--logo-escala)); }
  .logo--powerade, .logo--menta { max-height: calc(40px * var(--logo-escala)); }
}

/* el widget de reCAPTCHA mide 302px: se escala en pantallas muy angostas */
@media (max-width: 400px) {
  .g-recaptcha { transform: scale(.86); transform-origin: 0 0; height: 68px; }
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */

/* el texto de dos líneas solo se fuerza en una línea si hay espacio real */
@media (min-width: 1180px) {
  .nowrap-lg { white-space: nowrap; }
}

@media (max-width: 960px) {
  html { scroll-padding-top: 80px; }

  .nav-toggle { display: grid; place-items: center; }

  .nav {
    position: fixed;
    inset: 0 0 auto;
    top: var(--header-h, 86px);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 16px var(--pad-x) 26px;
    background: var(--c-bg-deep);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 26px 44px rgba(15, 9, 34, .45);
    max-height: calc(100dvh - var(--header-h, 86px));
    overflow-y: auto;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s var(--ease), visibility .22s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }

  .nav-link {
    padding: 15px 4px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .nav-link::after { display: none; }
  .nav-cta { margin-top: 16px; text-align: center; }

  .brand img,
  .site-header.is-scrolled .brand img { height: 52px; }

  .hero { min-height: auto; padding-block: clamp(36px, 9vw, 64px); }

  /* encuadre más abajo para que los corredores no queden al borde inferior */
  .hero-media img { object-position: 50% 52%; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { width: min(240px, 62vw); }
  .hero-title { font-size: clamp(21px, 7.4vw, 46px); }
  .hero-actions .btn { flex: 1 1 220px; }

  .sponsor-cta { flex-direction: column; align-items: flex-start; }
  .sponsor-cta .btn { align-self: stretch; }

  .form-done { min-height: 0; }
}

@media (max-width: 640px) {
  .section { padding-block: clamp(48px, 12vw, 72px); }
  .race { min-height: 0; padding: 40px 22px 26px; }
  .grid-races { gap: 26px; padding-top: 22px; }
  .badge-info { align-items: flex-start; text-align: left; }
  .badge-info .dot { margin-top: 8px; }
  .tier-logos { gap: 26px 22px; }
  .tier-logos li { min-width: 120px; }
  .tier--a .tier-logos li { height: 84px; }
  .tier--b .tier-logos li { height: 68px; }
  .tier--c .tier-logos li,
  .tier--d .tier-logos li { height: 74px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .countdown { gap: 6px; padding: 14px 10px; }
}

@media (max-width: 380px) {
  .race-name { font-size: 44px; }
}

/* --------------------------------------------------------------------------
   14. Preferencias del usuario
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   15. Impresión
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .nav-toggle, .hero-media, .hero-veil, .countdown,
  .race-actions, .form-card, .sponsor-cta { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .contact { padding: 16px 0; background: #fff !important; }
  a { color: #000; }
}

/* --------------------------------------------------------------------------
   16. Páginas auxiliares (pronto.html / 404.html)
   -------------------------------------------------------------------------- */
.standalone {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 80px) var(--pad-x);
  background-color: var(--c-bg);
  background-image: url("../img/bg-clean.svg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-align: center;
}
.standalone > .section-veil {
  background: linear-gradient(180deg, rgba(43,33,80,.35) 0%, rgba(43,33,80,.28) 45%, rgba(43,33,80,.72) 100%);
}
.standalone-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.4vw, 26px);
  width: 100%;
  max-width: 760px;
}
.standalone .hero-logo { width: min(300px, 66vw); }
.standalone h1 {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1;
  letter-spacing: .06em;
  text-wrap: balance;
  text-shadow: 0 14px 40px rgba(43, 33, 80, .55);
}
.save-date {
  display: flex;
  justify-content: center;
  width: min(100%, 560px);
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}
.save-date span {
  font-family: var(--ff-display);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-lime);
}
.standalone .btn { display: inline-flex; align-items: center; gap: 10px; }

/* --------------------------------------------------------------------------
   17. Página de inscripción (iframe de Eventrid)
   -------------------------------------------------------------------------- */
.form-inscripcion { padding-block: clamp(32px, 4vw, 56px); }
.form-inscripcion .wrap { gap: clamp(20px, 2.5vw, 28px); }
.form-inscripcion .section-lead { max-width: 62ch; color: rgba(43, 33, 80, .78); }

/* width:1px + min-width:100% es el patrón que pide el redimensionador de
   iframes: el script controla el alto y el iframe ocupa todo el ancho.
   El alto mínimo evita que la página quede desarmada cuando el contenido del
   iframe es muy corto (por ejemplo, antes de que abra la venta). */
#iframe-inscripcion {
  width: 1px;
  min-width: 100%;
  min-height: 520px;
  border: 0;
  display: block;
  background: transparent;
}

.aviso-noscript {
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(43, 33, 80, .06);
  border: 1px solid rgba(43, 33, 80, .18);
  color: var(--c-bg);
  font-size: 15px;
  line-height: 1.6;
}
.aviso-noscript a { color: var(--c-pink); text-decoration: underline; }
