/* ============================================================================
   Motion layer — parallax / split-text / marquee / ambience.
   Loaded after styles.css. Every rule is scoped to .ta-fx (or .fx-boot), which
   js/motion.js adds ONLY when the visitor does not prefer reduced motion, so
   this whole file is inert for reduced-motion visitors and without the script.
   ========================================================================== */

/* ---------- parallax plumbing ---------- */
/* bleed layer created by motion.js inside overflow-hidden media frames; the
   layer is taller than its frame so per-frame translates never expose edges */
.ta-fx .ta-px { position: absolute; left: 0; right: 0; will-change: transform; }
.ta-fx .ta-px > .bg-image,
.ta-fx .ta-px > .work-block-video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- boot choreography: nav + hero stagger in after the preloader ---------- */
@keyframes ta-rise { from { opacity: 0; transform: translateY(42px); } to { opacity: 1; transform: none; } }
@keyframes ta-nav-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.ta-fx .menu .menu-content-wrapper { opacity: 0; }
.ta-fx.fx-boot .menu .menu-content-wrapper { animation: ta-nav-in .8s cubic-bezier(.19,.8,.22,1) .15s both; }
.ta-fx .hero-home-inner > * { opacity: 0; }
.ta-fx.fx-boot .hero-home-inner > * { animation: ta-rise 1s cubic-bezier(.19,.8,.22,1) both; }
.ta-fx.fx-boot .hero-home-inner > :nth-child(1) { animation-delay: .08s; }
.ta-fx.fx-boot .hero-home-inner > :nth-child(2) { animation-delay: .22s; }
.ta-fx.fx-boot .hero-home-inner > :nth-child(3) { animation-delay: .36s; }
.ta-fx.fx-boot .hero-home-inner > :nth-child(4) { animation-delay: .48s; }
.ta-fx.fx-boot .hero-home-inner > :nth-child(5) { animation-delay: .58s; }

/* ---------- hero testimonials: masked word-cascade on every rotation ---------- */
.ta-fx .ht-quote .swm { display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: .14em; margin-bottom: -.14em; }
.ta-fx .ht-quote .swi { display: inline-block; opacity: 0; transform: translateY(112%);
  transition: transform .6s cubic-bezier(.19,.8,.22,1), opacity .35s ease; }
.ta-fx .ht-slide.is-active .ht-quote .swi { opacity: 1; transform: none;
  transition-delay: calc(var(--i, 0) * .028s); }
.ta-fx .ht-slide .ht-by { opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.19,.8,.22,1); }
.ta-fx .ht-slide.is-active .ht-by { opacity: 1; transform: none; transition-delay: .38s; }

/* ---------- section heading: masked word reveal on scroll (adds .fx-in) ---------- */
.ta-fx .work-section-head .h2 .swm { display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: .12em; margin-bottom: -.12em; }
.ta-fx .work-section-head .h2 .swi { display: inline-block; opacity: 0; transform: translateY(110%) rotate(3deg);
  transition: transform .7s cubic-bezier(.19,.8,.22,1), opacity .4s ease; }
.ta-fx .work-section-head .h2.fx-in .swi { opacity: 1; transform: none;
  transition-delay: calc(var(--i, 0) * .045s); }
.ta-fx .work-section-head .work-section-note { opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease .35s, transform .6s cubic-bezier(.19,.8,.22,1) .35s; }
.ta-fx .work-section-head:has(.h2.fx-in) .work-section-note { opacity: .6; transform: none; }

/* ---------- work cards: staggered rise + clip reveal + pointer sheen ---------- */
@keyframes ta-card-in { from { opacity: 0; transform: translateY(64px) scale(.985); }
  to { opacity: 1; transform: none; } }
@keyframes ta-card-clip { from { clip-path: inset(10% 5% 10% 5% round 18px); }
  to { clip-path: inset(0 0 0 0 round 10px); } }
