/* ====================================================================
   RUN
   Idea: la recta de una pista de atletismo cruza la pantalla. Cada
   carril es una actividad, con su número pintado en la largada; al
   elegirlo, el corredor lo recorre. Tartán, pasto y líneas blancas.
   ==================================================================== */
:root {
  --tartan: #B8322A;
  --tartan-claro: #CB4636;
  --pasto: #3F8F3A;
  --pasto-oscuro: #2F6E2C;
  --tinta: #1D2233;
  --blanco: #FFFFFF;
  --gris: #5B6072;
  --niebla: #F3F4F6;
  --wa: #25D366;

  --fuente: "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--fuente); background: var(--blanco); color: var(--tinta); line-height: 1.6; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }

.contenedor { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1rem; }
h1, h2, .marca { font-style: italic; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }

/* Cabecera */
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marca { font-size: 1.9rem; text-decoration: none; color: var(--tartan); }
.cabecera-tel { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ====================================================================
   PRESENTACIÓN + PISTA
   ==================================================================== */
.inicio { padding: 1.4rem 0 3rem; overflow: hidden; }
.inicio h1 { font-size: clamp(2.6rem, 11vw, 6rem); max-width: 12ch; }
.bajada { max-width: 44ch; margin-top: 1rem; color: var(--gris); font-size: 1.05rem; }

/* La recta: pasto arriba, seis carriles y la curva que empieza a la derecha */
.pista-zona { margin-top: 2rem; padding-right: 1rem; }
.pista {
  border-top: 22px solid var(--pasto);
  border-bottom: 22px solid var(--pasto);
  background: var(--tartan);
  border-radius: 0 999px 999px 0;
  overflow: hidden;
  max-width: 1400px;
}
.carril {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  height: 58px;
  padding: 0 1rem 0 0;
  background: none;
  border: 0;
  border-top: 3px solid var(--blanco);
  color: var(--blanco);
  text-align: left;
}
.carril:first-child { border-top: 0; }
.carril:hover { background: var(--tartan-claro); }
/* Número pintado sobre la línea de largada */
.carril-numero {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 100%;
  border-right: 6px solid var(--blanco);
  font-size: 1.6rem;
  font-weight: 600;
}
.carril-nombre { font-style: italic; font-weight: 600; font-size: 1.15rem; }
.carril.elegido { background: var(--tartan-claro); }
.carril.elegido .carril-nombre { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* El corredor: un punto que recorre el carril elegido */
.corredor {
  position: absolute;
  top: 50%;
  left: 84px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--blanco);
  opacity: 0;
}
.carril.elegido .corredor { opacity: 1; animation: correr 1.1s cubic-bezier(0.3, 0.1, 0.2, 1) forwards; }
@keyframes correr {
  from { left: 84px; }
  to { left: calc(100% - 80px); }
}

/* Actividad elegida */
.actividad { margin-top: 1.8rem; max-width: 1120px; }
.actividad h2 { font-size: clamp(2rem, 7vw, 3.2rem); color: var(--tartan); }
.actividad p { max-width: 46ch; margin: 0.5rem 0 1.2rem; font-size: 1.1rem; }
.boton-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 0.7rem 1.4rem;
  background: var(--wa);
  color: #0B2915;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}
.boton-wa:hover { background: #1FB855; }

@media (min-width: 860px) {
  .pista-zona { padding-right: 3rem; }
  .carril { height: 66px; }
  .carril-numero { width: 96px; font-size: 2rem; }
  .carril-nombre { font-size: 1.4rem; }
  .corredor { left: 120px; }
  @keyframes correr { from { left: 120px; } to { left: calc(100% - 120px); } }
}

/* ====================================================================
   EL LUGAR
   ==================================================================== */
.lugar { background: var(--pasto); color: var(--blanco); padding: 3.4rem 0; }
.lugar-fila { display: grid; gap: 1.2rem; }
.lugar h2 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
.lugar p { max-width: 48ch; font-size: 1.1rem; }
.lugar p + p { margin-top: 0.8rem; }
.lugar strong { font-weight: 600; }
@media (min-width: 860px) { .lugar-fila { grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start; } }

/* ====================================================================
   UBICACIÓN
   ==================================================================== */
.ubicacion { padding: 3.2rem 0; }
.ubicacion-fila { display: grid; gap: 1.6rem; align-items: center; }
.ubicacion h2 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: 0.8rem; }
.ubicacion p { margin-bottom: 0.3rem; color: var(--gris); }
.ubicacion p a { color: var(--tinta); font-weight: 600; }
.boton-contorno {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 0.8rem;
  padding: 0.6rem 1.3rem;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.boton-contorno:hover { background: var(--tinta); color: var(--blanco); }
#mapa-iframe { width: 100%; height: 300px; border: 0; border-radius: 0 160px 160px 0; background: var(--niebla); }
@media (min-width: 860px) { .ubicacion-fila { grid-template-columns: 1fr 1.4fr; gap: 3rem; } #mapa-iframe { height: 340px; } }

/* Pie */
.pie { background: var(--niebla); color: var(--gris); padding: 2rem 0 6rem; font-size: 0.9rem; }
.pie p + p { margin-top: 0.3rem; }
.demo-aviso { font-style: italic; }

/* Botón flotante */
.flotante {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem;
  background: var(--wa);
  color: #0B2915;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.flotante span { display: none; }
@media (min-width: 640px) { .flotante { padding: 0.85rem 1.25rem; } .flotante span { display: inline; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carril.elegido .corredor { animation: none; left: calc(100% - 80px); }
}
