/* =========================================================================
   Rafael Marín Corada — sitio one-page
   Dirección "la ROJA". Paleta y tipografía salen de la fotografía real.
   Un solo acento (rojo). Sin sombras: se separa con líneas y color.
   ========================================================================= */

:root {
  --hueso: #f7f3ee;
  --tinta: #171210;
  --rojo: #e8322a;
  --rojo-hover: #d02b23;
  --arena: #e6d5c4;
  --roca: #a8654a;
  --grafito: #6b625c;         /* secundario sobre claro */
  --grafito-osc: #948b85;     /* secundario sobre oscuro */

  --linea-fuerte: rgba(23, 18, 16, 0.14);
  --linea-suave: rgba(23, 18, 16, 0.07);
  --linea-fuerte-osc: rgba(247, 243, 238, 0.16);
  --linea-suave-osc: rgba(247, 243, 238, 0.09);

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --contenedor: min(100% - 2.5rem, 76rem);
  --header-h: 4.5rem;

  --display: 'Archivo', sans-serif;
  --body: 'Figtree', sans-serif;
  --mono: 'Martian Mono', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--hueso);
  color: var(--tinta);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--tinta); text-decoration: none; }
a:hover { color: var(--rojo); }
::selection { background: var(--rojo); color: var(--hueso); }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }
input, textarea, button { font: inherit; }
h1, h2, h3, p, dl, dd, dt, figure, ol { margin: 0; }
img { display: block; max-width: 100%; }

/* ---- Utilidades tipográficas ------------------------------------------ */
.display {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.88;
}
.mono {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tabular { font-variant-numeric: tabular-nums; }
.contenedor { width: var(--contenedor); margin-inline: auto; }
.seccion { padding: 6.5rem 0; }

/* Kicker de sección: minuto de partido + rótulo */
.kicker { color: var(--rojo); }
.seccion-h2 {
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  color: var(--tinta);
  margin-top: 0.8rem;
}

/* =========================================================================
   Header fijo
   ========================================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 243, 238, 0.78);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(23, 18, 16, 0.08);
  transition: border-color 300ms var(--ease), background 300ms var(--ease);
}
.header[data-scrolled="true"] {
  border-bottom-color: var(--linea-fuerte);
  background: rgba(247, 243, 238, 0.9);
}
.header__inner {
  width: var(--contenedor);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.marca { display: flex; align-items: center; gap: 0.6rem; color: var(--tinta); }
.marca__nombre {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: 1.05rem;
  white-space: nowrap;
}
.dorsal {
  background: var(--rojo);
  color: var(--hueso);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.4rem;
  border-radius: 2px;
  line-height: 1;
}

.nav { display: flex; gap: 1.9rem; align-items: center; }
.nav__item {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--grafito);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: color 160ms var(--ease);
}
.nav__min {
  font-family: var(--mono);
  color: var(--rojo);
  opacity: 0.6;
  transition: opacity 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .nav__item:hover { color: var(--tinta); }
  .nav__item:hover .nav__min { opacity: 1; }
}
/* Scroll-spy: sección activa */
.nav__item[aria-current="true"] { color: var(--tinta); }
.nav__item[aria-current="true"] .nav__min { opacity: 1; }

.header__cta { display: flex; align-items: center; gap: 0.6rem; }

/* Botones ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms var(--ease), box-shadow 180ms var(--ease), transform 140ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--sm { padding: 0.7rem 1.05rem; }
.btn--lg { padding: 0.95rem 1.55rem; }
.btn--solid { background: var(--rojo); color: var(--hueso); }
.btn--ghost {
  background: transparent;
  color: var(--tinta);
  box-shadow: inset 0 0 0 1px rgba(23, 18, 16, 0.25);
}
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: var(--rojo-hover); }
  .btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(23, 18, 16, 0.55); }
}

/* Hamburguesa + panel móvil */
.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(23, 18, 16, 0.25);
  color: var(--tinta);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.mobile-panel {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  display: none;
  flex-direction: column;
  background: var(--hueso);
  border-bottom: 1px solid var(--linea-fuerte);
  padding: 0.3rem 1.25rem 1.4rem;
  transform-origin: top center;
}
.mobile-panel[data-open="true"] {
  display: flex;
  animation: panel-in 220ms var(--ease);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-panel a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--linea-suave);
  color: var(--tinta);
  font-weight: 600;
  font-size: 1.05rem;
}
.mobile-panel .nav__min { opacity: 0.7; }
.mobile-panel .btn { margin-top: 1.1rem; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--hueso);
}
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--arena);
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  transform: scale(1.06);
  animation: hero-kenburns 1400ms var(--ease) forwards;
}
@keyframes hero-kenburns { to { transform: scale(1); } }
.hero__veil-bottom {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, var(--hueso) 0%, rgba(247, 243, 238, 0) 30%);
}
.hero__veil-diag {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(260deg, var(--hueso) 9%, rgba(247, 243, 238, 0) 47%);
}
.hero__content {
  position: relative;
  width: var(--contenedor);
  margin: auto auto 0;
  padding: 7.5rem 0 2.9rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}
