/**
 * DHN 2026 — Premium animated hero atmosphere
 * GPU-friendly: transform / opacity / filter only
 * Palette: navy · indigo · cyan · electric blue · teal · violet
 */

.homeHero--atmosphere {
  --ha-navy: #071426;
  --ha-midnight: #0b1f3a;
  --ha-indigo: #283593;
  --ha-cyan: #00d4ff;
  --ha-blue: #3b82f6;
  --ha-teal: #14b8a6;
  --ha-violet: #7c3aed;
  position: relative;
  isolation: isolate;
  background: var(--ha-navy) !important;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Kill legacy video-era overlay from main.min.css */
.homeHero--atmosphere::before,
.homeHero.homeHero--atmosphere::before {
  content: none !important;
  display: none !important;
  background: none !important;
}

.homeHero--atmosphere .heroLoop,
.homeHero--atmosphere .herobgImg {
  display: none !important;
}

/* Root atmosphere stack */
.heroAtmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 100%, rgba(11, 31, 58, 0.9) 0%, transparent 55%),
    linear-gradient(165deg, var(--ha-navy) 0%, var(--ha-midnight) 45%, #0a1830 100%);
  transform: translate3d(0, 0, 0);
}

.ha-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Layer 1: Mesh gradient ─── */
.ha-mesh {
  filter: blur(48px);
  opacity: 0.95;
}

.ha-mesh__blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.ha-mesh__blob--a {
  width: 55vmax;
  height: 55vmax;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgb(32 114 249 / 55%) 0%, transparent 70%);
  animation: ha-drift-a 28s ease-in-out infinite;
}

.ha-mesh__blob--b {
  width: 50vmax;
  height: 50vmax;
  top: 20%;
  right: -15%;
  background: radial-gradient(circle, rgb(32 114 249 / 28%) 0%, transparent 68%);
  animation: ha-drift-b 32s ease-in-out infinite;
}

.ha-mesh__blob--c {
  width: 45vmax;
  height: 45vmax;
  bottom: -20%;
  left: 25%;
  background: radial-gradient(circle, rgb(32 114 249 / 32%) 0%, transparent 70%);
  animation: ha-drift-c 36s ease-in-out infinite;
}

.ha-mesh__blob--d {
  width: 35vmax;
  height: 35vmax;
  top: 35%;
  left: 40%;
  background: radial-gradient(circle, rgb(32 114 249 / 22%) 0%, transparent 70%);
  animation: ha-drift-d 24s ease-in-out infinite;
}

@keyframes ha-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(8%, 6%, 0) scale(1.08); }
  66% { transform: translate3d(-4%, 10%, 0) scale(0.96); }
}
@keyframes ha-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40% { transform: translate3d(-10%, 8%, 0) scale(1.1); }
  70% { transform: translate3d(-4%, -6%, 0) scale(0.94); }
}
@keyframes ha-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(12%, -8%, 0) scale(1); }
}
@keyframes ha-drift-d {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-8%, -5%, 0) scale(1.12); }
}

/* ─── Layer 2: Soft radial glows ─── */
.ha-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.22;
}

.ha-glow--cyan {
  width: 42vmin;
  height: 42vmin;
  top: 12%;
  left: 18%;
  background: var(--ha-cyan);
  animation: ha-float-glow 26s ease-in-out infinite;
}

.ha-glow--violet {
  width: 48vmin;
  height: 48vmin;
  bottom: 8%;
  right: 12%;
  background: var(--ha-violet);
  animation: ha-float-glow 30s ease-in-out infinite reverse;
  opacity: 0.18;
}

.ha-glow--blue {
  width: 36vmin;
  height: 36vmin;
  top: 48%;
  left: 55%;
  background: var(--ha-blue);
  animation: ha-float-glow 22s ease-in-out infinite 2s;
  opacity: 0.2;
}

.ha-glow--teal {
  width: 30vmin;
  height: 30vmin;
  top: 20%;
  right: 28%;
  background: var(--ha-teal);
  animation: ha-float-glow 34s ease-in-out infinite 1s;
  opacity: 0.16;
}

@keyframes ha-float-glow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4%, -6%, 0) scale(1.15); }
}

/* ─── Layer 3: Network ─── */
.ha-network {
  width: 100%;
  height: 100%;
  opacity: 0.55;
  animation: ha-network-drift 40s ease-in-out infinite;
}

.ha-network__lines path,
.ha-network__lines line {
  stroke-dasharray: 8 12;
  animation: ha-dash 28s linear infinite;
}

@keyframes ha-network-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-1.5%, 1%, 0) scale(1.02); }
}
@keyframes ha-dash {
  to { stroke-dashoffset: -200; }
}

/* ─── Layer 4: Particles ─── */
.ha-particles {
  overflow: hidden;
}

.ha-particle {
  position: absolute;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.55);
  opacity: var(--o, 0.45);
  animation: ha-particle-drift var(--d, 22s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  left: var(--x, 50%);
  top: var(--y, 50%);
}

