/* ==========================================================================
   CAFEIV — CINEMATIC MOTION & KINETIC SYSTEM (RTL & PERSIAN EDITORIAL)
   CSS Keyframes, Intro Sequence, Laser Scan & Reduced Motion
   ========================================================================== */

/* --- KEYFRAME ANIMATIONS --- */

/* Hero Scroll Line Pulse */
@keyframes scrollPulse {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
  }
  30% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }
  70% {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}

/* RTL Marquee Scrolling */
@keyframes marqueeScrollRtl {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(50%);
  }
}

/* LTR Marquee fallback */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* QR Code Laser Scanning Line */
@keyframes scanLaser {
  0% {
    top: 5%;
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: 92%;
    opacity: 0.35;
  }
}

/* Luxury Gold Glow Pulse */
@keyframes goldGlowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(212, 175, 55, 0.45);
  }
}

/* Floating Elements */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Film Intro Curtain Sequence */
.intro-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #040405;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro-logo-wrap {
  overflow: hidden;
  text-align: center;
}

.intro-logo-text {
  font-family: var(--font-en-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.3em;
  color: #F5E8D7;
  transform: translateY(120%);
  direction: ltr;
}

.intro-persian-sub {
  font-family: var(--font-fa);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-gold);
  margin-top: 0.5rem;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro-line {
  width: 0;
  height: 1px;
  background-color: var(--accent-gold);
  margin-top: 1.25rem;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Split Text Reveal Containers */
.reveal-text {
  overflow: hidden;
  display: block;
}

.reveal-text .word-inner,
.reveal-text .char-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.reveal-text.is-revealed .word-inner,
.reveal-text.is-revealed .char-inner {
  transform: translateY(0%);
}

/* Fade Up Stagger */
.fade-up-item {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-up-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- ACCESSIBILITY: REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .film-grain {
    display: none !important;
  }

  .custom-cursor {
    display: none !important;
  }

  .hero-image {
    transform: none !important;
    transition: none !important;
  }

  .marquee-track {
    animation: none !important;
    transform: none !important;
  }

  .qr-scan-line {
    animation: none !important;
    display: none !important;
  }

  .intro-curtain {
    display: none !important;
  }

  .fade-up-item,
  .reveal-text .word-inner,
  .reveal-text .char-inner {
    transform: none !important;
    opacity: 1 !important;
  }
}
