/* ══════════════════════════════════════════════════════════
   SRL™ — CAPA DE DISEÑO (se carga la última, después de motion.css)
   Unifica tipografía, tarjetas y color en todas las páginas.
   Reglas: 3 niveles de texto (título enorme · etiqueta pequeña · texto) y el naranja solo como acento.
══════════════════════════════════════════════════════════ */
:root {
  --ds-line: rgba(255,255,255,.09);
  --ds-card: #0b0b0b;
  --ds-shadow: 0 28px 56px rgba(0,0,0,.55);
}

/* ── 4 · Tipografía: un mismo título y una misma etiqueta de sección en todas las páginas ── */
.content h2:not(.rh-title):not(.pf-name),
.x-more h2, .rk h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: 0; }
.content > h2, .content > .reveal h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
.section-label { font-size: .7rem; letter-spacing: .22em; }

/* ── 5 · Naranja medido: los halos naranjas se bajan; el acento queda en borde, línea y dato ── */
.erc-p:hover, .psc-driver:hover, .nbd:hover, .driver.rc:hover, .x-card:hover, .cs-img:hover, .cc:hover {
  box-shadow: var(--ds-shadow) !important;
}
.erc-p .glow, .psc-glow, .nbd-glow { background: radial-gradient(ellipse at 50% 100%, rgba(255,69,0,.2), transparent 65%) !important; }
.erc-live:hover, .erc-cta, .x-cta { box-shadow: none !important; }

/* ── 6 · Una sola tarjeta de piloto: misma proporción, recorte y degradado en todas las páginas ── */
.erc-p, .psc-driver, .driver.rc { aspect-ratio: 3 / 4.3; }
.erc-p .ph, .psc-driver .psc-ph, .nbd .nbd-ph, .driver.rc .driver-img { object-position: center 12% !important; }
.erc-p::after, .psc-driver::after, .nbd::after { background: linear-gradient(0deg, rgba(5,5,5,.97) 0%, rgba(5,5,5,.75) 22%, transparent 52%) !important; }