.ha-particle--link {
  background: var(--ha-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.7);
}

.ha-link-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.35), transparent);
  opacity: 0.35;
  pointer-events: none;
}

@keyframes ha-particle-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(var(--dx1, 12px), var(--dy1, -18px), 0); }
  50% { transform: translate3d(var(--dx2, -10px), var(--dy2, 14px), 0); }
  75% { transform: translate3d(var(--dx3, 8px), var(--dy3, 8px), 0); }
}

/* ─── Layer 5: Data visualization ─── */
.ha-dataviz {
  opacity: 0.07;
}

.ha-ecg {
  position: absolute;
  left: 8%;
  bottom: 22%;
  width: min(42vw, 480px);
  height: 56px;
  overflow: visible;
}

.ha-ecg__path {
  fill: none;
  stroke: var(--ha-cyan);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: ha-ecg-draw 8s ease-in-out infinite;
}

@keyframes ha-ecg-draw {
  0% { stroke-dashoffset: 420; opacity: 0.3; }
  40% { stroke-dashoffset: 0; opacity: 1; }
  70% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -420; opacity: 0.2; }
}

.ha-radar {
  position: absolute;
  top: 14%;
  right: 10%;
  width: min(22vw, 220px);
  height: min(22vw, 220px);
  stroke: var(--ha-blue);
  fill: none;
  stroke-width: 0.8;
  animation: ha-spin-slow 36s linear infinite;
}

.ha-radar__sweep {
  fill: rgba(0, 212, 255, 0.12);
  stroke: none;
  transform-origin: 100px 100px;
  animation: ha-spin-slow 12s linear infinite;
}

.ha-bars {
  position: absolute;
  left: 12%;
  top: 28%;
  width: 110px;
  height: 70px;
  fill: var(--ha-teal);
}

.ha-bar {
  transform-origin: bottom;
  animation: ha-bar-pulse 3.6s ease-in-out infinite;
}
.ha-bar:nth-child(2) { animation-delay: 0.3s; }
.ha-bar:nth-child(3) { animation-delay: 0.6s; }
.ha-bar:nth-child(4) { animation-delay: 0.15s; }
.ha-bar:nth-child(5) { animation-delay: 0.45s; }
.ha-bar:nth-child(6) { animation-delay: 0.75s; }

@keyframes ha-bar-pulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.ha-grid {
  position: absolute;
  inset: 10% 5%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  animation: ha-grid-shift 40s linear infinite;
}

@keyframes ha-grid-shift {
  to { background-position: 48px 48px; }
}

.ha-wave {
  position: absolute;
  right: 5%;
  bottom: 18%;
  width: min(36vw, 420px);
  height: 70px;
  fill: none;
  stroke: var(--ha-violet);
  stroke-width: 1.2;
  opacity: 0.9;
  animation: ha-wave-move 18s ease-in-out infinite;
}

.ha-wave path:last-child {
  stroke: var(--ha-cyan);
  opacity: 0.6;
}

@keyframes ha-wave-move {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-3%, 4%, 0); }
}

/* ─── Layer 6: Architecture ─── */
.ha-arch {
  width: 100%;
  height: 100%;
  opacity: 0.85;
  animation: ha-arch-breathe 30s ease-in-out infinite;
}

@keyframes ha-arch-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate3d(0, -1%, 0) scale(1.015); opacity: 1; }
}

/* ─── Layer 7: Neural ─── */
.ha-neural {
  width: 115%;
  height: 115%;
  left: -7.5%;
  top: -7.5%;
  opacity: 0.45;
  animation: ha-neural-drift 38s ease-in-out infinite;
}

.ha-neural__nodes circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: ha-node-pulse 6s ease-in-out infinite;
}
.ha-neural__nodes circle:nth-child(odd) { animation-delay: 1.2s; }
.ha-neural__nodes circle:nth-child(3n) { animation-delay: 2.4s; }

@keyframes ha-node-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}

@keyframes ha-neural-drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(2%, -1.5%, 0); }
}

/* ─── Layer 8: HUD rings ─── */
.ha-hud {
  opacity: 0.28;
}

.ha-ring {
  position: absolute;
  fill: none;
  stroke: rgba(0, 212, 255, 0.55);
  stroke-width: 1;
}

.ha-ring--lg {
  width: min(28vw, 280px);
  height: min(28vw, 280px);
  top: 18%;
  left: 6%;
  animation: ha-spin-slow 40s linear infinite;
}

.ha-ring--md {
  width: min(18vw, 180px);
  height: min(18vw, 180px);
  bottom: 16%;
  right: 8%;
  stroke: rgba(124, 58, 237, 0.55);
  animation: ha-spin-slow 28s linear infinite reverse;
}

.ha-ring--sm {
  width: min(12vw, 120px);
  height: min(12vw, 120px);
  top: 42%;
  right: 22%;
  stroke: rgba(59, 130, 246, 0.5);
  animation: ha-spin-slow 18s linear infinite;
}

