/* ============================================================
   HERO.CSS · Hero independiente (spotlight sobre la foto del dueño).
   Todo con prefijo .hero- para NO afectar a ninguna otra sección.
   Se carga DESPUÉS del resto del CSS y redefine .hero por completo.

   Fotos: se ponen con variables inline en el HTML
     <div class="hero-base-img" style="--hero-img:url('assets/img/...')">
   Paleta: fondo #050505, blanco + rojo #D4152B solo en el CTA.
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #050505;
  display: block;
  padding: 0;
  place-items: initial;
  text-align: left;
}

/* ---------- Capas de imagen ---------- */
.hero-base-img {
  position: absolute; inset: 0;
  z-index: 1;
  background-color: #050505;
  background-image: var(--hero-img, none);
  background-size: cover;
  /* Centro horizontal + sesgo hacia arriba para mantener el rostro visible */
  background-position: 50% 38%;
  background-repeat: no-repeat;
  /* Blanco y negro con buen contraste */
  filter: grayscale(1) contrast(1.06) brightness(.92);
}
/* Entrada limpia: SOLO fundido (sin zoom) para evitar el "glitch" de carga. */
.hero-image-animate { animation: heroImageIn 1s ease .05s both; }
@keyframes heroImageIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Foto "reveal": aparece bajo el cursor mediante una máscara radial.
   Inicialmente la máscara está en un punto lejísimos → no se ve nada. */