.hero__kicker { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.pill-rojo {
  background: var(--rojo);
  color: var(--hueso);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.42rem 0.62rem;
  border-radius: 2px;
}
.hero__lugar { font-family: var(--mono); color: var(--grafito); }
.hero__titulo {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.87;
  color: var(--tinta);
  margin-top: 1.1rem;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  max-width: 11ch;
}
.hero__titulo .rojo { color: var(--rojo); }
.hero__firma { display: flex; align-items: center; gap: 1rem; margin-top: 1.7rem; flex-wrap: wrap; }
.hero__regla { width: 2.2rem; height: 2px; background: var(--tinta); flex: none; }
.hero__nombre {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  font-size: 1.05rem;
  margin: 0;               /* es un <h1>: neutraliza el margen por defecto */
}
.hero__edad { color: var(--grafito); font-size: 0.9375rem; font-weight: 500; }
.hero__ctas { display: flex; gap: 0.8rem; margin-top: 1.9rem; flex-wrap: wrap; }

/* Entrada escalonada del hero (una sola vez, al cargar) */
.hero__reveal { opacity: 0; transform: translateY(14px); }
.hero[data-ready="true"] .hero__reveal {
  animation: hero-up 620ms var(--ease) forwards;
}
.hero[data-ready="true"] .hero__reveal:nth-child(1) { animation-delay: 120ms; }
.hero[data-ready="true"] .hero__reveal:nth-child(2) { animation-delay: 220ms; }
.hero[data-ready="true"] .hero__reveal:nth-child(3) { animation-delay: 320ms; }
.hero[data-ready="true"] .hero__reveal:nth-child(4) { animation-delay: 420ms; }
@keyframes hero-up { to { opacity: 1; transform: translateY(0); } }

/* Franja de datos al pie del hero */
.franja {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--linea-fuerte);
  border-top: 1px solid var(--linea-fuerte);
}
.franja__celda {
  background: var(--hueso);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 1.35rem 1.6rem;
  min-width: 0;
}
.franja__num {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 0.85;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-variant-numeric: tabular-nums;
  color: var(--tinta);
}
.franja__num--rojo { color: var(--rojo); }
.franja__label { font-family: var(--mono); color: var(--grafito); line-height: 1.6; }

/* =========================================================================
   Sobre mí
   ========================================================================= */
.sobre__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
}
.sobre__texto { display: flex; flex-direction: column; gap: 1.2rem; }
.sobre__texto p { color: var(--grafito); font-size: 1.0625rem; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 2px;
  background: rgba(23, 18, 16, 0.06);
  color: var(--tinta);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag--rojo { background: var(--rojo); color: var(--hueso); }

.datos {
  margin-top: 2.1rem;
  border-top: 1px solid var(--linea-fuerte);
}
.datos__fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--linea-suave);
}
.datos__dt { font-family: var(--mono); color: var(--grafito); }
.datos__dd { font-weight: 600; font-size: 0.9375rem; color: var(--tinta); text-align: right; }

/* =========================================================================
   Números (única sección oscura)
   ========================================================================= */
