/* ==========================================================================
   STRATA — MOTION LAYER
   --------------------------------------------------------------------------
   Sits on top of styles.css. Everything here is additive: if this file or
   js/strata-motion.js fails to load, the original site renders unchanged.

   The visual language: horizontal "strata". The striations in the Strata
   logo become every wipe, transition, light streak, and reveal on the site —
   paired with film grammar: rack focus, depth of field, anamorphic light,
   letterbox framing, and the rhythm of an edit.

   Flags (set on <html>):
     .js            — JS is running
     .motion        — full motion system active (GSAP loaded, no reduced-motion)
     .has-cursor    — custom cursor active (fine pointer, desktop)
     .is-arriving   — page is mid page-transition (cover is up)
     .reduced-motion — user prefers reduced motion
   ========================================================================== */

:root {
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out-expo: cubic-bezier(.87, 0, .13, 1);
  --ease-cine: cubic-bezier(.7, 0, .2, 1);
}

/* --------------------------------------------------------------------------
   0. Page-arrival cover (painted before JS runs, so there is never a flash
      of the new page before the transition bands leave). Self-clears after
      2.4s even if JS never loads.
   -------------------------------------------------------------------------- */
html.is-arriving::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #050505;
  pointer-events: none;
  animation: stArriveSafety 0s linear 2.4s forwards;
}
@keyframes stArriveSafety { to { visibility: hidden; opacity: 0; } }

/* Hold reveals until the motion layer has staged the page (head script
   clears this after 3.5s no matter what). */
.st-wait .reveal { opacity: 0 !important; transition: none !important; }

/* --------------------------------------------------------------------------
   1. Smooth scroll (Lenis) housekeeping
   -------------------------------------------------------------------------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

/* --------------------------------------------------------------------------
   2. Reveal upgrade — the old fade-up becomes a "rack focus":
      elements arrive out of focus and resolve sharp.
   -------------------------------------------------------------------------- */
.motion .reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  filter: blur(10px);
  transition:
    opacity 1.1s var(--ease-out-expo),
    transform 1.3s var(--ease-out-expo),
    filter 1.1s var(--ease-out-expo);
}
.motion .reveal.in { opacity: 1; transform: none; filter: blur(0); }
.motion .reveal.delay-1 { transition-delay: 110ms; }
.motion .reveal.delay-2 { transition-delay: 220ms; }
.motion .reveal.delay-3 { transition-delay: 330ms; }
.motion .reveal.delay-4 { transition-delay: 440ms; }

/* Split-text pieces */
.st-line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.st-word { display: inline-block; will-change: transform, filter, opacity; }
.st-char { display: inline-block; }
.st-expose .st-word { will-change: opacity; }

/* --------------------------------------------------------------------------
   3. Page transition — "strata cut"
   -------------------------------------------------------------------------- */
.st-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.st-transition.is-active { visibility: visible; pointer-events: all; }
.st-band { position: relative; flex: 1 1 0; overflow: hidden; }
.st-band i {
  position: absolute;
  inset: -1px 0;            /* overlap by 1px to avoid hairline seams */
  transform: scaleX(0);
  transform-origin: left center;
}
.st-band .a { background: var(--accent); }
.st-band .b { background: #050505; }
.st-transition__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
}
.st-transition__label-inner { text-align: center; overflow: hidden; }
.st-transition__kicker {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  opacity: 0;
}
.st-transition__title {
  display: block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(44px, 8vw, 120px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 80;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   4. Custom cursor + framing guides (desktop / fine pointer only)
   -------------------------------------------------------------------------- */
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor .tile,
.has-cursor [data-gallery], .has-cursor .ind, .has-cursor label { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }

.st-cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
}
.st-cursor.is-visible { opacity: 1; }
.st-cursor.is-hidden { opacity: 0 !important; }
.st-cursor__dot,
.st-cursor__ring,
.st-cursor__label {
  position: absolute;
  top: 0; left: 0;
  will-change: transform;
}
.st-cursor__dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--accent);
}
.st-cursor__ring {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 1px solid rgba(240, 237, 230, 0.38);
  transition: width 420ms var(--ease-out-expo), height 420ms var(--ease-out-expo),
              margin 420ms var(--ease-out-expo), border-color 300ms ease,
              background-color 300ms ease, opacity 300ms ease;
}
.st-cursor.is-link .st-cursor__ring {
  width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-color: rgba(243, 112, 33, 0.7);
  background-color: rgba(243, 112, 33, 0.08);
}
.st-cursor.is-label .st-cursor__ring { opacity: 0; }
.st-cursor.is-label .st-cursor__dot { opacity: 0; }
.st-cursor__label {
  display: grid;
  place-items: center;
  width: 92px; height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink-dark);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  scale: 0;
  transition: scale 520ms var(--ease-out-expo);
}
.st-cursor__label span { display: block; transform: translateX(0.1em); }
.st-cursor.is-label .st-cursor__label { scale: 1; }
.st-cursor.is-text .st-cursor__ring { opacity: 0; }