/* ── 2/3 · Banda de foto a todo el ancho (más_foto, ritmo entre secciones) ── */
.x-band { position: relative; height: clamp(260px, 44vh, 480px); overflow: hidden; isolation: isolate; display: flex; align-items: flex-end; border-top: 1px solid var(--ds-line); }
.x-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: -2; }
.x-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,5,5,.92) 0%, rgba(5,5,5,.45) 55%, rgba(5,5,5,.2) 100%), linear-gradient(0deg, rgba(5,5,5,.9) 0%, transparent 45%); }
.x-band-in { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 2.5rem 2.6rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.x-band-k { font-family: 'Sequel 100 Black', 'Barlow Condensed', sans-serif; font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: .8rem; }
.x-band-k::before { content: ''; width: 36px; height: 2px; background: #FF4500; }
.x-band-n { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; text-transform: uppercase; line-height: .88; font-size: clamp(2.8rem, 7vw, 6.4rem); color: #fff; margin-top: .6rem; }
.x-band-t { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; line-height: .8; font-size: clamp(5rem, 16vw, 14rem); color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.4); }
@media (max-width: 640px) { .x-band { height: 240px; } .x-band-in { padding: 0 1.2rem 1.6rem; } .x-band-t { display: none; } }

/* ── 8 · Móvil con diseño propio: tarjetas de piloto grandes (una por fila en la plantilla) ── */
@media (max-width: 600px) {
  .drivers-grid.rc-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .drivers-grid.rc-grid .driver.rc { aspect-ratio: 4 / 3.7 !important; }
  .erc-p-grid .driver.rc, .psc-drivers .driver.rc { aspect-ratio: 3 / 4.3 !important; }
  .nbd-grid .driver.rc { aspect-ratio: 4 / 4.6 !important; }
  .driver.rc .rc-info { padding: 0 1.2rem 1.3rem; }
  .driver.rc .rc-last { font-size: clamp(2rem, 9vw, 2.6rem); }
  .erc-p-grid, .erc-p-grid.n3 { grid-template-columns: repeat(2, 1fr); width: 100%; gap: .8rem; }
  .x-more-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
}

/* ══════════ Plantilla de pilotos: grupos + buscador (roster.js) ══════════ */
.rc-filter { align-items: center; }
.rc-search { margin-left: auto; min-width: 220px; padding: .7rem 1rem; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.2); color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: .85rem; outline: none; }
.rc-search::placeholder { color: rgba(255,255,255,.45); }
.rc-search:focus { border-color: #FF4500; }
.roster { margin-top: 1.2rem; }
.rg { margin-top: 3.2rem; }
.rg[hidden] { display: none; }
.rg-h { display: flex; align-items: flex-end; gap: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ds-line); position: relative; }
.rg-n { padding: .3rem .6rem; background: #FF4500; color: #000; transform: skewX(-12deg); font-family: 'Sequel 100 Black', 'Barlow Condensed', sans-serif; font-size: .62rem; margin-bottom: .5rem; }
.rg-t h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; text-transform: uppercase; line-height: .9; font-size: clamp(2.2rem, 4.6vw, 3.8rem); color: #fff; margin: 0; }
.rg-t p { margin: .5rem 0 0; font-family: 'Sequel 100 Black', 'Barlow Condensed', sans-serif; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: #bbb; }
.rg-car { margin-left: auto; height: clamp(54px, 7vw, 92px); width: auto; max-width: 40%; object-fit: contain; opacity: .9; }
.rg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 1.4rem; }
.rg-empty { margin-top: 3rem; color: #bbb; text-align: center; }
.driver.rs-off { display: none !important; }
@media (max-width: 1000px) { .rg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .rg-grid { grid-template-columns: repeat(2, 1fr); } .rc-search { width: 100%; margin-left: 0; } .rg-car { display: none; } }
@media (max-width: 600px) { .rg-grid { grid-template-columns: 1fr !important; gap: 1rem !important; } }
.rg-note { grid-column: span var(--k, 1); display: flex; flex-direction: column; justify-content: center; gap: .8rem; padding: 2rem; border: 1px solid var(--ds-line); border-left: 3px solid #FF4500; background: linear-gradient(120deg, rgba(255,255,255,.05), transparent 70%); }
.rg-note b { font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: clamp(1.8rem, 3.2vw, 2.8rem); line-height: .95; text-transform: uppercase; color: #fff; }
.rg-note span { color: #bbb; line-height: 1.6; max-width: 36ch; }
@media (max-width: 1000px) { .rg-note { grid-column: 1 / -1; } }
.rg-grid .driver.rc-off ~ .rg-note { }

/* ══════════ Tarjeta de piloto (plantilla de Simracing): rediseño ══════════ */
/* nombre: rol arriba en naranja, nombre fino y apellido grande en blanco que pasa a naranja al pasar el ratón */
.driver.rc .rc-info { padding: 0 1.2rem 1.3rem; }
.driver.rc .rc-role { display: block; margin-bottom: .5rem; font-family: 'Sequel 100 Black', 'Barlow Condensed', sans-serif; font-size: .46rem; letter-spacing: .18em; text-transform: uppercase; color: #FF4500; }
.driver.rc .rc-first { font-weight: 600; font-size: 1rem; letter-spacing: .2em; color: rgba(255,255,255,.8); }
.driver.rc .rc-last { font-size: clamp(2rem, 2.9vw, 2.9rem); color: #fff; transition: color .35s; }
.driver.rc:hover .rc-last { color: #FF4500; }
/* línea fina bajo el nombre, que se alarga al pasar el ratón */
.driver.rc .rc-meta { position: relative; margin-top: .9rem; padding-top: .8rem; padding-right: 3rem; }
.driver.rc .rc-meta::before { content: ''; position: absolute; left: 0; top: 0; width: 38px; height: 2px; background: #FF4500; transition: width .6s cubic-bezier(.16,1,.3,1); }
.driver.rc:hover .rc-meta::before { width: 100%; }
/* dorsal en placa grande, victorias en dorado y campeonatos en discreto */
.driver.rc .rc-meta span { border-radius: 0; padding: .22rem .5rem; font-size: .5rem; }
.driver.rc .rc-meta span.d { padding: .3rem .7rem; font-size: .8rem; letter-spacing: .02em; box-shadow: 3px 3px 0 #FF4500; }
.driver.rc .rc-meta span.w { background: linear-gradient(90deg, #D4AF37, #f1d47a); border-color: #D4AF37; color: #000; transform: skewX(-12deg); }
/* Instagram: botón cuadrado, no redondo */
.driver.rc .rc-ig { border-radius: 0; width: 36px; height: 36px; bottom: 1.2rem; right: 1.2rem; }
/* número fantasma más grande y sutil, con la luz naranja más baja */
.driver.rc .rc-num { font-size: clamp(3.4rem, 6vw, 5.6rem); -webkit-text-stroke-color: rgba(255,255,255,.16); }
.driver.rc .driver-img-wrap { background: radial-gradient(ellipse at 50% 100%, rgba(255,69,0,.24), transparent 66%) !important; }
/* en móvil (tarjeta grande) se enseñan todas las placas */
@media (max-width: 600px) {
  .driver.rc .rc-meta span:not(.d) { display: inline-block; }
  .driver.rc .rc-ig { width: 36px; height: 36px; right: 1rem; bottom: 1rem; }
}

/* ── Tarjeta de piloto, segunda vuelta: esquina cortada y resumen al pasar el ratón ── */
.driver.rc { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.driver.rc .rc-cut { position: absolute; top: 0; right: 0; width: 28px; height: 28px; z-index: 7; pointer-events: none;
  background: linear-gradient(to top right, transparent calc(50% - 1px), #FF4500 calc(50% - 1px), #FF4500 calc(50% + 1px), transparent calc(50% + 1px)); }
.driver.rc .rc-num { right: 2.4rem; }
.driver.rc .rc-slot { position: relative; }
.driver.rc .rc-peek { position: absolute; left: 0; right: 3rem; top: .8rem; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: .15rem; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .35s, transform .5s cubic-bezier(.16,1,.3,1); }
.driver.rc .rc-peek span { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.driver.rc .rc-peek span.g { color: #f1d47a; }
@media (hover: hover) {
  .driver.rc:hover .rc-peek { opacity: 1; transform: none; }
  .driver.rc:hover .rc-slot .rc-meta span { opacity: 0; }
}
.driver.rc .rc-meta span { transition: opacity .25s; }
@media (hover: none) { .driver.rc .rc-peek { display: none; } }

/* ── Tarjeta de piloto, tercera vuelta: fundido de foto, luz del ratón, campeones en dorado, teclado ── */
.driver.rc .driver-img { transition: opacity .8s ease, transform 1.2s cubic-bezier(.16,1,.3,1), filter .6s !important; }
.driver.rc:not(.rc-ready) .driver-img { opacity: 0; }
.driver.rc .driver-img-wrap::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle 200px at var(--mx, 50%) var(--my, 40%), rgba(255,255,255,.1), transparent 70%); }
@media (hover: hover) { .driver.rc:hover .driver-img-wrap::before { opacity: 1; } }
.driver.rc:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* campeones del mundo: oro */
.driver.rc.rc-gold { border-color: rgba(212,175,55,.55) !important; }
.driver.rc.rc-gold .rc-cut { background: linear-gradient(to top right, transparent calc(50% - 1px), #D4AF37 calc(50% - 1px), #D4AF37 calc(50% + 1px), transparent calc(50% + 1px)); }
.driver.rc.rc-gold .rc-role, .driver.rc.rc-gold:hover .rc-last { color: #f1d47a; }
.driver.rc.rc-gold .rc-meta::before { background: #D4AF37; }
.driver.rc.rc-gold:hover { border-color: #D4AF37 !important; }
.driver.rc.rc-gold .driver-img-wrap { background: radial-gradient(ellipse at 50% 100%, rgba(212,175,55,.26), transparent 66%) !important; }

/* ══ Legibilidad: etiquetas pequeñas más grandes y menos grises ══ */
.sx-kicker, .section-label, .page-hero-label { font-size: .78rem !important; }
.x-band-k, .tf span, .vr-stat span, .erc-facts span { font-size: .7rem !important; }
.nw-date, .hz-res, .champ-sub, .vr-lead { color: rgba(255,255,255,.78); }
.content p, .x-more p { color: rgba(255,255,255,.82); }
@media (max-width: 760px) {
  .sx-kicker, .section-label, .page-hero-label { font-size: .82rem !important; letter-spacing: .16em; }
  .content p { font-size: 1.02rem; line-height: 1.7; }
}

/* ══ Fotos de las galerías: mismo encuadre y mismo tratamiento (sin subir contraste ni naranja) ══ */
.gallery-grid .gallery-img, .gl-item { background: #0b0b0b; }
.gallery-grid .gallery-img img, .gl-item img { object-fit: cover; filter: saturate(.92) brightness(.97); }
.gallery-grid .gallery-img::after, .gl-item::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(5,5,5,.35), transparent 40%); }
.gallery-grid .gallery-img, .gl-item { position: relative; }

/* ══ Franja de datos de los equipos de Karting y Racing ══ */
.tf { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ds-line); background: #0a0a0a; margin: 2rem 0 3rem; }
.tf > div { padding: 1.5rem 1rem; text-align: center; border-right: 1px solid var(--ds-line); }
.tf > div:last-child { border-right: 0; }
.tf b { display: block; font-family: 'Barlow Condensed', sans-serif; font-weight: 900; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1; color: #FF4500; }
.tf b.g { color: var(--gold, #e0a800); }
.tf span { display: block; margin-top: .5rem; font-family: 'Sequel 100 Black', 'Barlow Condensed', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #bbb; }
@media (max-width: 640px) { .tf { grid-template-columns: 1fr 1fr; } .tf > div:nth-child(2) { border-right: 0; } .tf > div:nth-child(-n+2) { border-bottom: 1px solid var(--ds-line); } }

/* ══ Tarjetas de piloto iguales en TODAS las páginas (ERC, Porsche Cup, 24H Nürburgring, Karting, Racing) ══ */
.erc-p, .psc-driver, .nbd { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); background: #070707; transition: border-color .35s !important; }
.erc-p:hover, .psc-driver:hover, .nbd:hover { border-color: rgba(255,69,0,.6) !important; transform: none !important; }
/* foto sin contraste añadido y sin zoom al pasar el ratón */
.erc-p .ph, .psc-driver .psc-ph, .nbd .nbd-ph { filter: none !important; transform: none !important; }
.erc-p:hover .ph, .psc-driver:hover .psc-ph, .nbd:hover .nbd-ph { transform: none !important; filter: none !important; }
.erc-p .glow, .psc-glow, .nbd-glow { background: radial-gradient(ellipse at 50% 100%, rgba(255,106,0,.16), transparent 66%) !important; }
/* número gigante más suave y quieto */
.erc-p .num, .psc-num, .nbd-num { -webkit-text-stroke: 1px rgba(255,255,255,.16) !important; transform: none !important; }
.erc-p:hover .num, .psc-driver:hover .psc-num, .nbd:hover .nbd-num { -webkit-text-stroke-color: rgba(255,255,255,.3) !important; transform: none !important; }
/* nombre: nombre pequeño + apellido blanco que se vuelve naranja al pasar */
.erc-p .l, .psc-last, .nbd-last { color: #fff !important; transition: color .3s; }
.erc-p:hover .l, .psc-driver:hover .psc-last, .nbd:hover .nbd-last { color: #FF4500 !important; }
.erc-p .f, .psc-first, .nbd-first { font-weight: 600 !important; letter-spacing: .2em !important; color: rgba(255,255,255,.8) !important; }
/* placas del dorsal y del dato, como en la plantilla */
.erc-p .m span.d, .psc-meta span.d, .nbd-meta span.d { background: #fff; color: #000; box-shadow: 3px 3px 0 #FF4500; }
.psc-meta span.g { box-shadow: 3px 3px 0 rgba(0,0,0,.5); }
.erc-p .go, .psc-go, .nbd-go { clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%); transform: none !important; }
.erc-p:hover .go, .psc-driver:hover .psc-go, .nbd:hover .nbd-go { transform: none !important; }
.erc-p:focus-visible, .psc-driver:focus-visible, .nbd:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

/* Karting y Racing: las tarjetas antiguas (foto + barra de nombre debajo) pasan al mismo formato */
.driver:not(.rc) { position: relative; aspect-ratio: 3 / 4.3; overflow: hidden !important; background: #070707 !important; border: 1px solid var(--ds-line); clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.driver:not(.rc):hover { border-color: rgba(255,69,0,.6); box-shadow: none; }
.driver:not(.rc) .driver-img-wrap { position: absolute !important; inset: 0; aspect-ratio: auto !important; background: radial-gradient(ellipse at 50% 100%, rgba(255,106,0,.16), transparent 66%), #0b0b0b !important; }
.driver:not(.rc) .driver-img-wrap::after { background: linear-gradient(0deg, rgba(5,5,5,.97) 0%, rgba(5,5,5,.75) 22%, transparent 52%) !important; }
.driver:not(.rc) .driver-img, .driver:not(.rc):hover .driver-img { filter: none !important; transform: none !important; object-position: center 12%; }
.driver:not(.rc) .driver-border { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; }
.driver:not(.rc) .driver-info { position: absolute !important; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 1.2rem 1.3rem !important; }
.driver:not(.rc) .driver-name { font-size: clamp(1.6rem, 2.4vw, 2.3rem) !important; line-height: .92; color: #fff !important; letter-spacing: .02em !important; }
.driver:not(.rc):hover .driver-name { color: #FF4500 !important; letter-spacing: .02em !important; }
.driver:not(.rc)::before { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.2); }
@media (max-width: 640px) { .driver:not(.rc) { aspect-ratio: 4 / 4.6; } }
.driver:not(.rc) .driver-name { font-family: 'Barlow Condensed', sans-serif !important; font-weight: 900 !important; text-transform: uppercase; }

/* Base de la foto de las tarjetas de piloto: así se ven igual en cualquier página (ERC, Porsche Cup, Nürburgring…) */
.driver-img-wrap { overflow: hidden; }
.driver-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.driver.rc .driver-img { position: relative; z-index: 1; }
/* la foto nunca se amplía al pasar el ratón (motion.css la escalaba un 8 %) */
.driver.rc .driver-img, .driver.rc:hover .driver-img { transform: none !important; }
