/* ===== SHOWPIECE EFFECTS =====
   Loaded last on every page; effects.js activates these.
   Everything here is decorative — effects.js bails out entirely
   under prefers-reduced-motion. */

/* ===== Split headline reveal (word-by-word rise) ===== */
.split .split-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  /* keep descenders un-clipped inside the mask */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.split .split-w > span {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 850ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 50ms);
}

.split.split-in .split-w > span {
  transform: translateY(0);
}

/* ===== Cinematic image settle (zoom out as it enters) ===== */
.img-reveal {
  transform: scale(1.22);
  transition: transform 1300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.img-reveal.img-in {
  transform: scale(1);
}

/* ===== Card tilt (JS drives transform; this makes it snappy) ===== */
.tilt {
  transition: transform 200ms ease, box-shadow 300ms ease, border-color 300ms ease;
  will-change: transform;
}

/* ===== Marquee band (home) ===== */
.marquee {
  overflow: hidden;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: baseline;
  gap: 3.5rem;
  padding-right: 3.5rem;
}

.marquee-group span {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}

.marquee-group span.outline {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(23, 28, 36, 0.3);
}

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

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(23, 28, 36, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  border-radius: var(--radius);
  transform: scale(0.94);
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

.lightbox button:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    bottom: 1.5rem;
    top: auto;
  }

  .lightbox-prev {
    left: 25%;
  }

  .lightbox-next {
    right: 25%;
  }
}

/* ===== Custom "View" cursor over gallery images ===== */
.cursor-pill {
  position: fixed;
  z-index: 3500;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cursor-pill.show {
  transform: translate(-50%, -50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}