.numeros { background: var(--tinta); color: var(--hueso); }
.numeros .seccion-h2 { color: var(--hueso); }
.numeros__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}
.tabs { display: flex; gap: 0.4rem; }
.tab {
  border: 0;
  border-radius: 2px;
  padding: 0.55rem 0.95rem;
  background: rgba(247, 243, 238, 0.12);
  color: var(--grafito-osc);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.tab[aria-selected="true"] { background: var(--hueso); color: var(--tinta); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--linea-fuerte-osc);
}
.stat {
  background: var(--tinta);
  padding: 1.7rem 1.5rem;
}
.stat--rojo { background: var(--rojo); }
.stat__num {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 0.85;
  font-size: 2.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--hueso);
}
.stat__label {
  font-family: var(--mono);
  color: var(--grafito-osc);
  margin-top: 0.55rem;
}
.stat--rojo .stat__label { color: rgba(247, 243, 238, 0.8); }

/* =========================================================================
   Trayectoria
   ========================================================================= */
.linea {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0 0 2rem;
  border-left: 2px solid var(--arena);
  max-width: 46rem;
}
.hito { position: relative; padding: 0 0 2.7rem 0; }
.hito:last-child { padding-bottom: 0.4rem; }
.hito__punto {
  position: absolute;
  left: calc(-2rem - 7px);
  top: 0.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--arena);
}
.hito__punto--activo {
  background: var(--rojo);
  box-shadow: 0 0 0 5px rgba(232, 50, 42, 0.16);
}
.hito__fecha { font-family: var(--mono); color: var(--grafito); }
.hito__fecha--activo { color: var(--rojo); }
.hito__club {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.9;
  font-size: 1.45rem;
  color: var(--tinta);
  margin: 0.55rem 0 0.6rem;
}
.hito__desc { color: var(--grafito); font-size: 1rem; line-height: 1.55; max-width: 46ch; }

.proyeccion {
  max-width: 46rem;
  background: var(--arena);
  border-radius: 3px;
  padding: 1.85rem;
  margin-top: 2.6rem;
}
.proyeccion__label { font-family: var(--mono); color: var(--roca); }
.proyeccion p { color: rgba(23, 18, 16, 0.78); font-size: 1rem; line-height: 1.55; margin-top: 0.7rem; }

/* =========================================================================
   Videos
   ========================================================================= */
.head-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
}
.head-nota { font-family: var(--mono); color: var(--grafito); line-height: 1.8; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.vcard {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  overflow: hidden;
  background: var(--arena);
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: left;
}
.vcard__thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 450ms var(--ease);
}
.vcard__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(23, 18, 16, 0.88), rgba(23, 18, 16, 0) 62%);
}
.vcard__foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1.05rem;
  pointer-events: none;
}
.vcard__titulo {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-size: 0.8125rem;
  color: var(--hueso);
}
.vcard__play {
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms var(--ease);
}
.vcard__play::after {
  content: "";
  width: 0; height: 0;
  border-left: 7px solid var(--hueso);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  margin-left: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .vcard:hover .vcard__thumb { transform: scale(1.05); }
  .vcard:hover .vcard__play { transform: scale(1.14); }
}

/* =========================================================================
   Galería
   ========================================================================= */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  grid-auto-flow: dense;
}
.gcell {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 3px;
  overflow: hidden;
  background: var(--arena);
}
.gcell[data-wide="true"] { grid-column: span 2; aspect-ratio: 8 / 5; }
.gcell__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms var(--ease);
}
.gcell__veil {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(to top, rgba(23, 18, 16, 0.85), rgba(23, 18, 16, 0) 100%);
}
.gcell__btn {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 0.85rem;
  border: 0;
  background: transparent;
  color: var(--hueso);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: zoom-in;
}
.gcell__amp { font-size: 0.85rem; line-height: 1; }
@media (hover: hover) and (pointer: fine) {
  .gcell:hover .gcell__thumb { transform: scale(1.06); }
}

/* =========================================================================
   Contacto (sin formulario: enlaces directos)
   ========================================================================= */
.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: start;
}
.redes { display: flex; gap: 0.5rem; margin-top: 0.8rem; flex-wrap: wrap; }
.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(23, 18, 16, 0.16);
  border-radius: 2px;
  color: var(--tinta);
  font-family: var(--mono);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .chip-link:hover { color: var(--rojo); border-color: rgba(232, 50, 42, 0.5); }
}

