/* ══ MAE animations ══ */

/* ── Existing scroll reveals ── */
.reveal, .reveal-l, .reveal-r {
  opacity: 0;
  transition: opacity 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1);
}
.reveal {
  transform: translateY(52px);
}
.reveal-l {
  transform: translateX(-52px);
}
.reveal-r {
  transform: translateX(52px);
}
.reveal.on, .reveal-l.on, .reveal-r.on {
  opacity: 1;
  transform: none;
}
.d1 { transition-delay: .1s; } .d2 { transition-delay: .22s; } .d3 { transition-delay: .36s; } .d4 { transition-delay: .52s; }
.reveal-line {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(.22,1,.36,1);
}
.reveal-line.on {
  transform: scaleX(1);
}

/* ── GlyphsLabs gl-reveal ── */
.gl-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
}
.gl-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Char reveal ── */
.gl-char {
  will-change: opacity;
}

/* ── Flash effects ── */
.gl-flash-svg {
  filter: drop-shadow(var(--gl-flash-x,0px) 0 0 rgba(255,0,0,var(--gl-flash-a,0))) drop-shadow(calc(-1 * var(--gl-flash-x,0px)) 0 0 rgba(0,0,255,var(--gl-flash-a,0)));
}
.gl-flash-text {
  text-shadow: var(--gl-flash-x,0px) 0 0 rgba(255,0,0,var(--gl-flash-a,0)), calc(-1 * var(--gl-flash-x,0px)) 0 0 rgba(0,0,255,var(--gl-flash-a,0));
}

/* ── Custom cursor ── */
#cursorContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 31.25px;
  height: 31.25px;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  display: block;
  opacity: 0;
  transition: opacity .6s ease;
  mix-blend-mode: difference;
}
#customCursor {
  display: none;
}
.cursor-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%,-50%);
  transition: width .45s cubic-bezier(.16,1,.3,1), height .45s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
}
.cursor-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #212121;
  opacity: 0;
  transition: opacity .3s ease .1s;
  white-space: nowrap;
  pointer-events: none;
}
#cursorContainer.is-expanded .cursor-halo {
  width: 54px;
  height: 54px;
}
#cursorContainer.is-view .cursor-halo {
  width: 76px;
  height: 76px;
}
#cursorContainer.is-view #customCursor {
  opacity: 0;
  scale: 0;
}
#cursorContainer.is-view .cursor-label {
  opacity: 1;
}
@media (pointer: coarse) {
  #cursorContainer {
    display: none !important;
  }
  *, *::before, *::after {
    cursor: auto !important;
  }
}

/* ── Keyframes ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(52px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ticker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ── Reduced motion: neutralize CSS transitions/animations (JS motion —
   Lenis smooth-scroll + GSAP parallax — is gated separately on
   prefers-reduced-motion in gl-animations.js) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