/* Framing guides — four corner brackets that lock onto a project */
.st-frame {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
}
.st-frame i {
  position: absolute;
  width: 22px; height: 22px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}
.st-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.st-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.st-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.st-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* --------------------------------------------------------------------------
   5. Buttons — magnetic + a wipe fill instead of a flat color swap
   -------------------------------------------------------------------------- */
.motion .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 420ms var(--ease-cine), border-color 420ms var(--ease-cine);
}
.motion .btn::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 560ms var(--ease-cine);
}
.motion .btn:hover { background: transparent; }
.motion .btn:hover::before { transform: scaleX(1); transform-origin: left center; }
.motion .btn--accent:hover { background: var(--accent); }
.motion .btn--dark::before { background: var(--ink-dark); }
.motion .btn .st-btn-inner { display: inline-flex; align-items: center; gap: 12px; will-change: transform; }
.motion .btn .arrow { transition: transform 560ms var(--ease-cine); }
.motion .btn:hover .arrow { transform: translateX(5px); }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Link text roll — the label slides up and its twin rolls in from below */
.st-roll { display: inline-block; position: relative; overflow: hidden; vertical-align: top; }
.st-roll__a, .st-roll__b { display: block; transition: transform 520ms var(--ease-cine); }
.st-roll__b { position: absolute; left: 0; top: 100%; color: var(--ink); }
a:hover > .st-roll .st-roll__a,
a:focus-visible > .st-roll .st-roll__a { transform: translateY(-100%); }
a:hover > .st-roll .st-roll__b,
a:focus-visible > .st-roll .st-roll__b { transform: translateY(-100%); }
.nav__links a.is-active .st-roll__b { color: var(--accent); }

/* --------------------------------------------------------------------------
   6. Nav — hides on scroll down, returns on scroll up; mobile menu
   -------------------------------------------------------------------------- */
.motion .nav { transition: background var(--t-med), padding var(--t-fast), transform 700ms var(--ease-cine); }
.motion .nav.is-tucked { transform: translateY(-110%); }
.nav__links a.is-active::after { width: 100%; background: var(--accent); }

.st-burger {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(5,5,5,0.4);
  color: var(--ink);
  cursor: pointer;
  z-index: 3;
}
.st-burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: currentColor;
  transition: transform 500ms var(--ease-cine), width 500ms var(--ease-cine), top 500ms var(--ease-cine);
}
.st-burger span:nth-child(1) { top: 18px; }
.st-burger span:nth-child(2) { top: 26px; right: 19px; }
.st-burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.st-burger[aria-expanded="true"] span:nth-child(2) { top: 22px; right: 13px; transform: rotate(-45deg); }
@media (max-width: 820px) {
  .js .st-burger { display: block; }
  .js .nav__cta { display: none; }
}

