/* ==========================================================================
   NULLPOINT™ — Animations & Cinematic Intro Loader
   ========================================================================== */

/* Fullscreen Cinematic Preloader & Holographic Resonance Chamber */
#intro-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #090a14 0%, #040508 70%, #000000 100%);
  z-index: var(--z-loader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

#intro-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Screen Jitter during Warp Acceleration */
#intro-loader.charging {
  animation: loaderJitter 0.12s infinite;
}

@keyframes loaderJitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5px, 1px); }
  50% { transform: translate(1.5px, -1px); }
  75% { transform: translate(-1px, -1.5px); }
  100% { transform: translate(1px, 1.5px); }
}

/* Background Atmosphere Layers */
.intro-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.intro-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 223, 216, 0.025) 50%,
    rgba(0, 223, 216, 0.025)
  );
  background-size: 100% 4px;
  opacity: 0.7;
}

.intro-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at center, transparent 40%, rgba(2, 2, 4, 0.85) 100%);
}

.intro-ambient-flare {
  position: absolute;
  width: min(600px, 90vw);
  height: min(600px, 90vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(0, 223, 216, 0.12) 40%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
  animation: introFlarePulse 4s ease-in-out infinite alternate;
}

@keyframes introFlarePulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

/* Telemetry HUD Corners */
.intro-hud-top-left {
  position: absolute;
  top: 2rem;
  left: 2.5rem;
  z-index: 10;
  border-left: 2px solid var(--accent-purple);
  padding-left: 0.85rem;
  pointer-events: none;
}

.hud-brand-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.hud-blink-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00dfd8;
  box-shadow: 0 0 8px #00dfd8;
  animation: hudBlink 1.4s infinite;
}

@keyframes hudBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.hud-sub-mono {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
}

.intro-hud-top-right {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  z-index: 10;
  text-align: right;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.hud-telemetry-row {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.hud-muted { color: var(--text-muted); }
.hud-cyan { color: #00dfd8; font-weight: 700; }
.hud-mono { color: #ffffff; font-weight: 600; }

.intro-hud-bottom-left {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  z-index: 10;
  pointer-events: none;
  max-width: 380px;
}

.intro-terminal-feed {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.term-line {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.55;
  transition: opacity 0.2s;
}

.term-line.active {
  color: #00dfd8;
  opacity: 1;
  font-weight: 600;
}

.intro-hud-bottom-right {
  position: absolute;
  bottom: 2.5rem;
  right: 2.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.intro-warp-prompt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0, 223, 216, 0.08);
  border: 1px solid rgba(0, 223, 216, 0.3);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #00dfd8;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.intro-warp-prompt:hover {
  background: rgba(0, 223, 216, 0.18);
  border-color: #00dfd8;
  box-shadow: 0 0 16px rgba(0, 223, 216, 0.35);
  transform: translateY(-1px);
}

.warp-pulse-icon {
  animation: warpIconPulse 0.8s infinite alternate;
}

@keyframes warpIconPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 6px #00dfd8); }
}

.intro-skip-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.intro-skip-btn:hover {
  color: #fff;
  border-color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* Centerpiece Holographic Chamber */
.intro-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1.5rem;
}

.intro-logo-assembly {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Outer Azimuth Radar Ring */
.intro-radar-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 223, 216, 0.35);
  animation: introRadarSpin 24s linear infinite;
  pointer-events: none;
}

@keyframes introRadarSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Tilted Orbital Ring Track */
.intro-orbital-track {
  position: absolute;
  width: 250px;
  height: 94px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.25);
  transform: rotate(-28deg);
  pointer-events: none;
}

.intro-orbiting-bead {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #00dfd8;
  box-shadow: 0 0 10px #00dfd8, 0 0 20px #00dfd8;
  animation: introBeadOrbit 4s ease-in-out infinite alternate;
}

@keyframes introBeadOrbit {
  0% { left: 0%; transform: scale(0.8); }
  50% { left: 50%; transform: scale(1.4); }
  100% { left: 100%; transform: scale(0.8); }
}

/* SVG Vector Emblem */
.intro-logo-svg {
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.75));
  z-index: 2;
}