.ta-fx .collection-item.is-in { animation: ta-card-in 1s cubic-bezier(.16,.84,.28,1) var(--d, 0ms) both; }
.ta-fx .collection-item.is-in .work-block-video-wrapper {
  animation: ta-card-clip 1.05s cubic-bezier(.16,.84,.28,1) var(--d, 0ms) both; }
/* tilt (transform set per-move by JS; transition makes it elastic) */
.ta-fx .work-block { transition: transform .5s cubic-bezier(.2,.7,.2,1); will-change: transform; }
/* pointer-tracking sheen over the media */
.ta-fx .work-block-video-wrapper::after { content: ""; position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.13), transparent 62%);
  opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.ta-fx .work-block:hover .work-block-video-wrapper::after { opacity: 1; }

/* ---------- velocity-reactive marquee strip (between hero and work) ---------- */
.ta-fx .ta-marquee { overflow: hidden; white-space: nowrap; padding: 22px 0; user-select: none;
  border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.ta-fx .ta-marquee-track { display: inline-flex; align-items: center; will-change: transform; }
.ta-fx .ta-mq-group { display: inline-flex; align-items: center; }
.ta-fx .ta-mq-item { font-size: clamp(11px, 0.85vw, 14px); font-weight: 600; text-transform: uppercase;
  letter-spacing: .2em; opacity: .7; padding: 0 22px; }
.ta-fx .ta-mq-star { font-size: .75em; color: #ff9900; opacity: .6; }

/* ---------- magnetic buttons ---------- */
.ta-fx .ta-mag { transition: transform .45s cubic-bezier(.22,.68,.32,1.15); will-change: transform; }

/* ---------- ambience: aurora orbs behind the content + film grain on top ---------- */
.ta-fx .ta-orb { position: fixed; z-index: -1; aspect-ratio: 1; border-radius: 50%;
  filter: blur(90px); pointer-events: none; will-change: transform; }
.ta-fx .ta-orb-1 { width: 46vw; min-width: 340px; top: -12vh; left: -10vw;
  background: radial-gradient(circle, rgba(255,153,0,.17), transparent 68%); }
.ta-fx .ta-orb-2 { width: 40vw; min-width: 300px; top: 46vh; right: -12vw;
  background: radial-gradient(circle, rgba(84,110,255,.15), transparent 68%); }
@keyframes ta-grain-jitter {
  0% { transform: translate(0,0); } 12% { transform: translate(-2%,1.5%); }
  25% { transform: translate(1.5%,-2%); } 37% { transform: translate(-1%,-1%); }
  50% { transform: translate(2%,1%); } 62% { transform: translate(-2%,-1.5%); }
  75% { transform: translate(1%,2%); } 87% { transform: translate(-1.5%,.5%); }
  100% { transform: translate(0,0); } }
.ta-fx .ta-grain { position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
  z-index: 9000; pointer-events: none; opacity: .045; will-change: transform;
  animation: ta-grain-jitter 1.2s steps(8) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- project overlay: cinematic entrance + scroll reveals ---------- */
/* headline: per-character masked rise (plays on every project render via .fx-live) */
.ta-fx #project-overlay .hero-h1 .cw { display: inline-block; white-space: nowrap; }
.ta-fx #project-overlay .hero-h1 .cwm { display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: .1em; margin-bottom: -.1em; }
.ta-fx #project-overlay .hero-h1 .cwi { display: inline-block; transform: translateY(108%) rotate(5deg);
  transition: transform .75s cubic-bezier(.19,.8,.22,1) calc(.12s + var(--i, 0) * .02s); }
.ta-fx #project-overlay .po-content.fx-live .hero-h1 .cwi { transform: none; }
/* meta line + buttons rise after the headline */
.ta-fx #project-overlay .po-content .hero-details-wrapper .details,
.ta-fx #project-overlay .po-content .hero-buttons { opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease .5s, transform .6s cubic-bezier(.19,.8,.22,1) .5s; }
.ta-fx #project-overlay .po-content.fx-live .hero-details-wrapper .details,
.ta-fx #project-overlay .po-content.fx-live .hero-buttons { opacity: 1; transform: none; }
/* hero media: slow settle from a zoomed start (Ken Burns), on top of the parallax layer */
@keyframes ta-kb { from { scale: 1.14; } to { scale: 1; } }
.ta-fx #project-overlay .bg-video-wrapper .work-block-video { animation: ta-kb 2.2s cubic-bezier(.2,.7,.2,1) both; }

/* scroll reveals inside the overlay (motion.js adds .fx-wait below the fold,
   then .fx-in as each block scrolls into view) */
.ta-fx #project-overlay .fx-wait { opacity: 0; transform: translateY(38px); animation: none !important; }
.ta-fx #project-overlay .fx-in { opacity: 1; transform: none;
  transition: opacity .75s ease var(--d, 0ms), transform .75s cubic-bezier(.19,.8,.22,1) var(--d, 0ms); }
.ta-fx #project-overlay .images-content .image.fx-wait { transform: translateY(46px) scale(.97); }

/* ---------- contact lightbox: staggered card entrance ---------- */
.ta-fx #contact-overlay .co-card > * { opacity: 0; transform: translateY(28px);
  transition: opacity .55s ease, transform .55s cubic-bezier(.19,.8,.22,1); }