.st-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  visibility: hidden;
}
.st-menu.is-open { visibility: visible; }
.st-menu__bands { position: absolute; inset: 0; display: flex; flex-direction: column; }
.st-menu__bands .st-band { flex: 1; }
.st-menu__inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px var(--gutter) 36px;
}
.st-menu__links { list-style: none; display: grid; gap: 4px; }
.st-menu__links li { overflow: hidden; }
.st-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(42px, 12vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.st-menu__links a small {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.st-menu__links a.is-active { font-style: italic; color: var(--accent); }
.st-menu__foot { display: grid; gap: 18px; }
.st-menu__foot .btn { justify-content: center; }
.st-menu__contact {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12px; letter-spacing: 0.08em; color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   7. Brand intro — the logo assembles from its own striations
   -------------------------------------------------------------------------- */
.motion .intro__logo { visibility: hidden; animation: none; }
.intro.is-sliced { background: transparent; }
.intro.is-sliced .intro__logo { visibility: hidden; animation: none; }
.intro__bands { position: absolute; inset: 0; display: flex; flex-direction: column; }
.intro__bands div { flex: 1; background: #050505; margin: -0.5px 0; }
.intro__mark {
  position: absolute;
  left: 50%; top: 50%;
  width: min(58vw, 460px);
  aspect-ratio: 1000 / 243;
  transform: translate(-50%, -50%);
}
.intro__slice {
  position: absolute;
  left: 0; right: 0;
  background-repeat: no-repeat;
  background-size: 100% auto;
  will-change: transform, opacity;
}
.intro__streak {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, #ffd9bf 50%, var(--accent) 70%, transparent);
  transform: scaleX(0);
  opacity: 0.9;
}

/* --------------------------------------------------------------------------
   8. Homepage hero — letterbox, anamorphic light, push-in
   -------------------------------------------------------------------------- */
.motion .hero__video {
  --hero-in: 1;
  --hero-push: 1;
  animation: none;
  scale: calc(1.04 * var(--hero-in, 1) * var(--hero-push, 1));
  transform-origin: 50% 45%;
}
.motion .hero__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.22) 42%, rgba(0,0,0,0) 68%);
}
.hero__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.hero__gl.is-on { opacity: 1; }
.hero__bar {
  position: absolute;
  left: 0; right: 0;
  height: 13vh;
  background: #050505;
  z-index: 0;
  pointer-events: none;
}
.hero__bar--top { top: 0; transform-origin: top; }
.hero__bar--bot { bottom: 0; transform-origin: bottom; }
.motion .hero .container { will-change: transform, opacity; }
.motion .hero h1 em { transition: text-shadow 1.2s ease; }
.motion .hero h1 em.is-lit { text-shadow: 0 0 42px rgba(243,112,33,0.55), 0 2px 24px rgba(0,0,0,0.45); }
.motion .hero .eyebrow.st-track { letter-spacing: 0.6em; opacity: 0; }

/* --------------------------------------------------------------------------
   9. Marquee — scroll-velocity driven (JS), CSS loop paused
   -------------------------------------------------------------------------- */
.motion .marquee__track.st-driven { animation: none; will-change: transform; }

/* --------------------------------------------------------------------------
   10. Focus-pull reel (homepage)
       Whatever is in focus plays. Everything else is a still.
   -------------------------------------------------------------------------- */
.reel {
  position: relative;
  background: var(--bg);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.reel__pin {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(90px, 12vh, 130px) 0 clamp(40px, 6vh, 70px);
}
.reel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4.5vh, 52px);
  width: 100%;
}
.reel__head h2 {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 300;
  margin-top: 18px;
  max-width: 16ch;
}
.reel__head h2 em { font-style: italic; color: var(--accent); }
.reel__head-right { display: flex; align-items: center; gap: 28px; }
.reel__count {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.reel__count b { color: var(--accent); font-weight: 300; }
.reel__viewport {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 0 18px;
}
.reel__viewport::-webkit-scrollbar { display: none; }
.reel__track {
  list-style: none;
  display: flex;
  gap: clamp(18px, 3vw, 48px);
  padding: 0 calc((100vw - min(78vw, 340px)) / 2);
  width: max-content;
}
.reel__frame {
  flex: 0 0 auto;
  width: min(78vw, 340px);
  scroll-snap-align: center;
}
.reel__link { display: block; color: inherit; }
.reel__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elev-2);
  transform-origin: 50% 60%;
  transition: filter 900ms var(--ease-out-expo);
  filter: blur(3px) brightness(0.5) saturate(0.7);
  will-change: transform;
}
.reel__frame.is-focus .reel__media { filter: none; }
.reel__media img, .reel__media video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.reel__media video { opacity: 0; transition: opacity 500ms ease; }
.reel__media video.is-playing { opacity: 1; }
.reel__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.55));
  pointer-events: none;
}
.reel__tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5,5,5,0.55);
  border: 1px solid var(--line-strong);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 500ms ease, transform 500ms var(--ease-out-expo);
}
.reel__tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.reel__frame.is-live .reel__tag { opacity: 1; transform: none; }
.reel__cap { padding-top: 16px; opacity: 0.35; transition: opacity 700ms ease; }
.reel__frame.is-focus .reel__cap { opacity: 1; }
.reel__cap-top {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-muted);
}
.reel__cap-top .num {
  font-family: 'Fraunces', serif; font-style: italic; font-size: 18px;
  letter-spacing: 0; text-transform: none; color: var(--accent); line-height: 1;
}
.reel__cap h3 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 1.8vw, 26px);
  margin-top: 6px;
}
.reel__bands {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.reel__bands i { flex: 1; transform: scaleX(0); transform-origin: left; }
.reel__bands i:nth-child(odd) { background: var(--accent); }
.reel__bands i:nth-child(even) { background: #050505; }
.reel__progress {
  position: relative;
  height: 1px;
  background: var(--line);
  margin-top: clamp(18px, 3vh, 34px);
}
.reel__progress span {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* Desktop pinned version: JS moves the track horizontally as you scroll */
@media (min-width: 821px) {
  .motion .reel__viewport { overflow: visible; scroll-snap-type: none; }
  .motion .reel__track { padding: 0 var(--gutter); }
  .motion .reel__frame { width: auto; }
  .motion .reel__media { height: min(50vh, 540px); aspect-ratio: 4 / 5; }
  .motion .reel__pin { height: 100vh; min-height: 640px; padding: clamp(80px, 11vh, 120px) 0 clamp(24px, 4vh, 48px); }
  .motion .reel__track { will-change: transform; }
  .reel__frame { width: min(30vw, 360px); }
  .reel__track { padding: 0 var(--gutter); }
}

/* --------------------------------------------------------------------------
   11. Portfolio tiles — depth, clip reveals, hover video, strata wipe
   -------------------------------------------------------------------------- */
.motion .tile { transform-style: preserve-3d; will-change: transform; }
.motion .tile__img { scale: calc(1.12 * var(--rv, 1)); translate: 0 var(--py, 0%); }
.tile__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
}
.tile__video.is-playing { opacity: 1; }
.tile__bands {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.tile__bands i { flex: 1; transform: scaleX(0); transform-origin: left; }
.tile__bands i:nth-child(odd) { background: var(--accent); }
.tile__bands i:nth-child(even) { background: #050505; }
.tile .play-pill { transition: background 400ms ease, transform 600ms var(--ease-out-expo); }
.tile:hover .play-pill { background: rgba(243,112,33,0.9); color: var(--ink-dark); transform: translateY(-2px); }
.tile:hover .play-pill::before { border-left-color: var(--ink-dark); }
.motion .tile .tile__bottom h3 { transition: transform 700ms var(--ease-out-expo); }
.motion .tile:hover .tile__bottom h3 { transform: translateX(6px); }
.tile__live {
  position: absolute; left: 24px; top: 24px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink);
  opacity: 0; transition: opacity 400ms ease;
}
.tile__live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tile.is-previewing .tile__live { opacity: 1; }
.tile.is-previewing .tile__top { opacity: 0; }
.tile__top { transition: opacity 400ms ease; }

/* --------------------------------------------------------------------------
   12. Spotlight surfaces — light follows the cursor across a card
   -------------------------------------------------------------------------- */
[data-spot] { position: relative; isolation: isolate; }
[data-spot]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 500ms ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(243,112,33,0.14), transparent 60%);
}
[data-spot]:hover::after { opacity: 1; }

/* Featured package — a slow band of light travels the border */
@property --st-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.motion .pkg--featured::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--st-ang), transparent 0 70%, rgba(255,214,186,0.95) 80%, var(--accent) 86%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  animation: stOrbit 6s linear infinite;
  opacity: 1;
  z-index: 1;
}
@keyframes stOrbit { to { --st-ang: 360deg; } }
.motion .pkg { transform-style: preserve-3d; will-change: transform; }
.motion .pkg__list li { transition: transform 500ms var(--ease-out-expo), color 400ms ease; }
.motion .pkg:hover .pkg__list li { color: var(--ink); }

