/* NEO Brand Motion Layer · data-neo-fx="full" (self-contained for NEO_BROWSER_WEB) */
:root {
  --neo-obsidian: #0D0C0B;
  --neo-deep: #070605;
  --neo-surface: #15120F;
  --neo-surface-2: #1E1914;
  --neo-copper: #E0732A;
  --neo-copper-hi: #F08A45;
  --neo-copper-press: #C25818;
  --neo-amber: #FFB070;
  --neo-cyan: #4CC9F0;
  --neo-cyan-dim: rgba(76, 201, 240, 0.16);
  --neo-graphite: #23272E;
  --neo-graphite-light: #E8ECEF;
  --neo-paper: #FAF5EE;
  --neo-paper-2: #F3EBE0;
  --neo-ink: #17120E;
  --neo-ink-2: #4A3F36;
  --neo-snow: #F8F4EF;
  --neo-snow-2: rgba(248, 244, 239, 0.80);
  --neo-snow-3: rgba(248, 244, 239, 0.58);
  --neo-serif: "Instrument Serif", Georgia, serif;
  --neo-sans: "Inter", system-ui, -apple-system, sans-serif;
  --neo-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --neo-ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --nb-grain-opacity: 0.07;
  --nb-scan-opacity: 0.025;
}

html {
  overflow-x: clip;
}

body[data-neo-fx] {
  overflow-x: clip;
  background-color: var(--neo-obsidian);
  color: var(--neo-snow);
  font-family: var(--neo-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Film Grain (7% overlay) & Cinema Vignette ---------- */
body[data-neo-fx="full"]::after {
  content: "";
  position: fixed;
  inset: -4%;
  z-index: 60;
  pointer-events: none;
  opacity: var(--nb-grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: nbGrain 1.2s steps(6) infinite;
}

@keyframes nbGrain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1.5%); }
  40% { transform: translate(1.5%, -2%); }
  60% { transform: translate(-1.5%, -1%); }
  80% { transform: translate(2%, 2%); }
  100% { transform: translate(0, 0); }
}

.nb-vignette {
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.30) 100%);
}

/* ---------- Continuous Section Blends (110–220px, zero harsh cuts) ---------- */
.nb-sec {
  position: relative;
  overflow: clip;
}

.nb-blend {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: clamp(88px, 10vw, 148px);
  pointer-events: none;
  z-index: 1;
}

.nb-sec > .nb-in,
.nb-sec > .nb-shell {
  position: relative;
  z-index: 2;
}

/* ---------- Per-Section Volumetric Beams, Floating Dust & 2.5% Scanlines ---------- */
.nb-fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.nb-fx .nb-beam {
  position: absolute;
  top: -22%;
  width: 44%;
  height: 145%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nb-beam, #E0732A) 22%, transparent), transparent 72%);
  filter: blur(34px);
  transform-origin: 50% 0;
  mix-blend-mode: screen;
  opacity: 0.55;
  animation: nbBeam 15s ease-in-out infinite alternate;
}

.nb-fx .nb-beam.b1 {
  left: 6%;
  transform: rotate(17deg);
}

.nb-fx .nb-beam.b2 {
  left: 50%;
  width: 32%;
  transform: rotate(-14deg);
  animation-duration: 19s;
  opacity: 0.38;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nb-beam-2, #4CC9F0) 18%, transparent), transparent 70%);
}

@keyframes nbBeam {
  0% { opacity: 0.28; translate: -3% 0; }
  100% { opacity: 0.62; translate: 4% 0; }
}

.nb-fx .nb-dust {
  position: absolute;
  inset: -12%;
  opacity: 0.52;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 24%, rgba(255, 225, 195, 0.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 36% 66%, rgba(180, 235, 255, 0.72) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 62% 32%, rgba(255, 210, 175, 0.85) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 78% 78%, rgba(255, 230, 200, 0.72) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 16%, rgba(160, 225, 255, 0.70) 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 90%, rgba(255, 230, 200, 0.65) 50%, transparent 51%);
  background-size: 420px 420px;
  animation: nbDust 38s linear infinite;
}

@keyframes nbDust {
  to { background-position: 120px -420px; }
}

.nb-fx .nb-scan {
  position: absolute;
  inset: 0;
  opacity: var(--nb-scan-opacity);
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.65) 0 1px, transparent 1px 4px);
}

.nb-light-sec .nb-fx .nb-beam {
  mix-blend-mode: multiply;
  opacity: 0.14;
}

.nb-light-sec .nb-fx .nb-dust,
.nb-light-sec .nb-fx .nb-scan {
  display: none;
}

/* ---------- Hero Anamorphic Flare & Deep Vignette ---------- */
.nb-hero {
  isolation: isolate;
}

.nb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(110% 82% at 30% 42%, transparent 52%, rgba(0, 0, 0, 0.44) 100%);
}