.contacto-card {
  background: var(--arena);
  border-radius: 3px;
  padding: 2rem;
}
.contacto-card__titulo {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 118%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-size: 1.6rem;
  color: var(--tinta);
  max-width: 16ch;
}
.contacto-card p { color: rgba(23, 18, 16, 0.72); font-size: 1rem; margin-top: 0.8rem; }
.contacto-card__acciones { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.6rem; }
.accion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: 2px;
  transition: transform 140ms var(--ease), background 180ms var(--ease), box-shadow 180ms var(--ease);
}
.accion:active { transform: scale(0.98); }
.accion__label { font-family: var(--mono); letter-spacing: 0.1em; }
.accion__val { font-weight: 600; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.accion--solid { background: var(--rojo); color: var(--hueso); }
.accion--solid .accion__val { color: var(--hueso); }
.accion--ghost { background: rgba(23, 18, 16, 0.03); color: var(--tinta); box-shadow: inset 0 0 0 1px rgba(23, 18, 16, 0.16); }
@media (hover: hover) and (pointer: fine) {
  .accion--solid:hover { background: var(--rojo-hover); }
  .accion--ghost:hover { box-shadow: inset 0 0 0 1px rgba(23, 18, 16, 0.4); }
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer { background: var(--tinta); color: var(--grafito-osc); padding: 2.5rem 0; }
.footer__inner {
  width: var(--contenedor);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer__copy { font-size: 0.875rem; font-weight: 500; }
.footer__nav { display: flex; gap: 1.7rem; flex-wrap: wrap; }
.footer__nav a {
  font-family: var(--mono);
  color: var(--grafito-osc);
  transition: color 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .footer__nav a:hover { color: var(--rojo); }
}

/* =========================================================================
   Modales (lightbox + video)
   ========================================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}
.modal[data-open="true"] { opacity: 1; pointer-events: auto; }
.modal--lightbox { background: rgba(23, 18, 16, 0.92); }
.modal--video { background: rgba(23, 18, 16, 0.94); }
.modal__panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transform: scale(0.96);
  transition: transform 220ms var(--ease);
}
.modal[data-open="true"] .modal__panel { transform: scale(1); }
.modal--lightbox .modal__panel { max-width: min(92vw, 42rem); }
.modal--video .modal__panel { max-width: min(92vw, 64rem); }
.modal__img {
  width: 100%;
  height: 74vh;
  border-radius: 3px;
  background: var(--tinta);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tinta);
  border-radius: 3px;
  overflow: hidden;
}
.modal__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal__cap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal__cap span { font-family: var(--mono); color: var(--hueso); }
.modal__close {
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(247, 243, 238, 0.4);
  border-radius: 2px;
  color: var(--hueso);
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  flex: none;
  transition: background 160ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .modal__close:hover { background: rgba(247, 243, 238, 0.12); }
}

/* =========================================================================
   Revelado al scroll (base)
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 550ms var(--ease), transform 550ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
/* Stagger para hijos directos de un grid revelado */
.reveal[data-stagger] > * { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal[data-stagger].is-visible > * { opacity: 1; transform: translateY(0); }

/* =========================================================================
   Responsive (mismos cortes que el prototipo aprobado)
   ========================================================================= */
@media (max-width: 1000px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 880px) {
  .sobre__grid, .contacto__grid { grid-template-columns: 1fr; gap: 2.8rem; }
}
@media (max-width: 860px) {
  .hero { min-height: 0; }
  .hero__media { position: relative; inset: auto; height: 52svh; }
  .hero__veil-diag { display: none; }
  .hero__titulo { font-size: clamp(2.1rem, 9vw, 3rem); max-width: 14ch; }
  .hero__content { padding: 2.6rem 0 3rem; }
}
@media (max-width: 800px) { .franja { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .video-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  /* En un teléfono no caben nombre + dorsal + botón: el botón se salía de la
     pantalla y arrastraba a la hamburguesa con él. El menú ya trae Contactar. */
  .header__cta .btn { display: none; }
  .marca__nombre { font-size: 0.92rem; }
}
@media (max-width: 400px) {
  .marca__nombre { font-size: 0.8rem; }
}
@media (max-width: 340px) {
  /* último recurso en pantallas muy angostas: el dorsal ya está en el hero */
  .marca .dorsal { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal[data-stagger] > *, .hero__reveal { opacity: 1 !important; transform: none !important; }
  .hero__media img { transform: none !important; }
}
