/* === ANIMATIONS === */

/* Scroll reveal initial states (GSAP animates to final) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-30px);
}

.reveal--right {
  opacity: 0;
  transform: translateX(30px);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.95);
}

/* Hero elements start hidden (GSAP entrance timeline handles them) */
[data-hero-anim] {
  opacity: 0;
}

/* ---- Page transitions ---- */
/* A dark panel with a thin light edge. The head script adds .pt-ready and
   .pt-cover before first paint; main.js lifts the panel, and raises it again
   when an internal link is clicked. */
.pt-ready body::after {
  content: '';
  position: fixed;
  inset: -2px 0;
  z-index: 1000;
  background: var(--color-bg);
  border-block: 1px solid rgba(255, 255, 255, 0.3);
  transform: translateY(-102%);
  pointer-events: none;
  transition: transform 700ms var(--ease-in-out);
}

.pt-ready.pt-cover body::after {
  transform: translateY(0);
  transition: none;
}

.pt-ready.pt-below body::after {
  transform: translateY(102%);
  transition: none;
}

.pt-ready.pt-below.pt-leave body::after {
  transform: translateY(0);
  transition: transform 500ms var(--ease-in-out);
}

/* ---- Headline line reveal ---- */
/* Headlines stay hidden until they have been split into lines, so the
   unsplit text never flashes. .wv-static / .wv-fallback show them as is. */
.pt-ready .page-title,
.pt-ready .section__title,
.pt-ready .work-section__title,
.pt-ready .hero__title {
  visibility: hidden;
}

.wv-headlines-ready .page-title,
.wv-headlines-ready .section__title,
.wv-headlines-ready .work-section__title,
.wv-headlines-ready .hero__title,
.wv-static .page-title,
.wv-static .section__title,
.wv-static .work-section__title,
.wv-static .hero__title,
.wv-fallback .page-title,
.wv-fallback .section__title,
.wv-fallback .work-section__title,
.wv-fallback .hero__title {
  visibility: visible;
}

/* Room for descenders inside each line mask */
.hl-line-mask {
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

/* ---- Smooth scrolling (Lenis) ---- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Skeleton loading shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.is-loading {
  background: linear-gradient(
    90deg,
    var(--color-bg-card) 25%,
    var(--color-bg-elevated) 37%,
    var(--color-bg-card) 63%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--scale {
    opacity: 1;
    transform: none;
  }

  [data-hero-anim] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .hero__logo--animate {
    animation: none;
  }

  .hero::before {
    animation: none;
    opacity: 0;
  }

  .btn--outline::before {
    transition: none;
  }

  .is-loading {
    animation: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