.nb-flare {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 56%;
  height: 2px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(224, 115, 42, 0) 14%, rgba(255, 196, 140, 0.92) 46%, rgba(76, 201, 240, 0.55) 56%, rgba(224, 115, 42, 0) 86%, transparent);
  filter: blur(1px);
  box-shadow: 0 0 22px 5px rgba(224, 115, 42, 0.30), 0 0 72px 16px rgba(76, 201, 240, 0.12);
  opacity: 0;
  animation: nbFlare 9s ease-in-out 1s infinite;
}

@keyframes nbFlare {
  0%, 100% { opacity: 0; transform: translateX(-18%) scaleX(0.6); }
  40%, 60% { opacity: 0.85; transform: translateX(0) scaleX(1); }
}

/* ---------- Optical Viewfinder Corners & REC Indicator ---------- */
.nb-vf-host {
  position: relative;
}

.nb-vf {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 5;
  pointer-events: none;
  border: 0 solid color-mix(in srgb, var(--nb-vfc, #E0732A) 85%, transparent);
  opacity: 0;
  transition: opacity 0.55s ease 0.2s;
}

.nb-vf.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.nb-vf.tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.nb-vf.bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.nb-vf.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }

.nb-vf-rec {
  position: absolute;
  top: 13px;
  left: 36px;
  z-index: 5;
  pointer-events: none;
  font: 600 10px/1 var(--neo-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(13, 12, 11, 0.65);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.55s ease 0.35s;
}

.nb-vf-rec::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4b3a;
  box-shadow: 0 0 8px #ff4b3a;
  animation: nbRec 1.4s steps(2) infinite;
}

@keyframes nbRec {
  50% { opacity: 0.18; }
}

.nb-vf-host.nb-seen .nb-vf,
.nb-vf-host.nb-seen .nb-vf-rec {
  opacity: 1;
}

/* ---------- HUD Eyebrow Terminal Cursor ---------- */
.nb-cur {
  display: inline-block;
  width: 0.52em;
  height: 0.95em;
  margin-left: 6px;
  vertical-align: -0.14em;
  background: currentColor;
  opacity: 0.78;
  animation: nbBlink 1.05s steps(2) infinite;
}

@keyframes nbBlink {
  50% { opacity: 0; }
}

/* ---------- Title Light Sweep & Italic Glow ---------- */
main h2 {
  position: relative;
}

main h2.nb-in::after {
  content: "";
  position: absolute;
  inset: -6% -2%;
  pointer-events: none;
  mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.65) 48%, rgba(255, 210, 170, 0.30) 52%, transparent 65%) no-repeat;
  background-size: 260% 100%;
  background-position: 120% 0;
  opacity: 0;
  animation: nbSweep 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.28s 1 forwards;
}

.nb-light-sec h2.nb-in::after {
  display: none;
}

@keyframes nbSweep {
  0% { opacity: 0; background-position: 120% 0; }
  20% { opacity: 0.9; }
  80% { opacity: 0.9; }
  100% { opacity: 0; background-position: -60% 0; }
}

main h2 em.nb-em {
  background: linear-gradient(90deg, currentColor, currentColor) no-repeat 0 92%/0 2px;
  transition: background-size 1s var(--neo-ease) 0.38s, text-shadow 1.1s ease 0.38s;
}

main h2.nb-in em.nb-em {
  background-size: 100% 2px;
  text-shadow: 0 0 26px color-mix(in srgb, currentColor 40%, transparent);
}

/* ---------- Holographic Sheen on Dark Cards ---------- */
.nb-holo {
  position: relative;
  overflow: hidden;
}

.nb-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.13) 45%, rgba(76, 201, 240, 0.08) 52%, transparent 62%);
  background-size: 250% 100%;
  background-position: 135% 0;
  transition: background-position 0.85s var(--neo-ease);
}

.nb-holo:hover::after {
  background-position: -35% 0;
}

/* ---------- Behavioral Scroll Reveals (fast-scroll safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.nb-anim .nb-rv {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    filter: blur(2px);
    transition: opacity 0.42s var(--neo-ease) var(--nb-d, 0s), transform 0.48s var(--neo-ease) var(--nb-d, 0s), filter 0.38s ease var(--nb-d, 0s);
  }
  html.nb-anim .nb-rv.nb-rv--l {
    transform: translate3d(-18px, 0, 0);
  }
  html.nb-anim .nb-rv.nb-rv--s {
    transform: scale(0.97);
  }
  html.nb-anim h2.nb-rv {
    filter: none;
    transform: translate3d(0, 20px, 0);
  }
  html.nb-anim .nb-rv.nb-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
  html.nb-anim .nb-rv.nb-instant {
    transition: none !important;
  }
}

/* ---------- Reduced Motion Complete Disable ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body[data-neo-fx="full"]::after,
  .nb-fx .nb-beam,
  .nb-fx .nb-dust,
  .nb-flare,
  .nb-cur,
  .nb-vf-rec::before,
  main h2.nb-in::after {
    animation: none !important;
  }
  .nb-flare { opacity: 0.35; }
  .nb-vf, .nb-vf-rec { opacity: 1; transition: none; }
  html.nb-anim .nb-rv {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  main h2 em.nb-em {
    background-size: 100% 2px;
    transition: none;
  }
}
