/* ==========================================================================
   AREA UNITED · Hero: composición contenida sobre negro granulado
   Rejilla de 12 columnas con líneas finas, ficha técnica arriba, H1 moderado
   en Knockout Bold (8 columnas), panel vertical 4:5 enmarcado a la derecha,
   y barra inferior de datos + próxima clase (stats.css). UNITED fantasma
   solo como textura muy sutil.
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  --grain: var(--grain-hero);
  overflow: hidden;
  isolation: isolate;
}

/* --- Líneas de la rejilla (12 columnas dentro del contenedor) --- */
.hero-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.hero-lines::before {
  content: "";
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  background:
    linear-gradient(90deg, var(--surface-1) 1px, transparent 1px) var(--gutter) 0 / calc((100% - var(--gutter) * 2) / 12) 100% no-repeat padding-box,
    linear-gradient(90deg, var(--surface-1) 1px, transparent 1px) var(--gutter) 0 / calc((100% - var(--gutter) * 2) / 12) 100% repeat-x padding-box;
  background-clip: content-box;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.5) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.5) 70%, transparent 100%);
}

/* --- UNITED fantasma, textura muy sutil --- */
.hero-ghost {
  position: absolute;
  left: 50%;
  bottom: 12%;
  z-index: 0;
  transform: translateX(-50%);
  font-size: clamp(140px, 24vw, 380px);
  line-height: .8;
  color: transparent;
  -webkit-text-stroke: 1px #161616;
  letter-spacing: .02em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* --- Cuerpo: rejilla de 12 columnas --- */
.hero-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 16px;
  row-gap: 28px;
  align-content: start;
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 40px;
}

/* Ficha técnica (fila superior) */
.hero-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-2);
  color: var(--gray-text);
}
.hero-meta .label { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta-shield { width: 12px; height: auto; }
.hero-meta-right { display: none; gap: 24px; }
.hero-meta-right .label::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--yellow);
  display: inline-block;
}

/* Columna de texto */
.hero-copy {
  grid-column: 1 / -1;
  display: grid;
  gap: 22px;
  align-content: start;
}
.hero-title {
  font-size: var(--fs-h1);
  display: grid;
  gap: .04em;
  margin-top: 6px;
  max-width: 100%;
}
.hero-line {
  display: block;
  overflow: hidden;
  padding: .08em .04em 0;
  margin: -.08em -.04em 0;
}
.hero-line-inner { display: block; will-change: transform; }
.display--outline.hero-line-inner { -webkit-text-stroke: clamp(1.25px, .12vw, 2px) var(--white); }

.hero-sub { max-width: 46ch; color: #D6D6D4; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; margin-top: 4px; }

/* Panel enmarcado 4:5 */
.hero-panel {
  grid-column: 3 / -1;
  position: relative;
  display: grid;
  gap: 10px;
}
.hero-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface-1);
  clip-path: inset(0 0 0 0);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: saturate(.3) contrast(1.08) brightness(.9);
  will-change: transform;
}
.hero-frame::after {               /* velo + grano */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.05) 40%, rgba(10,10,10,.55) 100%);
}
.hero-frame-marks {                 /* marcas de esquina amarillas */
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  --m: linear-gradient(var(--yellow), var(--yellow));
  background:
    var(--m) 0 0 / 16px 2px no-repeat, var(--m) 0 0 / 2px 16px no-repeat,
    var(--m) 100% 0 / 16px 2px no-repeat, var(--m) 100% 0 / 2px 16px no-repeat,
    var(--m) 0 100% / 16px 2px no-repeat, var(--m) 0 100% / 2px 16px no-repeat,
    var(--m) 100% 100% / 16px 2px no-repeat, var(--m) 100% 100% / 2px 16px no-repeat;
}
.hero-frame .disc-badge { top: 18px; right: 18px; z-index: 3; }
.hero-frame-play {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 3;
  width: 56px; height: 56px;
  translate: -50% -50%;
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.hero-frame-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.hero-frame-play:hover { border-color: var(--yellow); color: var(--yellow); }
.hero-frame-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-text);
}

/* --- Estados iniciales de la entrada: SOLO con JS y mientras dura la intro.
       Rejilla, fantasma y ficha ya están colocados bajo la cortina; titular
       (máscara), panel (clip-path), texto y barra entran al levantarse.
       Red de seguridad: a los 4,6 s todo se fuerza visible pase lo que pase. --- */
.js .hero[data-intro] .hero-line-inner { transform: translateY(110%); }
.js .hero[data-intro] [data-hero-fade],
.js .hero[data-intro] [data-hero-late] { opacity: 0; }
.js .hero[data-intro] .hero-frame { clip-path: inset(0 0 100% 0); }

.js .hero[data-intro] .hero-line-inner,
.js .hero[data-intro] [data-hero-fade],
.js .hero[data-intro] [data-hero-late],
.js .hero[data-intro] .hero-frame { animation: hero-safety 1ms linear 4600ms forwards; }
@keyframes hero-safety { to { transform: none; opacity: 1; clip-path: inset(0 0 0 0); } }

/* --- Tablet: dos columnas --- */
@media (min-width: 768px) {
  .hero-body { column-gap: 24px; row-gap: 36px; padding-top: calc(var(--header-h) + 28px); padding-bottom: 48px; }
  .hero-meta-right { display: flex; }
  .hero-copy { grid-column: 1 / 9; align-self: center; }
  .hero-panel { grid-column: 9 / -1; align-self: center; }
  .hero-ghost { left: auto; right: -4vw; bottom: 8%; transform: none; }
}

/* --- Escritorio --- */
@media (min-width: 1024px) {
  .hero { min-height: 100vh; max-height: none; }
  .hero-body { align-content: center; padding-top: calc(var(--header-h) + 24px); }
  .hero-copy { gap: 26px; }
  .hero-sub { max-width: 52ch; }
  .hero-cta { gap: 32px; }
  .hero-panel { grid-column: 9 / -1; }
  .hero-frame-marks { inset: 14px; }
}

@media (min-width: 1280px) {
  .hero-panel { grid-column: 9 / -1; }
}

/* --- Hero más mínimo (decisión del dueño): se oculta lo accesorio sin borrar el
   HTML, para poder recuperarlo quitando este bloque --- */
.hero-ghost,
.hero-lines,
.hero-meta-right { display: none; }

/* --- Fondo con imagen (luego vídeo): foto del box oscurecida bajo el contenido --- */
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img, .hero-bg video {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
  filter: saturate(.85) brightness(.75) contrast(1.05);
  transform: scale(1.04);
}
.hero-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10,10,10,.82) 0%, rgba(10,10,10,.45) 55%, rgba(10,10,10,.25) 100%),
    linear-gradient(180deg, rgba(10,10,10,.7) 0%, rgba(10,10,10,0) 30%, rgba(10,10,10,.6) 100%);
}
.hero-body { position: relative; z-index: 2; }

/* --- Móvil: el panel del reel ocupa todo el ancho (antes quedaba estrecho y descentrado
   en la columna 3-12) y más bajo para que el hero no se alargue --- */
@media (max-width: 767px) {
  .hero-panel { grid-column: 1 / -1; margin: 0; }
  .hero-frame { aspect-ratio: 16 / 11; }
  .hero-frame img { object-position: 50% 40%; }
}
