/* Shared type system: normal-width Barlow, restrained headings, comfortable copy. */
:root {
  --type-section: clamp(2rem, 1.4rem + 1.5vw, 2.75rem);
  --type-page: clamp(2.125rem, 1.5rem + 1.8vw, 3rem);
  --type-heading: clamp(1.25rem, 1.1rem + .3vw, 1.375rem);
  --type-body: 1rem;
  --type-intro: 1.125rem;
  --type-small: .875rem;
  --type-face: 'Barlow', Arial, sans-serif;
}

body { font-family: var(--type-face); font-size: var(--type-body); line-height: 1.6; }
body :is(h1,h2,h3,h4) { font-family: var(--type-face); font-weight: 600; text-wrap: balance; }
body strong { font-weight: 700; }

body .seccion { padding-block: 80px; }
body .seccion .etiqueta-seccion,
body .product-eyebrow { display: none; }

body .seccion h2,
body #carrera h2,
body #inscripciones h2,
body .route-story h2 {
  font-family: var(--type-face);
  font-size: var(--type-section);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.025em;
  text-transform: none;
  margin-bottom: 24px;
  max-width: 24ch;
}

body .seccion h3,
body #bolsa-corredor .grid-servicios > :not(.cine-product) > h3 {
  font-family: var(--type-face);
  font-size: var(--type-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-transform: none;
  overflow-wrap: normal;
}

body .intro-seccion,
body .route-story > .intro-seccion,
body #preguntas-frecuentes .intro-seccion {
  font-size: var(--type-intro);
  line-height: 1.65;
  max-width: 65ch;
}
body .seccion :is(.texto-reglamento p,.lista-check li,.acordeones-reglamento p,.acordeones-reglamento li),
body .tarjeta-apartado p,
body .product-copy p,
body .route-step p,
body #bolsa-corredor .grid-servicios > :not(.cine-product) > p {
  font-size: var(--type-body);
  line-height: 1.6;
}
body .texto-reglamento p { max-width: 65ch; margin-bottom: 24px; }
body .texto-reglamento h3 { margin-bottom: 10px; }

