/* Intro Animation - Three-Panel Cinematic Reveal */
/* Elegant, layered motion for luxury brand aesthetic */

.intro-animation {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: none;
  animation: fadeOutIntro 0.35s ease-out 1.5s forwards;
}

.intro-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Panel 1 (Darkest) - Slides in from left */
.intro-panel-dark {
  background: var(--darker);
  animation: slideInFromLeft 0.6s cubic-bezier(0.76, 0, 0.24, 1) forwards,
             slideUpAndOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) 1s forwards;
  z-index: 1;
}

/* Panel 2 (Medium) - Slides in from right, slightly delayed */
.intro-panel-medium {
  background: var(--medium);
  animation: slideInFromRight 0.6s cubic-bezier(0.76, 0, 0.24, 1) 0.12s forwards,
             slideUpAndOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) 1s forwards;
  z-index: 2;
}

/* Panel 3 (Lightest) - Slides in from bottom, covers full screen */
.intro-panel-light {
  background: var(--light);
  animation: slideInFromBottom 0.6s cubic-bezier(0.76, 0, 0.24, 1) 0.24s forwards,
             slideUpAndOut 0.5s cubic-bezier(0.76, 0, 0.24, 1) 1s forwards;
  z-index: 3;
}

/* Keyframe Animations */

/* Fade out entire animation container */
@keyframes fadeOutIntro {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Panel 1: Slide in from left */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Panel 2: Slide in from right */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Panel 3: Slide in from bottom */
@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* All panels slide upward together */
@keyframes slideUpAndOut {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}

/* Responsive adjustments for smoother mobile experience */
@media (max-width: 768px) {
  .intro-panel-dark {
    animation-duration: 0.5s, 0.45s;
  }

  .intro-panel-medium {
    animation-duration: 0.5s, 0.45s;
  }

  .intro-panel-light {
    animation-duration: 0.5s, 0.45s;
  }

  .intro-animation {
    animation: fadeOutIntro 0.3s ease-out 1.65s forwards;
  }
}
