/* ============================================================
   YUSTA LABS · PREMIUM ATMOSPHERE v1 · 2026-05-27
   Capa de ambientación cósmica para subpages (sistemas · casos ·
   paginas-web · agentes-ia · valores).

   Más sutil que la home v8 (que tiene 5 capas estrellas + nebulosa
   rotativa + god-rays). Acá usamos 2 capas + nebulosa fija + luz
   cobre estática · suficiente para que se sienta el mismo mundo
   sin competir con los mockups premium que ya tienen.
   ============================================================ */

/* -----------------------------------------------------------------
   01 · ATMOSPHERE GLOBAL · fixed · vive en toda la subpage
   ----------------------------------------------------------------- */
.atm-stage{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Body anchor · subpages que importan este CSS necesitan position relative
   en main wrapper para que el contenido esté sobre el stage */
body:has(.atm-stage){
  position: relative;
}

/* ---- Nebulosa fija de fondo · muy diffusa (blur 80px) ---- */
.atm-nebula{
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 45% 30% at 20% 18%, rgba(154,108,184,.42), transparent 65%),
    radial-gradient(ellipse 40% 28% at 80% 65%, rgba(159, 228, 238,.30), transparent 70%),
    radial-gradient(ellipse 35% 25% at 15% 80%, rgba(89,120,255,.18), transparent 70%);
  filter: blur(80px);
  opacity: .28;
  mix-blend-mode: screen;
}

/* ---- Estrellas · 2 capas drift muy discreto ---- */
.atm-stars{
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}
.atm-stars span{
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 1px;
  border-radius: 50%;
  background: #fff;
}
.atm-stars.drift-a{ animation: atmDriftA 35s ease-in-out infinite alternate }
.atm-stars.drift-b{ animation: atmDriftB 28s ease-in-out infinite alternate }
@keyframes atmDriftA{ 0%{ transform: translate3d(0,0,0) } 100%{ transform: translate3d(-12px, 8px, 0) } }
@keyframes atmDriftB{ 0%{ transform: translate3d(0,0,0) } 100%{ transform: translate3d(18px, -10px, 0) } }

/* Cada estrella tiene su twinkle inline (delay/duration random vía JS) */
@keyframes atmTwinkle{
  0%,100%{ opacity: var(--op-min, .4); transform: scale(1) }
  50%    { opacity: var(--op-max, .9);  transform: scale(1.15) }
}

/* ---- Estrellas brillantes con cross-flare (3-5 unidades fijas) ---- */
.atm-bright{
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255,255,255,.85), 0 0 9px rgba(255,255,255,.35);
}
.atm-bright::before, .atm-bright::after{
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,.5), transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.atm-bright::before{ width: 28px; height: 1px }
.atm-bright::after { width: 1px; height: 28px }
.atm-bright.warm{
  background: #fff3e6;
  box-shadow: 0 0 4px rgba(255,225,200,.85), 0 0 10px rgba(201,147,120,.45);
}
.atm-bright.warm::before, .atm-bright.warm::after{
  background: linear-gradient(to right, transparent, rgba(255,220,190,.55), transparent);
}
.atm-bright.tw{ animation: atmBrightTwinkle 5.5s ease-in-out infinite }
@keyframes atmBrightTwinkle{
  0%,100%{ transform: scale(.85); opacity: .65 }
  50%    { transform: scale(1.18); opacity: 1 }
}

/* ---- Luz cobre fija (no cursor que sigue · NO sigue al mouse) ---- */
.atm-light{
  position: absolute;
  inset: 0;
  background:
    /* Luz key arriba-derecha · spread amplio */
    radial-gradient(ellipse 90% 50% at 78% -12%, rgba(232,234,237,.12) 0%, rgba(199,205,212,.04) 35%, transparent 65%),
    /* Bounce light copper · abajo-izquierda */
    radial-gradient(ellipse 80% 45% at 18% 110%, rgba(159, 228, 238,.08) 0%, rgba(159, 228, 238,.02) 40%, transparent 65%);
  filter: blur(20px);
  mix-blend-mode: screen;
  animation: atmBreath 22s ease-in-out infinite alternate;
}
@keyframes atmBreath{
  0%   { opacity: .8 }
  100% { opacity: 1 }
}

/* ---- Grain sutil (capa fija) ---- */
.atm-grain{
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: .025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

/* ---- Horizon line cobre sutil al fondo del hero ---- */
.atm-horizon{
  position: absolute;
  left: 0; right: 0;
  bottom: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(159, 228, 238,.32) 35%, rgba(201,147,120,.45) 50%, rgba(159, 228, 238,.32) 65%, transparent);
  filter: blur(.6px);
  box-shadow: 0 -1px 20px rgba(159, 228, 238,.18), 0 4px 60px rgba(159, 228, 238,.12);
  opacity: .6;
}

/* -----------------------------------------------------------------
   02 · Botón WhatsApp en subpages: ocultar duplicados si existen
   Mantenemos solo el .wp-fab original (flotante) y el nav-cta verde.
   Cualquier hero-CTA naranja "Hablemos por WhatsApp" pisamos a estilo
   coherente con la paleta (cobre · no naranja crudo)
   ----------------------------------------------------------------- */
[class*="hero"] .btn[class*="primary"][href*="wa.me"],
.hero-cta-row .btn-primary[href*="wa.me"]{
  background: linear-gradient(180deg, var(--yl-copper-light, #C9F2F7) 0%, var(--yl-copper-rim, #9FE4EE) 100%);
  color: var(--yl-ink-deep, #050B17);
  border: 1px solid rgba(159, 228, 238,.55);
  box-shadow:
    0 0 0 1px rgba(255,220,190,.25) inset,
    0 14px 34px -10px rgba(159, 228, 238,.45);
}
[class*="hero"] .btn[class*="primary"][href*="wa.me"]:hover,
.hero-cta-row .btn-primary[href*="wa.me"]:hover{
  background: linear-gradient(180deg, #d9a085 0%, #9FE4EE 100%);
  transform: translateY(-2px);
}

/* -----------------------------------------------------------------
   03 · Mockups · upgrade de presentación (sutil)
   Aplica a cualquier .demo-wrap · .mockup · .web-cinema-frame · .sld-tabs
   ----------------------------------------------------------------- */
.atm-mock-frame{
  position: relative;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(199,205,212,.05), rgba(199,205,212,.015));
  border: 1px solid rgba(159, 228, 238,.18);
  overflow: hidden;
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  box-shadow:
    0 24px 60px -24px rgba(0,0,0,.65),
    0 1px 0 rgba(199,205,212,.04) inset;
  transition: transform .5s cubic-bezier(0.4, 0, 0.2, 1),
              border-color .5s, box-shadow .5s;
}
.atm-mock-frame:hover{
  transform: translateY(-3px);
  border-color: rgba(159, 228, 238,.42);
  box-shadow:
    0 36px 80px -28px rgba(0,0,0,.75),
    0 0 30px rgba(159, 228, 238,.10),
    0 1px 0 rgba(199,205,212,.06) inset;
}

/* -----------------------------------------------------------------
   04 · Respeto prefers-reduced-motion
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .atm-stars, .atm-bright, .atm-light, .atm-nebula{
    animation: none !important;
  }
}

/* -----------------------------------------------------------------
   05 · Mobile · reducir intensidad (no abrumar)
   ----------------------------------------------------------------- */
@media (max-width: 760px){
  .atm-nebula{ opacity: .18 }
  .atm-grain{ opacity: .018 }
  .atm-bright::before{ width: 18px }
  .atm-bright::after{ height: 18px }
}