.hero-reveal-img {
  position: absolute; inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: var(--hero-img, none);
  background-size: cover;
  background-position: 50% 38%;
  background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(circle 0px at -999px -999px, #fff, transparent);
          mask-image: radial-gradient(circle 0px at -999px -999px, #fff, transparent);
}

/* Viñeta: oscurece bordes y el lado izquierdo para que el texto se lea */
.hero-vignette {
  position: absolute; inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(125% 100% at 72% 42%, transparent 52%, rgba(0,0,0,.5) 100%),
    linear-gradient(90deg, rgba(5,5,5,.72) 0%, rgba(5,5,5,.28) 36%, transparent 60%);
}

/* ---------- Rejilla de interfaz ---------- */
.hero-ui {
  position: absolute; inset: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  /* El padding-top despeja el header fijo de la landing (var --header-h) */
  padding: calc(var(--header-h, 72px) + 24px) 44px 40px;
  pointer-events: none;
}
/* Solo los elementos interactivos reciben el puntero */
.hero-copy-col,
.hero-card,
.hero-icon-btn,
.hero-card-btn { pointer-events: auto; }

/* Columna izquierda: copy arriba, tarjeta abajo */
.hero-copy-col {
  grid-column: 1;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  min-width: 0;
}

/* ---------- Copy ---------- */
.hero-copy { max-width: 520px; padding-right: 56px; }
.hero-title {
  font-family: var(--font-display, "Orbitron", system-ui, sans-serif);
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-size: clamp(1.55rem, 3.6vw, 3.15rem);
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 2px 28px rgba(0,0,0,.22);
}
.hero-title span { display: block; }
.hero-lead {
  font-family: var(--font-body, "Inter", system-ui, sans-serif);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 340px;
  margin-top: 18px;
  color: rgba(255,255,255,.72);
}
.hero-icons { display: flex; gap: 12px; margin-top: 22px; }
.hero-icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.55);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.hero-icon-btn:hover { background: rgba(255,255,255,.1); }
.hero-icon-btn svg { width: 16px; height: 16px; }

/* ---------- Tarjeta de oferta (único botón rojo) ---------- */
.hero-card {
  width: min(320px, 100%);
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.015) 100%),
    rgba(18,18,22,.5);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.hero-card-thumb {
  width: 86px; height: 86px;
  border-radius: 12px;
  background: #121212 var(--hero-thumb, none) center/cover no-repeat;
  filter: grayscale(1);
  display: grid; place-items: center;
  overflow: hidden;
}
.hero-card-thumb span {
  font-family: var(--font-display, "Orbitron", sans-serif);
  font-size: 1.7rem; letter-spacing: .02em;
  color: rgba(255,255,255,.55);
}
.hero-card-body { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.hero-card-kicker {
  font-family: var(--font-head, "Oswald", sans-serif);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255,255,255,.48);
}
.hero-card-desc {
  font-family: var(--font-body, "Inter", sans-serif);
  font-size: 11.5px; line-height: 1.4;
  color: rgba(255,255,255,.72);
}
.hero-card-btn {
  align-self: start;
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: #D4152B;             /* ÚNICO rojo */
  color: #fff;
  font-family: var(--font-head, "Oswald", sans-serif);
  font-weight: 600; font-size: 12px;
  border: 0; cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(212,21,43,.6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-card-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(212,21,43,.72); }

/* ---------- Indicador arriba-derecha ---------- */
.hero-index {
  position: absolute;
  top: calc(var(--header-h, 72px) + 12px); right: 44px;
  z-index: 9;
  font-family: var(--font-head, "Oswald", sans-serif);
  font-size: 13px; letter-spacing: .14em;
  color: rgba(255,255,255,.48);
  pointer-events: none;
}
.hero-index b { color: #fff; font-weight: 600; }

/* ---------- Specs abajo-derecha ---------- */
.hero-specs {
  grid-column: 2; grid-row: 3;
  align-self: end; justify-self: end;
  width: min(340px, 100%);
}
.hero-specs-title {
  font-family: var(--font-head, "Oswald", sans-serif);
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: rgba(255,255,255,.48);
  margin-bottom: 4px;
}
.hero-spec {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero-spec-k {
  font-family: var(--font-head, "Oswald", sans-serif);
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.48);
}
.hero-spec-v {
  font-family: var(--font-head, "Oswald", sans-serif);
  font-size: 12.5px; color: #fff; text-align: right;
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
/* Palabras del h1/h2/h3 que suben con fade (stagger por JS) */
.hero .pull-line { display: block; }
.words-pull-up .pull-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}
.words-pull-up.words-visible .pull-word {
  animation: wordPullUp .55s cubic-bezier(.25,.46,.45,.94) forwards;
}
@keyframes wordPullUp { to { opacity: 1; transform: translateY(0); } }

/* Entradas con fade + blur (delay por data-delay vía JS) */
.fade-up-reveal { opacity: 0; }
.fade-up-reveal.is-visible { animation: heroFadeUp .7s cubic-bezier(.25,.46,.45,.94) both; }
/* Red de seguridad: sin JavaScript, el contenido se ve igual */
.no-js .fade-up-reveal { opacity: 1; animation: none; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(14px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* "Reducir movimiento": NO apagamos la aparición (Windows suele traer
   esta preferencia activada por defecto). Mantenemos una entrada suave:
   solo fundido + un desplazamiento mínimo, sin escalado ni desenfoque. */
@keyframes heroFadeOnly { from { opacity: 0; } to { opacity: 1; } }
@keyframes heroRiseSoft {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-image-animate { animation: heroFadeOnly 1s ease .1s both; }
  .words-pull-up .pull-word { transform: translateY(8px); }
  .words-pull-up.words-visible .pull-word { animation: heroRiseSoft .5s ease both; }
  .fade-up-reveal.is-visible { animation: heroRiseSoft .6s ease both; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-ui { padding: 30px 34px 36px; }
  .hero-index { top: 30px; right: 34px; }
}

@media (max-width: 900px) {
  .hero-ui { padding: 28px 22px; }
  .hero-index { top: 28px; right: 22px; }
  .hero-title { font-size: clamp(1.35rem, 7.2vw, 2.4rem); }
  .hero-copy { padding-right: 24px; }
  .hero-base-img,
  .hero-reveal-img { background-position: 50% 42%; }
}

/* ============================================================
   MÓVIL / TABLET ESTRECHO (<=768px): LAYOUT PARTIDO
   La foto va arriba como banda (con el rostro despejado) y el
   contenido (titular, tarjeta, specs) debajo, sobre negro.
   Así el texto nunca tapa la cara del protagonista.
   ============================================================ */
@media (max-width: 768px) {
  .hero { height: auto; min-height: 100svh; background: #050505; }

  /* La foto ocupa una banda superior */
  .hero-base-img,
  .hero-reveal-img,
  .hero-vignette {
    position: absolute;
    inset: 0 0 auto 0;
    height: 54vh;
  }
  /* Zoom más cercano en móvil: Nilson se ve más grande dentro de la banda */
  .hero-base-img,
  .hero-reveal-img { background-position: 50% 22%; background-size: auto 142%; }
  /* Funde la foto con el fondo negro por abajo */
  .hero-vignette {
    background:
      linear-gradient(180deg, transparent 44%, rgba(5,5,5,.55) 78%, #050505 100%),
      radial-gradient(135% 95% at 50% 32%, transparent 54%, rgba(0,0,0,.42));
  }

  /* El contenido va DEBAJO de la foto, en columna */
  .hero-ui {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    padding: calc(54vh + 14px) calc(20px + env(safe-area-inset-right))
             calc(30px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
  }
  .hero-index { top: calc(var(--header-h, 72px) + 10px); right: 20px; }
  .hero-copy-col { gap: 20px; }
  .hero-card,
  .hero-specs { width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.1rem, 8.5vw, 1.65rem); }
  .hero-icon-btn { width: 34px; height: 34px; }
  .hero-card { grid-template-columns: 72px 1fr; }
  .hero-card-thumb { width: 72px; height: 72px; }
  .hero-card-kicker,
  .hero-card-desc { font-size: 11px; }
  .hero-lead { font-size: 13px; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 1rem; }
  .hero-card { grid-template-columns: 64px 1fr; }
  .hero-card-thumb { width: 64px; height: 64px; }
}