.intro-reticle {
  transform-origin: 100px 100px;
  animation: introFadeScale 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-orbit {
  transform-origin: 100px 100px;
  animation: introOrbitSpin 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-inner-circle {
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  transform-origin: 100px 100px;
  animation: drawRing 2.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.intro-aperture path,
.intro-aperture line {
  stroke-dasharray: 380;
  stroke-dashoffset: 380;
  animation: drawAperture 2.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-diagonal {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawSlash 1.5s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-center-singularity {
  transform-origin: 100px 100px;
  animation: pulseSingularity 2s 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes introFadeScale {
  0% { opacity: 0; transform: scale(0.6); }
  100% { opacity: 0.6; transform: scale(1); }
}

@keyframes introOrbitSpin {
  0% { transform: rotate(-75deg); opacity: 0; }
  100% { transform: rotate(-28deg); opacity: 0.85; }
}

@keyframes drawAperture {
  0% { stroke-dashoffset: 380; opacity: 0.2; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes pulseSingularity {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(2.2); opacity: 1; filter: drop-shadow(0 0 20px #00dfd8); }
  100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 10px #ffffff); }
}

/* Light Sweep */
.intro-light-sweep {
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(0, 223, 216, 0.95) 70%,
    transparent 100%
  );
  transform: skewX(-25deg);
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.intro-light-sweep.animate {
  animation: sweepLight 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Singularity Shockwave Ring */
.intro-shockwave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -15px;
  border-radius: 50%;
  border: 2px solid #00dfd8;
  box-shadow: 0 0 20px #00dfd8;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.intro-shockwave.burst {
  animation: shockwaveExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shockwaveExpand {
  0% { transform: scale(1); opacity: 1; border-width: 4px; }
  100% { transform: scale(28); opacity: 0; border-width: 1px; }
}

/* Typography */
.intro-brand-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #ffffff;
  margin-bottom: 0.35rem;
  opacity: 0;
  transform: translateY(15px);
  text-shadow: 0 0 25px rgba(139, 92, 246, 0.4);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.intro-brand-tm {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent-purple);
  margin-left: 2px;
}

.intro-brand-title.reveal {
  opacity: 1;
  transform: translateY(0);
}

.intro-brand-tagline {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 460px;
  opacity: 0;
  transform: translateY(10px);
  margin-bottom: 1.75rem;
  line-height: 1.5;
  transition: opacity 0.6s 0.15s var(--ease-out-expo), transform 0.6s 0.15s var(--ease-out-expo);
}

.intro-brand-tagline.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Digital Decode & Percentage Readout */
.intro-counter-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.intro-percent-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(0, 223, 216, 0.6);
  letter-spacing: 0.05em;
}

.intro-percent-brackets {
  color: var(--accent-purple);
  font-weight: 400;
  opacity: 0.7;
}

.intro-hex-decode {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #00dfd8;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

/* Dual-Rail Segmented Energy Gauge (24 Segments) */
.intro-segments-bar {
  display: flex;
  gap: 3px;
  width: min(320px, 85vw);
  height: 6px;
  margin-bottom: 0.85rem;
}

.intro-segment {
  flex: 1;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.intro-segment.active {
  background: #00dfd8;
  box-shadow: 0 0 8px #00dfd8;
}

.intro-segment.active.purple {
  background: #8b5cf6;
  box-shadow: 0 0 8px #8b5cf6;
}

.intro-status-text {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #cbd5e1;
  letter-spacing: 0.06em;
  min-height: 1.2rem;
}

/* Final Iris Shutter Flash */
.intro-iris-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff 0%, #00dfd8 40%, rgba(139, 92, 246, 0.8) 70%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.35s ease-out;
}

.intro-iris-flash.flash {
  opacity: 0.95;
}

@media (max-width: 768px) {
  .intro-hud-top-left {
    top: 1.25rem;
    left: 1.25rem;
  }
  .intro-hud-top-right {
    top: 1.25rem;
    right: 1.25rem;
  }
  .intro-hud-bottom-left {
    display: none;
  }
  .intro-hud-bottom-right {
    bottom: 1.25rem;
    right: 1.25rem;
    left: 1.25rem;
    justify-content: space-between;
  }
  .intro-logo-assembly {
    width: 170px;
    height: 170px;
    margin-bottom: 1rem;
  }
  .intro-radar-ring {
    width: 190px;
    height: 190px;
  }
  .intro-orbital-track {
    width: 195px;
    height: 75px;
  }
  .intro-logo-svg {
    width: 130px;
    height: 130px;
  }
  .intro-brand-title {
    font-size: 1.8rem;
  }
}

/* ==========================================================================
   Hero 3D Object Area
   ========================================================================== */
.hero-canvas-wrap {
  position: absolute;
  top: 50%;
  right: 5%;
  transform: translateY(-50%);
  width: min(650px, 50vw);
  height: min(650px, 80vh);
  pointer-events: auto;
  z-index: 5;
}

@media (max-width: 991px) {
  .hero-canvas-wrap {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    height: 380px;
    margin-top: 2rem;
  }
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes drawRing {
  0% {
    stroke-dashoffset: 283;
    transform: rotate(-90deg);
  }
  100% {
    stroke-dashoffset: 0;
    transform: rotate(270deg);
  }
}

@keyframes drawCore {
  0% {
    stroke-dashoffset: 200;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes drawSlash {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes sweepLight {
  0% {
    left: -150%;
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    left: 200%;
    opacity: 0;
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.05);
  }
}

@keyframes pulseGlitch {
  0% {
    background-color: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
  }
  50% {
    background-color: var(--accent-danger);
    box-shadow: 0 0 14px var(--accent-danger);
  }
  100% {
    background-color: var(--accent-warning);
    box-shadow: 0 0 10px var(--accent-warning);
  }
}

@keyframes marqueeInfinite {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.floating-anim {
  animation: floatSlow 6s ease-in-out infinite;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeInfinite 35s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* Text Reveal Utilities */
.split-line {
  overflow: hidden;
}

.split-line > * {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.8s var(--ease-out-expo);
}

.in-view .split-line > * {
  transform: translateY(0);
}