@keyframes ha-spin-slow {
  to { transform: rotate(360deg); }
}

.ha-hud__chip {
  position: absolute;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 4px;
  background: rgba(7, 20, 38, 0.35);
  backdrop-filter: blur(6px);
}

.ha-hud__chip span {
  display: block;
  width: 18px;
  height: 3px;
  background: rgba(0, 212, 255, 0.45);
  border-radius: 1px;
  animation: ha-chip 4s ease-in-out infinite;
}
.ha-hud__chip span:nth-child(2) { animation-delay: 0.4s; width: 12px; }
.ha-hud__chip span:nth-child(3) { animation-delay: 0.8s; width: 22px; }

.ha-hud__chip--a { top: 32%; left: 14%; }
.ha-hud__chip--b { bottom: 28%; left: 22%; }

@keyframes ha-chip {
  0%, 100% { opacity: 0.35; transform: scaleX(0.7); }
  50% { opacity: 1; transform: scaleX(1); }
}

/* ─── Layer 9: Innovation cards ─── */
.ha-card {
  position: absolute;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  opacity: 0.35;
}

.ha-card--1 { width: 90px; height: 58px; top: 18%; left: 8%; animation: ha-card-float 26s ease-in-out infinite; }
.ha-card--2 { width: 70px; height: 46px; top: 55%; left: 12%; animation: ha-card-float 22s ease-in-out infinite 2s; }
.ha-card--3 { width: 100px; height: 64px; top: 22%; right: 10%; animation: ha-card-float 30s ease-in-out infinite 1s; }
.ha-card--4 { width: 64px; height: 42px; bottom: 24%; right: 16%; animation: ha-card-float 24s ease-in-out infinite 3s; }
.ha-card--5 { width: 80px; height: 50px; top: 62%; right: 28%; animation: ha-card-float 28s ease-in-out infinite 0.5s; }
.ha-card--6 { width: 56px; height: 36px; top: 40%; left: 28%; animation: ha-card-float 20s ease-in-out infinite 4s; opacity: 0.25; }

@keyframes ha-card-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(2deg); }
}

/* ─── Layer 10: Spotlight ─── */
.ha-spotlight {
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, rgba(0, 212, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 40% 50% at 75% 70%, rgba(124, 58, 237, 0.12), transparent 55%),
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.04) 48%, transparent 62%);
  background-size: 100% 100%, 100% 100%, 200% 200%;
  animation: ha-spotlight 32s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes ha-spotlight {
  0%, 100% { background-position: 0% 0%, 0% 0%, 0% 50%; }
  50% { background-position: 0% 0%, 0% 0%, 100% 50%; }
}

/* Readability veil */
.ha-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(7, 20, 38, 0.35) 0%, rgba(7, 20, 38, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 20, 38, 0.45) 0%, transparent 25%, transparent 70%, rgba(7, 20, 38, 0.65) 100%);
}

/* Content above atmosphere */
.homeHero--atmosphere .heroContent {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 24px rgba(7, 20, 38, 0.55);
  max-width: min(1000px, 92vw);
  width: 100% !important;
}

.homeHero--atmosphere .heroContent h1,
.homeHero--atmosphere .heroContent h6,
.homeHero--atmosphere .heroEyebrow {
  color: #fff;
}

.homeHero--atmosphere .heroStat {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .heroAtmosphere *,
  .heroAtmosphere *::before,
  .heroAtmosphere *::after {
    animation: none !important;
    transition: none !important;
  }

  .ha-mesh__blob,
  .ha-glow {
    opacity: 0.2;
  }

  .ha-dataviz,
  .ha-hud,
  .ha-cards,
  .ha-network,
  .ha-neural,
  .ha-particles {
    display: none;
  }
}

/* ─── Tablet: reduce density ~40% ─── */
@media (max-width: 1024px) {
  .ha-card--5,
  .ha-card--6,
  .ha-ring--sm,
  .ha-hud__chip--b,
  .ha-bars,
  .ha-wave {
    display: none;
  }

  .ha-dataviz { opacity: 0.05; }
  .ha-network { opacity: 0.35; }
  .ha-neural { opacity: 0.3; }
  .ha-mesh { filter: blur(40px); }
}

/* ─── Mobile: mesh + glows + light particles only ─── */
@media (max-width: 768px) {
  .ha-network,
  .ha-dataviz,
  .ha-arch,
  .ha-neural,
  .ha-hud,
  .ha-cards,
  .ha-spotlight {
    display: none;
  }

  .ha-mesh { filter: blur(36px); }
  .ha-glow { opacity: 0.18; }
  .ha-veil {
    background:
      radial-gradient(ellipse 80% 60% at 50% 40%, rgba(7, 20, 38, 0.4) 0%, rgba(7, 20, 38, 0.78) 100%);
  }
}
