/* atmosphere.css — cinematic background layer copied byte-for-byte from
   nerdz-landing/src/app/globals.css lines 1020-1123 (the .aurora /
   .gridfloor / .spotlight / .noise rules + light-mode toning).
   Atmosphere divs live inside <main.page-stage>, which is position:relative
   so the absolute children constrain to the main column. */

main.page-stage { position: relative; }
main.page-stage > .page-fade { position: relative; z-index: 1; }

/* AURORA — three blurred violet/magenta bands across the top 520px */
.aurora {
  position: absolute;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
}
.aurora__band {
  position: absolute;
  top: -180px; left: -10%;
  width: 130%; height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  mix-blend-mode: screen;
}
.aurora__band--a {
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(168, 85, 247, 0.55), transparent 70%),
    radial-gradient(ellipse 50% 90% at 70% 60%, rgba(139, 0, 139, 0.45), transparent 70%);
  transform: translate3d(0,0,0) rotate(-3deg);
}
.aurora__band--b {
  background:
    radial-gradient(ellipse 50% 70% at 50% 40%, rgba(106, 13, 173, 0.6), transparent 70%),
    radial-gradient(ellipse 40% 80% at 80% 50%, rgba(168, 85, 247, 0.35), transparent 70%);
  transform: translate3d(0, 40px, 0) rotate(2deg);
  opacity: 0.6;
}
.aurora__band--c {
  background: radial-gradient(ellipse 30% 60% at 50% 50%, rgba(192, 132, 252, 0.5), transparent 70%);
  filter: blur(60px);
  top: -120px;
  height: 360px;
  transform: rotate(-1deg);
  opacity: 0.49;
}

/* GRID FLOOR — purple perspective grid with under-glow at bottom of main */
.gridfloor {
  position: absolute;
  inset: auto 0 0 0;
  height: 720px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 100%, #000 0%, #000 40%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 100% at 50% 100%, #000 0%, #000 40%, transparent 75%);
  opacity: 0.55;
}
.gridfloor__lines {
  position: absolute;
  inset: auto 0 -10% 0;
  height: 100%;
  background-image:
    linear-gradient(to right, rgba(168, 85, 247, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(168, 85, 247, 0.55) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(700px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 40%, #000 90%, transparent 100%);
}
.gridfloor__glow {
  position: absolute;
  inset: auto 0 -5% 0;
  height: 60%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(106, 13, 173, 0.7), transparent 70%);
  filter: blur(30px);
}

/* SPOTLIGHT — soft overhead wash, top-centre */
.spotlight {
  position: absolute;
  top: -80px; left: 50%;
  width: 1200px; height: 1000px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(243, 237, 224, 0.06), transparent 70%);
}

/* NOISE — film grain so flat dark areas read like film not screen */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  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='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Light-mode: tone atmosphere down — the dark mode values bloom on cream */
[data-theme="light"] .aurora { opacity: 0.4; }
[data-theme="light"] .gridfloor { opacity: 0.30; }
[data-theme="light"] .noise { opacity: 0.06; mix-blend-mode: multiply; }

/* Lift the content wrappers above the absolute atmosphere layers (positioned
   z-index:0 paints over static-flow children by default; we want the inverse). */
main.page-stage > .frame,
main.page-stage > .article { position: relative; z-index: 1; }
