/* =====================================================================
   NEBU Studio · estilos de todo el sitio

   Capas (z-index):
     40  nav fija arriba
     10  panel del menú en celular (dentro de la nav)
     50  búho del centro de la órbita
     10–70 logos de la órbita (se ordenan solos según estén adelante o atrás)
     2   texto del hero, encima del sello
     0   capas del sello del hero

   Tipografías: Archivo Black (títulos) y Hind (texto), en assets/fonts.
   Regla de marca: "NEBU" nunca se escribe en Archivo Black junto al logo.
   ===================================================================== */

@font-face { font-family: "Archivo Black"; src: url("assets/fonts/archivo-black.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hind"; src: url("assets/fonts/hind-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hind"; src: url("assets/fonts/hind-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Hind"; src: url("assets/fonts/hind-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --noche: #0D0B0B;        /* fondo */
  --carbon: #161313;       /* paneles */
  --linea: #2A2424;        /* divisiones */
  --hueso: #F3EEE6;        /* títulos */
  --texto: #D9D3CA;        /* párrafos */
  --humo: #A39B92;         /* etiquetas */
  --sello: #EA0F26;        /* rojo exacto del logo */
  --sello-oscuro: #CF0C22; /* botones */
  --pastel-error: #FFB4BC;
  --margen: 56px;
  --titulos: "Archivo Black", "Arial Black", sans-serif;
  --cuerpo: "Hind", system-ui, sans-serif;
  --sello-img: url("assets/img/buho-sello.webp");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--noche); color: var(--hueso); font-family: var(--cuerpo); overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hueso); outline-offset: 4px; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.solo-lectores * { margin: 0; padding: 0; font-size: 0; line-height: 0; height: 0; list-style: none; }

/* ---------- Piezas comunes ---------- */
.kicker { font-size: 13.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--humo); margin: 0 0 18px; }
.kicker i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sello); margin-right: 12px; vertical-align: 2px; }

