/* ─────────── animation helpers (shared) ─────────── */

/* mask-reveal — clip-path inset animates open */
.mask-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.2s cubic-bezier(0.7, 0, 0.18, 1);
}
.mask-reveal.is-visible { clip-path: inset(0 0 0 0); }
.mask-reveal.from-bottom { clip-path: inset(100% 0 0 0); }
.mask-reveal.from-bottom.is-visible { clip-path: inset(0 0 0 0); }
.mask-reveal.from-top { clip-path: inset(0 0 100% 0); }
.mask-reveal.from-top.is-visible { clip-path: inset(0 0 0 0); }

/* parallax — translate3d via custom property */
.parallax {
  will-change: transform;
  transform: translate3d(0, var(--parallax-y, 0), 0);
}

/* card-tilt — JS sets --rx/--ry/--mx/--my, CSS reacts */
.tilt {
  will-change: transform;
  transition: transform .35s cubic-bezier(0.18, 0.9, 0.32, 1.28);
  transform-style: preserve-3d;
}
.tilt:hover {
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateZ(8px);
}
.tilt .tilt-inner {
  transform-style: preserve-3d;
  transform: translateZ(30px);
}

/* marquee */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marquee-x 28s linear infinite;
  padding-right: 3rem;
}
@keyframes marquee-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--brand-ink);
  white-space: nowrap;
}
.marquee-item .dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--brand-primary);
  border-radius: 50%;
  margin: 0 2rem;
  vertical-align: middle;
}

/* cursor follower removed — using browser default cursor */

/* smooth-scroll body class while Lenis is active */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* fade-in helper (still used for non-mask reveals) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(0.18, 0.9, 0.32, 1), transform .9s cubic-bezier(0.18, 0.9, 0.32, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal.is-visible.reveal-up, .reveal.is-visible.reveal-left, .reveal.is-visible.reveal-right { transform: translate(0,0); }

/* staggered children */
.stagger > * { transition-delay: 0ms; }
.stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .mask-reveal { opacity: 1; clip-path: none; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .parallax { transform: none; }
}