/* --------------------------------------------------------------------------
   13. Services — rows laid down like clips on a timeline
   -------------------------------------------------------------------------- */
.motion .cap { position: relative; transition: padding-left var(--t-med); }
.motion .cap::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 800ms var(--ease-cine);
}
.motion .cap:hover::before { transform: scaleX(1); transform-origin: left; }
.motion .cap:hover { background: none; }
.cap__fill {
  position: absolute; inset: 0; z-index: -1;
  display: flex; flex-direction: column; pointer-events: none;
}
.cap__fill i {
  flex: 1;
  background: linear-gradient(90deg, rgba(243,112,33,0.10), rgba(243,112,33,0.0) 75%);
  transform: scaleX(0); transform-origin: left;
  transition: transform 700ms var(--ease-cine);
}
.motion .cap { isolation: isolate; }
.motion .cap:hover .cap__fill i { transform: scaleX(1); }
.motion .cap:hover .cap__fill i:nth-child(2) { transition-delay: 50ms; }
.motion .cap:hover .cap__fill i:nth-child(3) { transition-delay: 100ms; }
.motion .cap:hover .cap__fill i:nth-child(4) { transition-delay: 150ms; }
.motion .cap__title { transition: transform 700ms var(--ease-out-expo); }
.motion .cap:hover .cap__title { transform: translateX(8px); }

