/* ============================================
   AETHEX CONNECT - CINEMATIC INTRO ANIMATION
   ============================================ */

.intro-animation {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1s ease-out;
}

.intro-animation.fade {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   PARTICLE FIELD
   ============================================ */

.intro-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro-particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: var(--color);
  border-radius: 50%;
  opacity: 0;
  animation: particle-float var(--duration) var(--delay) infinite;
  box-shadow: 0 0 10px var(--color);
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  10% {
    opacity: 0.8;
    transform: scale(1);
  }
  90% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0);
  }
}

/* ============================================
   ANIMATED LOGO
   ============================================ */

.intro-logo-container {
  position: relative;
  margin-bottom: 40px;
  animation: logo-appear 1s ease-out forwards;
}

@keyframes logo-appear {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  60% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.intro-logo {
  filter: drop-shadow(0 0 30px rgba(255, 100, 50, 0.5));
}

/* Diamond outer - draw animation */
.intro-diamond-outer {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-diamond 1.5s ease-out forwards;
}

@keyframes draw-diamond {
  to {
    stroke-dashoffset: 0;
  }
}

/* Diamond inner - fade in */
.intro-diamond-inner {
  opacity: 0;
  animation: fade-in 0.5s ease-out 1s forwards;
}

/* Core pulse */
.intro-core {
  animation: core-pulse 1.5s ease-in-out infinite;
}

@keyframes core-pulse {
  0%, 100% {
    r: 15;
    filter: drop-shadow(0 0 20px rgba(255, 100, 50, 0.8));
  }
  50% {
    r: 18;
    filter: drop-shadow(0 0 40px rgba(255, 100, 50, 1));
  }
}

/* Orbiting dots */
.intro-orbit {
  transform-origin: 100px 100px;
}

.intro-orbit-1 {
  animation: orbit 3s linear infinite;
}

.intro-orbit-2 {
  animation: orbit 3s linear infinite;
  animation-delay: -1s;
}

.intro-orbit-3 {
  animation: orbit 3s linear infinite;
  animation-delay: -2s;
}

@keyframes orbit {
  0% {
    transform: rotate(0deg) translateX(70px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(70px) rotate(-360deg);
  }
}

/* ============================================
   TEXT REVEAL
   ============================================ */

.intro-text-container {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.intro-animation.text .intro-text-container,
.intro-animation.fade .intro-text-container {
  animation: text-reveal 1s ease-out forwards;
}

@keyframes text-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-title {
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: center;
  gap: 2px;
}

.intro-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotateX(-90deg);
  animation: letter-flip 0.6s ease-out forwards;
  animation-delay: calc(var(--i) * 0.05s + 1.5s);
  background: linear-gradient(135deg, #ff0000, #0066ff, #ffa500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes letter-flip {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.intro-space {
  width: 0.3em;
}

.intro-tagline {
  font-size: 1.2rem;
  color: #666;
  margin-top: 12px;
  opacity: 0;
  animation: fade-in 0.8s ease-out 2.5s forwards;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

/* ============================================
   SCAN LINE EFFECT
   ============================================ */

.intro-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff0000, #0066ff, #ffa500, transparent);
  opacity: 0.6;
  animation: scanline 3s linear infinite;
  box-shadow: 0 0 20px rgba(255, 100, 50, 0.5);
}

@keyframes scanline {
  0% {
    top: -2px;
  }
  100% {
    top: 100%;
  }
}

/* ============================================
   CORNER ACCENTS
   ============================================ */

.intro-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0;
  animation: corner-appear 0.5s ease-out 0.5s forwards;
}

.intro-corner-tl {
  top: 30px;
  left: 30px;
  border-top: 2px solid #ff0000;
  border-left: 2px solid #ff0000;
}

.intro-corner-tr {
  top: 30px;
  right: 30px;
  border-top: 2px solid #0066ff;
  border-right: 2px solid #0066ff;
}

.intro-corner-bl {
  bottom: 30px;
  left: 30px;
  border-bottom: 2px solid #ffa500;
  border-left: 2px solid #ffa500;
}

.intro-corner-br {
  bottom: 30px;
  right: 30px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  opacity: 0.3;
}

@keyframes corner-appear {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .intro-title {
    font-size: 2.5rem;
  }
  
  .intro-tagline {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
  }
  
  .intro-logo-container svg {
    width: 150px;
    height: 150px;
  }
  
  .intro-corner {
    width: 40px;
    height: 40px;
  }
}
