/* ====================================================================
   CENFIC · CAPA VISUAL PREMIUM
   --------------------------------------------------------------------
   Complementa base.css. Aquí vive la "atmósfera" del portal:
   fondo institucional, red de nodos, resplandores y refinamientos.
   No define estructura: solo apariencia.
==================================================================== */

:root {
  --premium-glow-blue: rgba(38, 86, 176, 0.30);
  --premium-glow-gold: rgba(196, 164, 124, 0.13);
  --premium-vignette: rgba(2, 6, 14, 0.72);
}


/* ====================================================================
   01. FONDO INSTITUCIONAL
   Tres capas: degradado base + resplandores + red de nodos.
==================================================================== */

body {
  position: relative;
  background:
    radial-gradient(1100px 900px at 92% 52%, rgba(26, 62, 118, 0.15), transparent 66%),
    linear-gradient(105deg, #06111F 0%, #081627 55%, #091A2D 100%);
  background-attachment: fixed;
}

/* Red de nodos (constelación) sobre el degradado */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../../../shared/img/fondo-red.svg") center / cover no-repeat;
  opacity: 1;
  /* En el diseño la red casi no se ve tras el texto y gana presencia
     hacia el panel de la derecha. */
  -webkit-mask-image: linear-gradient(90deg,
      transparent 0%, transparent 30%, rgba(0, 0, 0, 0.35) 58%, #000 100%);
  mask-image: linear-gradient(90deg,
      transparent 0%, transparent 30%, rgba(0, 0, 0, 0.35) 58%, #000 100%);
  pointer-events: none;
}

/* Oscurecido muy suave hacia la esquina inferior izquierda, tal como
   en el diseño: el fondo se mantiene luminoso por la derecha. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(140% 110% at 82% 55%, transparent 62%, rgba(3, 8, 18, 0.34) 100%);
  pointer-events: none;
}

/* Todo el contenido va por encima de las capas de fondo */
main,
.footer {
  position: relative;
  z-index: 1;
}

/* La cabecera va por encima del contenido: conserva el sticky y el
   z-index alto de base.css. Si aquí se le pusiera z-index: 1 igual que
   a `main`, el panel del menú móvil quedaría atrapado en la capa de la
   cabecera y el texto de la página se vería a través de él. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}


/* ====================================================================
   02. HEADER AL HACER SCROLL
==================================================================== */

.site-header.is-stuck {
  background: rgba(6, 16, 32, 0.86);
  border-bottom-color: var(--glass-line);
}

/* El desenfoque va en un pseudo-elemento, NO en la cabecera.
   `backdrop-filter` aplicado al propio <header> lo convierte en el
   bloque contenedor de sus hijos `position: fixed`, y entonces el panel
   del menú móvil deja de anclarse a la pantalla y se va con el scroll. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: opacity 0.28s ease;
}

.site-header.is-stuck::before {
  opacity: 1;
}


/* ====================================================================
   03. RESPLANDORES DEL HERO
==================================================================== */

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.hero__glow--blue {
  top: -70px;
  right: 6%;
  width: 460px;
  height: 460px;
  background: rgba(43, 75, 209, 0.22);
}

.hero__glow--gold {
  bottom: -60px;
  left: -40px;
  width: 340px;
  height: 340px;
  background: rgba(196, 164, 124, 0.10);
}

.hero > .container {
  position: relative;
  z-index: 1;
}


/* ====================================================================
   04. REFINAMIENTO DEL PANEL SIMULADOR
==================================================================== */

.app-window {
  position: relative;
}

/* Brillo superior tipo cristal */
.app-window::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 42%);
  pointer-events: none;
}

/* Halo del panel */
.app-mock::after {
  content: "";
  position: absolute;
  inset: 12% -8% -10% -6%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(43, 75, 209, 0.20), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}



/* ====================================================================
   05. TARJETAS DE NIVEL
==================================================================== */

.level-card {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.level-card::after {
  content: "";
  position: absolute;
  inset-inline: 18px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}


/* ====================================================================
   06. TIPOGRAFÍA DE APOYO
==================================================================== */

::selection {
  background: rgba(196, 164, 124, 0.35);
  color: #FFFFFF;
}


/* ====================================================================
   07. BARRA DE DESPLAZAMIENTO
==================================================================== */

@supports (scrollbar-color: red blue) {
  html {
    scrollbar-color: rgba(196, 164, 124, 0.45) transparent;
    scrollbar-width: thin;
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(196, 164, 124, 0.42);
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 164, 124, 0.65);
  background-clip: content-box;
}


/* ====================================================================
   08. AJUSTES RESPONSIVE DE LA CAPA PREMIUM
==================================================================== */

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  body::before {
    opacity: 0.42;
  }

  .hero__glow--blue {
    width: 300px;
    height: 300px;
  }

  /* El halo del panel no debe sobresalir del ancho de pantalla */
  .app-mock::after {
    inset: 12% 0 -10% 0;
  }
}