/* Replace the negative-margin heading layout with aligned, independent columns. */
body #carrera > .contenedor {
  display: grid;
  grid-template-columns: .8fr 1fr;
  gap: 0 64px;
  align-items: start;
}
body #carrera h2 { grid-column: 1; margin: 0; }
body #carrera > .contenedor > .intro-seccion {
  grid-column: 2;
  margin: 0;
  padding: 0;
  min-height: 0;
  max-width: 65ch;
}
body #carrera :is(.resumen-carrera,.tarjetas-carrera) { grid-column: 1 / -1; }
body .resumen-carrera { margin-top: 40px; }
body :is(.resumen-carrera,.franja-datos-grid) strong {
  font-family: var(--type-face);
  font-size: clamp(1.5rem, 1rem + 1vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  text-transform: none;
  font-variant-numeric: lining-nums tabular-nums;
}
body .resumen-carrera span { font-size: var(--type-small); line-height: 1.5; }
body .franja-datos-grid span { font-size: .75rem; line-height: 1.4; letter-spacing: .05em; }
body .franja-datos-grid { align-items: stretch; }
body .franja-datos-grid > div { padding: 20px 24px; align-content: center; }
body .franja-datos-grid > div:first-child { padding-left: 0; }
body .tarjeta-apartado { min-height: 0; padding-block: 20px; }
body .tarjeta-apartado h3 { font-size: 1.125rem; line-height: 1.35; }
body .tarjeta-apartado p { font-size: .9375rem; }

body .route-steps { margin-top: 56px; }
body .route-step { margin-bottom: 40px; padding-top: 24px; }
body .route-step:last-child { margin-bottom: 0; }
body .route-step h3 { font-size: 1.5rem; margin-block: 12px 10px; }
body .route-map-top strong {
  font-family: var(--type-face);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
body .route-map-top > span,
body .route-caption { font-size: .8125rem; letter-spacing: .02em; }
body .product-copy { padding-right: 64px; }
body .product-copy h3 { font-size: 1.5rem; margin-bottom: 8px; }
body .product-arrow { top: 24px; }
body .grid-servicios { margin-top: 32px; }
body #reglamento { padding-bottom: 80px; }
body #reglamento .bloque-reglamento { margin-top: 32px; }
body .acordeones-reglamento summary {
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
body #preguntas-frecuentes > .contenedor { grid-template-rows: auto 1fr; }
body #preguntas-frecuentes h2 { grid-row: 1; }
body #preguntas-frecuentes .intro-seccion { grid-row: 2; }
body #preguntas-frecuentes .acordeones-reglamento { grid-row: 1 / span 2; }
body #galeria h2 { margin: 0; }
body #voluntariado::after { font-family: var(--type-face); font-weight: 700; }

/* Calls to action keep their emphasis through color, space and weight. */
body .boton,
body .boton-resultado,
body :is(.volver-web,.volver-resultados) {
  font-family: var(--type-face);
  font-size: .9375rem;
  line-height: 1.35;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
body .boton { min-height: 48px; gap: 20px; padding: 14px 24px; }
body .cine-primary-cta.boton {
  font-family: var(--type-face);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
  min-height: 68px;
}
body .cine-event-date time {
  font-family: var(--type-face);
  font-size: clamp(2rem, 1.5rem + 1vw, 2.375rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
}
body .cine-event-time { line-height: 1.4; }
body .cine-race-title { font-weight: 500; text-wrap: initial; }
body .cine-intro { line-height: 1.6; }
body .cta-home-dorsal-texto p {
  font-family: var(--type-face);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}
body .cine-mobile-cta strong { font-family: var(--type-face); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
body .banda-superior .menu-superior > a.nav-registration { font-family: var(--type-face); text-transform: none; }

/* Interior pages and overlays use the same roles as the homepage. */
body :is(.cabecera-reglamento,.hero-resultados,.hero-reglamento,.hero-legal) h1 {
  font-family: var(--type-face);
  font-size: var(--type-page);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-transform: none;
  max-width: 25ch;
}
body :is(.cabecera-reglamento,.hero-resultados) h1::after { height: 3px; width: 48px; }
body :is(.cabecera-reglamento,.hero-resultados) p { font-size: var(--type-intro); line-height: 1.6; max-width: 65ch; }
body .hero-resultados { height: auto; min-height: 317px; padding-block: 112px 48px; }
body .documento-reglamento { max-width: 850px; margin-inline: auto; }
body .documento-reglamento h2 { font-size: 1.5rem; line-height: 1.3; text-transform: none; }
body .documento-reglamento h3 { font-size: 1.25rem; line-height: 1.35; text-transform: none; }
body .documento-reglamento :is(p,li) { font-size: 1.0625rem; line-height: 1.7; max-width: 70ch; }
body .indice-reglamento h2 { font-size: 1.25rem; line-height: 1.3; text-transform: none; }
body .indice-reglamento a { font-size: .9375rem; line-height: 1.45; font-weight: 500; text-transform: none; }
body .capitulo-reglamento summary { font-size: 1.125rem; line-height: 1.45; font-weight: 600; letter-spacing: 0; }
body :is(.popup-contenido,.formulario-voluntariado) h3 { font-size: 1.75rem; line-height: 1.25; text-transform: none; }
body .popup-contenido h2 { font-size: 1.75rem; line-height: 1.25; text-transform: none; }
body .popup-resultados-cabecera h2 { font-size: 2rem; line-height: 1.2; text-transform: none; }
body :is(.tarjeta-resultado,.podio-bloque,.bloque-aviso-resultados) h3 { font-size: 1.5rem; line-height: 1.3; text-transform: none; }
body .tarjeta-resultado .edicion { color: #766020; font-size: .8125rem; font-weight: 600; letter-spacing: .02em; }
body .form-grid :is(input,textarea) { font-size: 1rem; line-height: 1.5; }
body .footer-enlaces h4 { font-size: .8125rem; font-weight: 600; line-height: 1.4; text-transform: none; }

@media (max-width: 900px) {
  body #carrera > .contenedor { column-gap: 32px; }
  body .tarjetas-carrera { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .tarjeta-apartado:nth-child(2n) { border-right: 0; }
  body .seccion { padding-block: 64px; }
  body .banda-superior .menu-superior > a.nav-registration { font-size: 1.125rem; }
}

@media (max-width: 620px) {
  :root { --type-intro: 1.0625rem; --type-section: 2rem; }
  body .seccion { padding-block: 56px; }
  body .seccion h2,
  body #carrera h2,
  body #inscripciones h2,
  body .route-story h2 { margin-bottom: 20px; }
  body #carrera > .contenedor { display: block; }
  body .resumen-carrera { margin-top: 28px; }
  body .tarjetas-carrera { display: grid; grid-template-columns: 1fr; }
  body .franja-datos-grid strong { font-size: 1.375rem; }
  body .franja-datos-grid span { font-size: .6875rem; letter-spacing: .025em; }
  body .franja-datos-grid > div { padding: 12px 14px; }
  body .franja-datos-grid > div:nth-child(3) { padding-left: 0; }
  body .route-layout { gap: 24px; }
  body .route-story > h2 { margin: 0; }
  body .route-story > .intro-seccion { margin: 0; }
  body .route-story > .boton { margin: 0; }
  body .route-steps { margin-top: 0; }
  body .route-step { margin: 0; }
  body .route-step h3 { font-size: 1.375rem; }
  body .route-map-top strong { font-size: 1.5rem; }
  body .route-map-top > span { font-size: .6875rem; }
  body .product-copy h3 { font-size: 1.375rem; }
  body .acordeones-reglamento summary { font-size: 1rem; padding-right: 40px; }
  body #reglamento { padding-bottom: 56px; }
  body #galeria h2 { margin: 0; }
  body .cine-primary-cta.boton { font-size: 1.25rem; min-height: 64px; padding: 17px 23px; }
  body .cine-event-date time { font-size: 2rem; }
  body .cta-home-dorsal-texto p { font-size: 1.0625rem; max-width: 180px; }
  body .cta-home-dorsal-boton { font-size: .875rem; padding: 12px 16px; min-width: 0; }
  body .hero-resultados { min-height: 0; padding-block: 108px 36px; }
  body .capitulo-reglamento summary { font-size: 1rem; }
  body .documento-reglamento :is(p,li) { font-size: 1rem; }
}

@media (max-width: 359px) {
  body .cine-event-date time { font-size: 1.875rem; }
  body .franja-datos-grid strong { font-size: 1.25rem; }
  body .cine-mobile-cta strong { font-size: 1rem; }
}