.btn { display: inline-block; font-family: var(--titulos); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: #fff; background: var(--sello-oscuro); padding: 18px 28px 17px; border: 0; cursor: pointer; transition: background-color .15s; }
.btn:hover { background: #E3102A; }
.btn--fino { background: transparent; border: 1.5px solid rgba(243, 238, 230, .5); padding: 12px 18px 11px; font-size: 12.5px; }
.btn--fino:hover { background: var(--hueso); color: var(--noche); }

.acciones { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.otra { font-size: 15.5px; color: #CFC8BF; }
.otra a { font-weight: 600; color: #fff; }

/* Logo de cliente pintado en una sola tinta con su silueta */
.logo { display: block; height: var(--h); width: var(--w); background: currentColor; -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }

/* ---------- Nav (igual en todas las páginas) ---------- */
.nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 34px; padding: 22px var(--margen); margin-bottom: -88px; transition: background-color .25s, padding .25s; }
.nav.solida, .nav.abierto { background: rgba(13, 11, 11, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--linea); }
.marca { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 600; font-size: 14px; letter-spacing: .24em; white-space: nowrap; }
.marca img { width: 44px; height: auto; display: block; }
.nav-links { display: flex; gap: 30px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 16.5px; font-weight: 500; color: var(--texto); }
.nav-links a:hover { color: #fff; }
.menu-boton { display: none; margin-left: auto; font: 600 15px var(--cuerpo); color: var(--hueso); background: none; border: 1.5px solid rgba(243, 238, 230, .5); padding: 8px 12px 6px; cursor: pointer; }

/* ---------- Inicio · hero: visión nocturna ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 1100px; overflow: hidden; }
.hero-buho { position: absolute; width: 860px; height: 871px; right: -40px; top: 40px; }
.hero-capa { position: absolute; inset: 0; -webkit-mask: var(--sello-img) center / contain no-repeat; mask: var(--sello-img) center / contain no-repeat; }
.hero-tenue { background: var(--sello); opacity: .11; }
/* La luz: el sello en rojo pleno, visible solo dentro de un círculo que se mueve (app.js, luzDelHero) */
.hero-luz {
  background: var(--sello);
  -webkit-mask: var(--sello-img) center / contain no-repeat, radial-gradient(circle 260px at var(--mx, 55%) var(--my, 45%), #000 0%, rgba(0, 0, 0, .85) 35%, transparent 72%);
  -webkit-mask-composite: source-in;
  mask: var(--sello-img) center / contain no-repeat, radial-gradient(circle 260px at var(--mx, 55%) var(--my, 45%), #000 0%, rgba(0, 0, 0, .85) 35%, transparent 72%);
  mask-composite: intersect;
}
.hero-brillo { position: absolute; inset: 0; background: radial-gradient(circle 360px at var(--mx, 55%) var(--my, 45%), rgba(234, 15, 38, .10), transparent 70%); }
.hero-texto { position: absolute; left: var(--margen); bottom: 96px; width: 780px; max-width: calc(100% - 2 * var(--margen)); z-index: 2; }
.hero-titulo { font-family: var(--titulos); font-weight: 400; font-size: clamp(56px, 5.9vw, 84px); line-height: .98; letter-spacing: -.025em; margin: 0 0 24px; }
.hero-titulo em { font-style: normal; color: var(--sello); }
.hero-p { font-size: 20px; line-height: 1.5; color: var(--texto); max-width: 560px; margin: 0 0 30px; }
.hero-bajar { position: absolute; right: var(--margen); bottom: 40px; z-index: 2; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--humo); }
.hero-bajar::after { content: ""; width: 1.5px; height: 44px; background: linear-gradient(var(--sello), transparent); }
.hero-bajar:hover { color: var(--hueso); }

/* ---------- Inicio · qué hacemos: reel automático ---------- */
.que-hacemos { padding: 130px var(--margen) 110px; scroll-margin-top: 0; }
.seccion-cabeza { max-width: 980px; margin-bottom: 40px; }
.seccion-titulo { font-family: var(--titulos); font-weight: 400; font-size: clamp(36px, 4.2vw, 60px); line-height: 1; letter-spacing: -.025em; margin: 0 0 22px; }
.seccion-intro { font-size: 20px; line-height: 1.5; color: var(--texto); max-width: 700px; margin: 0; }

.reel { border-top: 1px solid var(--linea); padding-top: 40px; overflow-x: clip; }
.reel-escena { display: flex; align-items: center; gap: 30px; height: 190px; }
.reel-mascara { overflow: hidden; padding-bottom: 10px; min-width: 0; }
.reel-palabra { display: block; margin: 0; font-family: var(--titulos); font-weight: 400; font-size: clamp(48px, 9.4vw, 140px); line-height: .95; letter-spacing: -.035em; white-space: nowrap; }
.reel-palabra.final { color: var(--sello); }
.reel-lugar-sello { flex: 1; display: grid; place-items: center; min-width: 0; }
.reel-sello { width: 150px; height: auto; rotate: var(--rot, -8deg); }
.reel-palabra.entra { animation: palabra-entra .6s cubic-bezier(.2, .8, .2, 1) both; }
.reel-palabra.entra-b { animation: palabra-entra-b .6s cubic-bezier(.2, .8, .2, 1) both; }
.reel-palabra.sale { animation: palabra-sale .32s ease-in both; }
.reel-sello.sellando { animation: sellar .42s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes palabra-entra { from { opacity: 0; } to { opacity: 1; } }
@keyframes palabra-entra-b { from { opacity: 0; } to { opacity: 1; } }
@keyframes palabra-sale { to { opacity: 0; } }
@keyframes sellar { 0% { opacity: 0; scale: 2; } 60% { opacity: 1; scale: .9; } 100% { opacity: 1; scale: 1; } }

.reel-detalle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; align-content: start; min-height: 170px; margin-top: 26px; transition: opacity .3s; }
.reel-detalle.final { min-height: 262px; }
.reel-detalle.oculto { opacity: 0; }
.reel-lead { font-size: 26px; line-height: 1.35; font-weight: 500; color: var(--hueso); margin: 0; max-width: 560px; }
.reel-detalle .reel-lead:has(+ .pasos) { grid-column: 1 / -1; max-width: 760px; }
.reel-lista { list-style: none; margin: 0; padding: 0; }
.reel-lista li { position: relative; padding: 11px 0 9px 26px; border-top: 1px solid var(--linea); font-size: 17.5px; line-height: 1.45; color: var(--texto); }
.reel-lista li::before { content: ""; position: absolute; left: 2px; top: 19px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--sello); }
.pasos { grid-column: 1 / -1; list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--hueso); }
.pasos li { padding: 18px 26px 0 0; }
.pasos b { display: block; font-family: var(--titulos); font-weight: 400; font-size: 24px; margin-bottom: 8px; }
.pasos b em { font-style: normal; color: var(--sello); font-size: 14px; margin-right: 10px; vertical-align: 4px; }
.pasos span { font-size: 16.5px; line-height: 1.45; color: var(--texto); }

/* Rayitas: cada una se llena mientras dura su cuadro */
.reel-rayas { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 0; margin: 34px 0 0; }
.reel-rayas button { position: relative; width: 100%; font: 600 13px var(--cuerpo); letter-spacing: .12em; text-transform: uppercase; text-align: left; color: var(--humo); background: none; border: 0; padding: 14px 0 6px; cursor: pointer; }
.reel-rayas button::before, .reel-rayas button::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; }
.reel-rayas button::before { right: 0; background: #3A3434; }
.reel-rayas button::after { width: 0; background: var(--sello); }
.reel-rayas button.on { color: var(--hueso); }
.reel-rayas button.on::after { animation: avance var(--dur, 8s) linear forwards; }
.reel-rayas button.on.alt::after { animation-name: avance-b; }
.reel-rayas button.hecho::after { width: 100%; }
.reel.pausado .reel-rayas button.on::after { animation-play-state: paused; }
@keyframes avance { to { width: 100%; } }
@keyframes avance-b { to { width: 100%; } }

/* ---------- Inicio · clientes: la órbita ---------- */
.clientes { position: relative; isolation: isolate; padding: 120px 0 110px; background: radial-gradient(ellipse 60% 45% at 50% 42%, #241010 0%, var(--noche) 70%); border-top: 1px solid var(--linea); overflow: hidden; }
.clientes .seccion-cabeza { margin: 0 auto; text-align: center; padding: 0 40px; }
.orbita { position: relative; height: 470px; margin-top: 30px; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.orbita:active { cursor: grabbing; }
.orbita-aro { position: absolute; left: 50%; top: 50%; width: var(--aro, 1080px); height: 300px; translate: -50% -50%; border: 1px solid rgba(243, 238, 230, .13); border-radius: 50%; }
.orbita-buho { position: absolute; left: 50%; top: 50%; width: 240px; height: auto; translate: -50% -55%; z-index: 50; filter: drop-shadow(0 0 40px rgba(234, 15, 38, .35)); pointer-events: none; }
.orbita-logo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 150px; height: 110px; margin: -55px 0 0 -75px; color: var(--hueso); text-decoration: none; transition: color .15s; }
.orbita-logo:hover, .orbita-logo:focus-visible { color: var(--sello); }
.orbita-logo small { position: absolute; top: 100%; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--humo); opacity: 0; transition: opacity .2s; white-space: nowrap; }
.orbita-logo:hover small, .orbita-logo:focus-visible small { opacity: 1; }

.cierre { margin: 80px auto 0; max-width: 1328px; padding: 56px var(--margen) 0; border-top: 1px solid var(--linea); display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; scroll-margin-top: 80px; }
.cierre h2 { font-family: var(--titulos); font-weight: 400; font-size: 52px; line-height: 1; letter-spacing: -.02em; margin: 0 0 14px; }
.cierre p { margin: 0; font-size: 19px; line-height: 1.5; color: var(--texto); max-width: 560px; }
.cierre-acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex: none; }
.cierre-contacto { font-size: 16px; color: var(--texto); text-align: right; line-height: 1.6; }
.cierre-contacto a { color: var(--hueso); font-weight: 600; }

/* ---------- Páginas interiores (aviso de privacidad, 404) ---------- */
.interior { padding: 160px var(--margen) 100px; max-width: 900px; }
.interior h1 { font-family: var(--titulos); font-weight: 400; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.025em; margin: 0 0 24px; }
.interior h2 { font-family: var(--titulos); font-weight: 400; font-size: 24px; margin: 44px 0 12px; }
.interior p, .interior li { font-size: 18px; line-height: 1.6; color: var(--texto); }
.pendiente { color: var(--pastel-error); font-style: italic; }
.error { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 140px 24px 80px; overflow: hidden; }
.error-sello { position: absolute; width: 760px; left: 50%; top: 50%; translate: -50% -50%; opacity: .08; pointer-events: none; }
.error .error-numero { position: relative; font-family: var(--titulos); font-size: clamp(110px, 18vw, 220px); line-height: .9; letter-spacing: -.04em; color: var(--sello); margin: 0; }
.error h1 { position: relative; font-family: var(--titulos); font-weight: 400; font-size: clamp(28px, 3.4vw, 44px); margin: 18px 0 14px; }
.error p { position: relative; font-size: 19px; color: var(--texto); margin: 0 0 30px; }

/* ---------- Pie (igual en todas las páginas) ---------- */
.pie { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px var(--margen); border-top: 1px solid var(--linea); font-size: 15px; color: var(--humo); }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--hueso); }
.pie nav { display: flex; gap: 24px; }

/* ---------- Tableta ---------- */
@media (max-width: 1100px) {
  :root { --margen: 40px; }
  .hero-buho { width: 700px; height: 709px; right: -120px; }
  .reel-sello { width: 120px; }
  .cierre { flex-direction: column; align-items: stretch; }
  .cierre-acciones { align-items: flex-start; }
  .cierre-contacto { text-align: left; }
}

/* ---------- Menú compacto (tableta vertical y celular) ---------- */
@media (max-width: 900px) {
  .nav-links, .nav .btn--fino { display: none; }
  .menu-boton { display: block; }
  .nav.abierto .nav-links { display: flex; flex-direction: column; gap: 18px; position: absolute; z-index: 10; top: 100%; left: 12px; right: 12px; background: var(--carbon); border: 1px solid var(--linea); padding: 22px; }
  .nav.abierto .nav-links a { font-size: 18px; }
  .reel-rayas button span { display: none; }
}

/* ---------- Celular ---------- */
@media (max-width: 600px) {
  :root { --margen: 20px; }
  .nav { padding: 14px 18px; gap: 12px; margin-bottom: -68px; }
  .nav.solida, .nav.abierto { padding-top: 10px; padding-bottom: 10px; }
  .marca { font-size: 12px; letter-spacing: .16em; gap: 10px; }
  .marca img { width: 36px; }
  .acciones { flex-direction: column; align-items: stretch; gap: 14px; text-align: center; }
  .acciones .btn { text-align: center; }
  .kicker { font-size: 12px; letter-spacing: .16em; margin-bottom: 12px; }

  .hero { min-height: 600px; }
  .hero-buho { width: 470px; height: 476px; right: -150px; top: 70px; }
  /* El resplandor rectangular se cortaba en el borde del sello al llegar a una esquina: en celular solo queda la luz con la silueta */
  .hero-brillo { display: none; }
  .hero-luz {
    -webkit-mask: var(--sello-img) center / contain no-repeat, radial-gradient(circle 170px at var(--mx, 55%) var(--my, 45%), #000 0%, rgba(0, 0, 0, .85) 35%, transparent 72%);
    -webkit-mask-composite: source-in;
    mask: var(--sello-img) center / contain no-repeat, radial-gradient(circle 170px at var(--mx, 55%) var(--my, 45%), #000 0%, rgba(0, 0, 0, .85) 35%, transparent 72%);
    mask-composite: intersect;
  }
  .hero-texto { left: 20px; right: 20px; bottom: 74px; width: auto; max-width: none; }
  .hero-titulo { font-size: 44px; margin-bottom: 16px; }
  .hero-p { display: none; }
  .hero-bajar { left: 0; right: 0; bottom: 22px; justify-content: center; font-size: 12px; }
  .hero-bajar::after { display: none; }

  .que-hacemos { padding: 80px 20px 70px; }
  .seccion-cabeza { margin-bottom: 30px; }
  .seccion-intro { font-size: 17px; }
  .reel { padding-top: 26px; }
  .reel-escena { flex-direction: column; height: auto; gap: 12px; align-items: flex-start; }
  .reel-mascara { width: 100%; }
  .reel-palabra { font-size: 48px; white-space: normal; }
  .reel-lugar-sello { order: -1; flex: none; display: block; align-self: flex-start; }
  .reel-sello { width: 96px; }
  .reel-detalle { grid-template-columns: minmax(0, 1fr); row-gap: 16px; min-height: 290px; margin-top: 18px; }
  .reel-detalle.final { min-height: 400px; }
  .reel-lead { font-size: 20px; }
  .reel-lista li { font-size: 16px; }
  .pasos { grid-template-columns: 1fr 1fr; margin-top: 4px; }
  .pasos li { padding: 14px 12px 8px 0; }
  .pasos b { font-size: 19px; }
  .pasos span { font-size: 14.5px; }
  .reel-rayas { gap: 6px; margin-top: 22px; }
  .reel-rayas button { font-size: 12px; letter-spacing: .04em; }
  .reel-rayas button span { display: none; }

  .clientes { padding: 76px 0 60px; }
  .clientes .seccion-cabeza { padding: 0 20px; }
  .orbita { height: 360px; margin-top: 10px; }
  .orbita-aro { height: 200px; }
  .orbita-buho { width: 128px; }
  .orbita-logo { width: 96px; height: 70px; margin: -35px 0 0 -48px; }
  .cierre { margin-top: 44px; padding: 40px 20px 0; gap: 26px; }
  .cierre h2 { font-size: 34px; }
  .cierre p { font-size: 17px; }
  .cierre-acciones { align-items: stretch; }
  .cierre-acciones .btn { text-align: center; }
  .cierre-contacto { text-align: center; }

  .interior { padding: 120px 20px 70px; }
  .interior p, .interior li { font-size: 16.5px; }
  .error-sello { width: 460px; }

  .pie { flex-direction: column; align-items: flex-start; padding: 26px 20px; font-size: 14px; }
  .pie nav { flex-wrap: wrap; gap: 10px 20px; }
}

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .reel-palabra.entra, .reel-palabra.entra-b, .reel-palabra.sale, .reel-sello.sellando { animation: none; }
  .reel-rayas button.on::after { animation: none; width: 100%; }
  .reel-detalle { transition: none; }
}