.ta-fx #contact-overlay.is-open .co-card > * { opacity: 1; transform: none; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(1) { transition-delay: .12s; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(2) { transition-delay: .2s; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(3) { transition-delay: .28s; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(4) { transition-delay: .36s; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(5) { transition-delay: .44s; }
.ta-fx #contact-overlay.is-open .co-card > :nth-child(6) { transition-delay: .52s; }
.ta-fx #contact-overlay .co-lead { opacity: 0; }
.ta-fx #contact-overlay.is-open .co-lead { opacity: .58; }

/* ---------- small screens: keep it lively but lighter ---------- */
@media (max-width: 700px) {
  .ta-fx .ta-orb { filter: blur(60px); }
  .ta-fx .ta-mq-item { padding: 0 16px; }
}

/* ============================================================================
   Below here: NOT motion — always-on UI added with the overhaul.
   ========================================================================== */

/* ---------- desktop type tuning: Role / Team / Based stats read too small ---------- */
@media (min-width: 1100px) {
  .hero-home-stats .highlight-block > .body-font.opacity { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
  .hero-home-stats .highlights .body-font { font-size: 19px; font-weight: 600; }
  .hero-home-stats .highlight-block { min-width: 150px; }
}

/* ---------- personalised hero greeting (inserted by js/track.js) ---------- */
.hero-greet { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; line-height: 1.25; }
.hero-greet-hi { position: relative; font-size: clamp(24px, 2.2vw, 34px); font-weight: 750; letter-spacing: -.02em;
  background: linear-gradient(100deg, #ffdca6 0%, #ffb84d 48%, #ff9900 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 2px; }
.hero-greet-hi::after { content: ""; position: absolute; left: 1px; bottom: -5px; height: 2px; width: calc(100% - 2px);
  background: linear-gradient(90deg, #ff9900, rgba(255,153,0,0)); border-radius: 2px; }
.hero-greet-hand { font-size: clamp(22px, 2vw, 30px); display: inline-block; align-self: center; }
.hero-greet-rest { font-size: clamp(16px, 1.35vw, 20px); font-weight: 500; color: rgba(242,242,242,.62); }
.hero-greet-rest b { color: #fff; font-weight: 650; }
/* choreography: underline draws itself in, the hand gives a little wave */
.ta-fx .hero-greet-hi::after { transform: scaleX(0); transform-origin: left;
  transition: transform .8s cubic-bezier(.19,.8,.22,1) 1s; }
.ta-fx.fx-boot .hero-greet-hi::after { transform: scaleX(1); }
@keyframes ta-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(24deg); }
  40% { transform: rotate(-9deg); } 60% { transform: rotate(18deg); } 80% { transform: rotate(-4deg); } }
.ta-fx.fx-boot .hero-greet-hand { animation: ta-wave 1.5s ease 1.15s 1; transform-origin: 72% 82%; }
