/* ==========================================================================
   ADENGER — Motion Engine & Animations (animations.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Opening Sequence (Cinematic Intro)
   -------------------------------------------------------------------------- */
.intro-curtain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-charcoal);
  z-index: var(--z-intro);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-cinematic) var(--ease-editorial),
              opacity var(--duration-slow) ease;
  overflow: hidden;
}

.intro-curtain.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

.intro-curtain__grain {
  position: absolute;
  inset: 0;
  background-image: url('../textures/adenger-grain.jpg');
  background-repeat: repeat;
  background-size: var(--grain-size);
  mix-blend-mode: var(--grain-blend-mode);
  opacity: 0.55;
  pointer-events: none;
}

.intro-curtain__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}

.intro-curtain__logo {
  height: clamp(48px, 9vw, 90px);
  width: auto;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 20px rgba(148, 190, 61, 0.4));
}

.intro-curtain__tagline {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.25em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 0.4s, transform 0.7s ease 0.4s;
}

.intro-curtain.animate-in .intro-curtain__logo {
  opacity: 1;
  transform: scale(1);
}

.intro-curtain.animate-in .intro-curtain__tagline {
  opacity: 1;
  transform: translateY(0);
}

/* Skip Button */
.intro-skip-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-charcoal-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.intro-skip-btn:hover {
  color: var(--color-lime);
  border-color: var(--color-lime);
}

/* --------------------------------------------------------------------------
   Custom Cursor (Desktop Only)
   -------------------------------------------------------------------------- */
.cursor-dot, .cursor-ring {
  display: none;
}

@media (pointer: fine) and (hover: hover) {
  .cursor-dot {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background-color: var(--color-lime);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.1s ease;
  }

  .cursor-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 190, 61, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: calc(var(--z-cursor) - 1);
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-editorial),
                height 0.3s var(--ease-editorial),
                border-color 0.2s ease,
                background-color 0.2s ease,
                opacity 0.2s ease;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--color-void);
    font-weight: bold;
    overflow: hidden;
  }

  /* Hover Interactive Elements State */
  body.cursor-hover .cursor-ring {
    width: 52px;
    height: 52px;
    background-color: rgba(148, 190, 61, 0.12);
    border-color: var(--color-lime);
  }

  /* View Project Card State */
  body.cursor-view .cursor-ring {
    width: 80px;
    height: 80px;
    background-color: var(--color-lime);
    border-color: var(--color-lime);
    box-shadow: 0 0 24px rgba(148, 190, 61, 0.4);
  }

  body.cursor-view .cursor-dot {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Scroll-Triggered Reveals (Rock-Solid Keyframe Motion)
   -------------------------------------------------------------------------- */
@keyframes sectionFadeUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll.is-revealed {
  animation: sectionFadeUp 0.8s var(--ease-editorial) both;
}

/* Stagger Delays */
.delay-1.is-revealed { animation-delay: 0.1s; }
.delay-2.is-revealed { animation-delay: 0.2s; }
.delay-3.is-revealed { animation-delay: 0.3s; }
.delay-4.is-revealed { animation-delay: 0.4s; }

/* Stagger Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --------------------------------------------------------------------------
   Kinetic Typography Split Lines
   -------------------------------------------------------------------------- */
.kinetic-line-wrap {
  display: block;
  overflow: visible;
  padding: 0.1em 0;
  margin-bottom: 0.15em;
}

.kinetic-line {
  display: inline-block;
  will-change: transform, opacity;
}

@keyframes kineticSlideUp {
  0% {
    transform: translateY(22px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero.is-active .kinetic-line {
  animation: kineticSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero.is-instant .kinetic-line {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Line Delays */
.hero.is-active:not(.is-instant) .line-delay-1 { animation-delay: 0.05s; }
.hero.is-active:not(.is-instant) .line-delay-2 { animation-delay: 0.18s; }
.hero.is-active:not(.is-instant) .line-delay-3 { animation-delay: 0.30s; }

/* --------------------------------------------------------------------------
   Sculptural Motion Artwork Animations
   -------------------------------------------------------------------------- */
@keyframes slowSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes glyphBreathe {
  0%, 100% {
    transform: translate(-3px, 2px);
    opacity: 0.65;
  }
  50% {
    transform: translate(4px, -3px);
    opacity: 0.95;
  }
}

@keyframes discPulse {
  0%, 100% {
    transform: scale(1);
    border-color: var(--color-lime);
  }
  50% {
    transform: scale(1.18);
    border-color: var(--color-lime-bright);
  }
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
    box-shadow: 0 0 14px var(--color-lime);
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion Preferences
   -------------------------------------------------------------------------- */
@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;
  }

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

  .cursor-dot, .cursor-ring {
    display: none !important;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .kinetic-line {
    transform: none !important;
  }

  .scene-showcase:hover {
    transform: none !important;
  }

  .scene-showcase__img {
    transform: none !important;
  }
}