/* Bone sections open like a frame — set by JS */
.st-frame-open { will-change: clip-path; }

/* --------------------------------------------------------------------------
   14. About — portrait develops, process timeline draws
   -------------------------------------------------------------------------- */
.motion .portrait { will-change: clip-path; }
.motion .portrait__img { scale: var(--pz, 1); }
.process-grid { position: relative; }
.st-process-line {
  position: absolute;
  left: 0; right: 0; top: 28px;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.st-process-line span {
  position: absolute; inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
@media (max-width: 820px) { .st-process-line { display: none; } }
.motion .process .step { position: relative; }
.motion .process .step__num {
  display: inline-block;
  background: var(--bg);
  padding-right: 18px;
  position: relative;
  z-index: 1;
  transition: color 600ms ease, text-shadow 600ms ease;
}
.motion .process .step:not(.is-lit) .step__num { color: var(--ink-faint); }
.motion .process .step.is-lit .step__num { text-shadow: 0 0 30px rgba(243,112,33,0.45); }

/* --------------------------------------------------------------------------
   15. CTA — the light follows you, and comes up as you arrive
   -------------------------------------------------------------------------- */
.motion .cta {
  background:
    radial-gradient(ellipse 60% 50% at var(--gx, 50%) var(--gy, 50%), rgba(243,112,33, calc(0.24 * var(--glow, 0.6))), transparent 70%),
    linear-gradient(180deg, #080808 0%, #020202 100%);
}
.motion .cta h2 em { display: inline-block; }

/* Trusted logos — sliced in */
.motion .trusted__logo.st-sliced { opacity: 0; }

/* --------------------------------------------------------------------------
   16. Quote form — focus light, sending state, success draw
   -------------------------------------------------------------------------- */
.motion .field input,
.motion .field textarea {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: border-color var(--t-fast), background-color var(--t-fast), background-size 700ms var(--ease-cine);
}
.motion .field input:focus,
.motion .field textarea:focus { background-size: 100% 2px; }
.motion .field label { transition: color 400ms ease, letter-spacing 600ms var(--ease-out-expo); }
.motion .field:focus-within label { color: var(--accent); letter-spacing: 0.2em; }
.motion .field.invalid { animation: stNudge 420ms var(--ease-out-expo); }
@keyframes stNudge { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-2px); } }

.quote-submit[disabled] { position: relative; }
.quote-submit[disabled]::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ink-dark), transparent);
  animation: stSending 1.1s var(--ease-cine) infinite;
}
@keyframes stSending { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.motion .quote-success.show .quote-success__mark { animation: stPop 900ms var(--ease-out-expo) both; }
.motion .quote-success.show .quote-success__mark path {
  stroke-dasharray: 30; stroke-dashoffset: 30;
  animation: stDraw 700ms var(--ease-cine) 350ms forwards;
}
.motion .quote-success.show h3,
.motion .quote-success.show p,
.motion .quote-success.show .btn { animation: stRise 900ms var(--ease-out-expo) both; }
.motion .quote-success.show h3 { animation-delay: 300ms; }
.motion .quote-success.show p { animation-delay: 420ms; }
.motion .quote-success.show .btn { animation-delay: 540ms; }
@keyframes stPop { from { transform: scale(0.4); opacity: 0; } }
@keyframes stDraw { to { stroke-dashoffset: 0; } }
@keyframes stRise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

/* --------------------------------------------------------------------------
   17. Lightbox — opens like a shutter
   -------------------------------------------------------------------------- */
.motion .lightbox__img { transition: none; }
.lightbox__bands {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; pointer-events: none;
}
.lightbox__bands i { flex: 1; transform: scaleX(0); transform-origin: left; }
.lightbox__bands i:nth-child(odd) { background: var(--accent); }
.lightbox__bands i:nth-child(even) { background: #050505; }
.lightbox__frame { position: relative; display: inline-block; max-width: 100%; }

/* --------------------------------------------------------------------------
   18. Footer + misc polish
   -------------------------------------------------------------------------- */
.motion .footer__col a { display: inline-block; transition: color var(--t-fast), transform 500ms var(--ease-out-expo); }
.motion .footer__col a:hover { transform: translateX(4px); }
.motion .contact-item { transition: transform 600ms var(--ease-out-expo); }
.motion .contact-item:hover { transform: translateY(-3px); }
::selection { background: var(--accent); color: var(--ink-dark); }

/* --------------------------------------------------------------------------
   19. Reduced motion — calm, complete, nothing hidden
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.is-arriving::after { display: none; }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .marquee__track { animation-duration: 120s; }
  .hero__cue .line::after { animation: none; }
  .reel__media { filter: none; transition: none; }
  .reel__cap { opacity: 1; }
  .reel__frame { width: min(78vw, 340px); }
  .pkg--featured::after { animation: none; }
  .st-transition, .st-cursor, .st-frame, .hero__gl { display: none !important; }
}

/* --------------------------------------------------------------------------
   20. Layout refinements
   -------------------------------------------------------------------------- */
/* Tile header: number and category stack on the left so they never sit
   under the "Watch on YouTube" pill on narrow tiles. */
.tile__top { flex-direction: column; align-items: flex-start; gap: 10px; }
/* Narrow quad tiles: a tighter pill so it clears the project number */
.work__quad .play-pill { letter-spacing: 0.14em; padding: 7px 10px; }
/* Quote page has no page-hero: give the headline room below the fixed nav */
body .quote-wrap { padding-top: clamp(118px, 15vh, 160px); }
/* Cards driven by JS tilt: don't let the CSS transform transition fight it */
.motion .ind, .motion .pkg { transition-property: border-color, background, background-color, box-shadow; }
.motion .ind:hover, .motion .pkg:hover { transform: none; }
