/* ═══ Mechronis Cinematic Intro ═══ */

html.intro-pending,
body.intro-active {
  overflow: hidden;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #030508;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.intro-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-overlay.is-exiting {
  filter: blur(0px);
  transition: opacity 0.85s ease, filter 0.85s ease, visibility 0.85s ease;
}

.intro-overlay.is-exiting.blur-out {
  filter: blur(18px);
  opacity: 0;
}

.intro-bg-canvas,
.intro-three-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro-bg-canvas {
  z-index: 1;
}

.intro-three-canvas {
  z-index: 2;
}

.intro-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 30%, rgba(3, 5, 8, 0.85) 100%);
}

.intro-flare {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120vmax;
  height: 120vmax;
  margin: -60vmax 0 0 -60vmax;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(0, 229, 255, 0.25) 12%,
    rgba(168, 85, 247, 0.12) 28%,
    transparent 55%
  );
  opacity: 0;
  transform: scale(0.2);
  mix-blend-mode: screen;
}

.intro-brand {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 4vw, 36px);
  pointer-events: none;
  will-change: transform, opacity;
}

.intro-symbol-wrap {
  position: relative;
  width: clamp(160px, 38vw, 280px);
  height: clamp(160px, 38vw, 280px);
}

.intro-three-mount {
  position: absolute;
  inset: 0;
}

.intro-symbol-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.2), rgba(168, 85, 247, 0.08) 45%, transparent 70%);
  opacity: 0;
  filter: blur(20px);
}

.intro-wordmark {
  display: flex;
  gap: 0.06em;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: clamp(1.4rem, 5vw, 2.6rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
}

.intro-wordmark .intro-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  background: linear-gradient(
    105deg,
    #ffffff 0%,
    #b8f0ff 25%,
    #00e5ff 50%,
    #a855f7 78%,
    #c084fc 100%
  );
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.35));
}

.intro-wordmark.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.intro-skip {
  position: absolute;
  bottom: clamp(20px, 4vw, 36px);
  right: clamp(20px, 4vw, 36px);
  z-index: 20;
  padding: 10px 20px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(139, 156, 184, 0.9);
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 4px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.intro-skip:hover {
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.intro-skip:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 2px;
}

/* Nav logo entrance after intro */
.nav-logo.intro-reveal-logo .logo-mark {
  animation: navLogoPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes navLogoPop {
  0% {
    opacity: 0;
    transform: scale(0.3);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .intro-brand {
    transform: translate(-50%, -54%);
  }

  .intro-wordmark {
    letter-spacing: 0.14em;
  }
}
