/* Iron Elite — cinematic immersive hero (controlled, elite, not flashy) */

.hero--immersive {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* ── Atmosphere stack (behind layout) ── */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-atmosphere__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.32;
}

.hero-atmosphere__grid {
  position: absolute;
  inset: -8%;
  z-index: 2;
  opacity: 0.055;
  background-image:
    linear-gradient(rgba(61, 96, 136, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 96, 136, 0.55) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 92% 78% at 50% 42%, #000 15%, transparent 72%);
  animation: heroGridDrift 48s linear infinite;
}

@keyframes heroGridDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(44px, 44px); }
}

.hero-atmosphere__vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(ellipse 100% 88% at 50% 45%, transparent 42%, rgba(4, 6, 10, 0.72) 100%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.5) 0%, transparent 22%, transparent 78%, rgba(4, 6, 10, 0.65) 100%);
}

.hero-atmosphere__sweep {
  position: absolute;
  inset: -40% -60%;
  z-index: 4;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(61, 96, 136, 0.04) 46%,
    rgba(100, 160, 220, 0.09) 50%,
    rgba(61, 96, 136, 0.04) 54%,
    transparent 62%
  );
  transform: translateX(-55%);
  animation: heroLightSweep 18s ease-in-out infinite;
}

@keyframes heroLightSweep {
  0% { transform: translateX(-58%) skewX(-6deg); opacity: 0.35; }
  45% { opacity: 0.85; }
  100% { transform: translateX(58%) skewX(-6deg); opacity: 0.35; }
}

.hero-atmosphere__system-scan {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  opacity: 0.55;
}

.hero-atmosphere__system-scan::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  top: -28%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(61, 96, 136, 0.06) 35%,
    rgba(100, 160, 220, 0.1) 50%,
    rgba(61, 96, 136, 0.06) 65%,
    transparent 100%
  );
  animation: heroSystemScan 22s ease-in-out infinite;
}

@keyframes heroSystemScan {
  0% { top: -28%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 0.85; }
  100% { top: 100%; opacity: 0; }
}

/* ── Parallax-ready layout layers ── */
.hero--immersive .hero-layout {
  position: relative;
  z-index: 2;
  will-change: transform;
}

.hero--immersive [data-parallax-layer="copy"] {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.hero--immersive [data-parallax-layer="visual"] {
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* ── Command panel image — subtle zoom + edge vignette ── */
.hero--immersive .hero-command__bg-img {
  opacity: 0.52;
  transform: scale(1);
  animation: heroCommandZoomSubtle 48s ease-in-out infinite alternate;
}

.hero--immersive .hero-command:hover .hero-command__bg-img {
  animation: none;
  transform: scale(1.03);
}

@keyframes heroCommandZoomSubtle {
  from { transform: scale(1); }
  to { transform: scale(1.02); }
}

.hero-command__vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 95% 90% at 50% 50%, transparent 32%, rgba(4, 6, 10, 0.82) 100%),
    linear-gradient(90deg, rgba(4, 6, 10, 0.35) 0%, transparent 28%, transparent 72%, rgba(4, 6, 10, 0.5) 100%);
}

.hero--immersive .hero-command__bg-shade {
  background:
    linear-gradient(
      90deg,
      rgba(4, 6, 10, 0.92) 0%,
      rgba(4, 6, 10, 0.86) 36%,
      rgba(4, 6, 10, 0.58) 58%,
      rgba(4, 6, 10, 0.75) 100%
    ),
    radial-gradient(ellipse 88% 82% at 78% 48%, transparent 16%, rgba(4, 6, 10, 0.9) 100%),
    linear-gradient(180deg, rgba(4, 6, 10, 0.5) 0%, transparent 30%, transparent 70%, rgba(4, 6, 10, 0.68) 100%);
}

/* Slower, softer in-panel scan */
.hero--immersive .hero-command__scan {
  height: 1px;
  opacity: 0.45;
  animation: heroCommandScan 14s ease-in-out infinite;
}

@keyframes heroCommandScan {
  0% { top: 12%; opacity: 0; }
  12% { opacity: 0.5; }
  88% { opacity: 0.35; }
  100% { top: 88%; opacity: 0; }
}

.hero--immersive .hero-command__grid {
  opacity: 0.09;
  animation: heroGridDrift 56s linear infinite reverse;
}

/* ── Animated cinema lines (hero bottom) ── */
.hero-cinema-lines {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 2.5vh, 28px);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 clamp(20px, 5vw, 48px);
  max-width: var(--max, 1200px);
  margin: 0 auto;
  box-sizing: border-box;
  pointer-events: none;
}

.hero-cinema-lines__line {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(61, 96, 136, 0.22) 20%,
    rgba(61, 96, 136, 0.38) 50%,
    rgba(61, 96, 136, 0.22) 80%,
    transparent 100%
  );
}

.hero-cinema-lines__line::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(100, 160, 220, 0.55),
    rgba(142, 184, 232, 0.75),
    rgba(100, 160, 220, 0.55),
    transparent
  );
  box-shadow: 0 0 10px rgba(61, 96, 136, 0.35);
}

.hero-cinema-lines__line--top::after {
  left: 100%;
  animation: heroLineRTL 14s linear infinite;
}

.hero-cinema-lines__line--bottom::after {
  left: -22%;
  animation: heroLineLTR 16s linear infinite;
}

@keyframes heroLineRTL {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 0.9; }
  94% { opacity: 0.7; }
  100% { transform: translateX(calc(-100vw - 22%)); opacity: 0; }
}

@keyframes heroLineLTR {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 0.85; }
  94% { opacity: 0.65; }
  100% { transform: translateX(calc(100vw + 22%)); opacity: 0; }
}

/* Section scroll reveals — see css/reveal.css */

/* ── Mobile ── */
@media (max-width: 768px) {
  .hero-atmosphere__particles {
    opacity: 0.22;
  }

  .hero-atmosphere__sweep {
    animation-duration: 22s;
    opacity: 0.7;
  }

  .hero-cinema-lines {
    bottom: 10px;
    gap: 5px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero-atmosphere__grid,
  .hero-atmosphere__sweep,
  .hero-atmosphere__system-scan::before,
  .hero-cinema-lines__line::after,
  .hero--immersive .hero-command__bg-img,
  .hero--immersive .hero-command__scan,
  .hero--immersive .hero-command__grid {
    animation: none !important;
  }

  .hero--immersive .hero-command__bg-img {
    transform: scale(1);
  }

  .hero--immersive [data-parallax-layer] {
    transform: none !important;
  }
}
