/* ════════════════════════════════════════════════════════════════
   ANIMATIONS — restrained, smooth, editorial
   ════════════════════════════════════════════════════════════════ */

/* ── REVEAL (used by GSAP fallback) ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-cinematic), transform var(--transition-cinematic);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── HERO TEXT ANIMATIONS ── */
.hero-line {
  display: block;
  overflow: hidden;
}

.hero-line__inner {
  display: inline-block;
  transform: translateY(120%);
  animation: lineRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line--delay-1 .hero-line__inner { animation-delay: 0.2s; }
.hero-line--delay-2 .hero-line__inner { animation-delay: 0.4s; }
.hero-line--delay-3 .hero-line__inner { animation-delay: 0.7s; }
.hero-line--delay-4 .hero-line__inner { animation-delay: 1.0s; }
.hero-line--delay-5 .hero-line__inner { animation-delay: 1.3s; }

@keyframes lineRise {
  to { transform: translateY(0); }
}

/* fade in (for hero subtitle after rise) */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
}

.fade-in--delay-1 { animation-delay: 0.5s; }
.fade-in--delay-2 { animation-delay: 0.8s; }
.fade-in--delay-3 { animation-delay: 1.2s; }
.fade-in--delay-4 { animation-delay: 1.5s; }
.fade-in--delay-5 { animation-delay: 1.9s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

/* image reveal */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal img,
.image-reveal video {
  transform: scale(1.15);
  transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-black);
  transform-origin: left;
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.image-reveal.is-revealed img,
.image-reveal.is-revealed video {
  transform: scale(1);
}

.image-reveal.is-revealed::after {
  transform: scaleX(0);
  transform-origin: right;
}

/* page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: 9999;
  transform: scaleY(1);
  transform-origin: top;
  pointer-events: none;
  animation: pageOut 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes pageOut {
  0% { transform: scaleY(1); transform-origin: top; }
  60% { transform: scaleY(0); transform-origin: top; }
  61% { transform: scaleY(0); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* count-up base */
.counter {
  display: inline-block;
}

/* marquee for collaborations */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee__track {
  display: inline-flex;
  gap: 80px;
  animation: marqueeScroll 50s linear infinite;
  align-items: center;
  padding-right: 80px;
}

@keyframes marqueeScroll {
  to { transform: translateX(-50%); }
}

.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
  opacity: 0.85;
}

.marquee__sep {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: var(--weight-thin);
  opacity: 0.3;
}

/* parallax wrapper */
.parallax {
  will-change: transform;
}

/* fade up */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom cursor (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--color-white);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: transform 0.2s ease, width 0.3s ease, height 0.3s ease;
  }

  .cursor--ring {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--color-white);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s ease, height 0.4s ease;
  }

  .cursor--hover {
    width: 56px;
    height: 56px;
  }

  body.has-cursor { cursor: none; }
  body.has-cursor a,
  body.has-cursor button { cursor: none; }
}

/* word stagger for hero */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.split-word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineRise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
