/* =========================================================
   Motion layer — Ali & Jaiswal Realestate
   Works with js/motion.js. Everything here is switched on only when
   <html> has .js-motion (set in <head>, skipped for reduced-motion users),
   so the site still reads perfectly without JavaScript.
   ========================================================= */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- 1. Splash: "from blueprint to building" (index, every normal load) ----------
   A blueprint sheet tilts into perspective, the site plan drafts itself, then the
   buildings extrude out of the sheet as gold wireframe volumes (pure CSS 3D, no library).
   Clock: the progress bar (.splash-bar::after, 3s) is the master timeline; js/motion.js
   reads it for the % counter and starts the exit when it ends. Only transform/opacity
   animate. Safety nets: head snippet (4s / 7s) and the spGone animation below (8s). */
.splash { display: none; }
.js-intro { scrollbar-gutter: stable; }          /* no width jump when the scrollbar comes back */
.js-intro body { overflow: hidden; }
.js-intro .splash {
  --u: min(1.2px, calc(100vw / 680), calc(100vh / 880));   /* one "plan unit" */
  --g: 201, 162, 39;
  display: block; position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  background: var(--navy); color: var(--gold); font-family: var(--font-body);
  transition: background-color .01s .25s;
  animation: spGone .4s linear 8s forwards;      /* never trap anyone, even if every script died */
}
.splash .sp-louvres, .splash .sp-sky, .splash .sp-world, .splash .sp-type, .splash .sp-hud { position: absolute; inset: 0; pointer-events: none; }

/* navy louvres: they turn edge-on (centre first) to let the page through on exit */
.sp-louvres { display: flex; perspective: 2200px; }
.sp-louvres span {
  flex: 1 1 0; margin-right: -1px; background: var(--navy); transform: rotateY(0deg) scaleX(1);
  transition: transform .62s cubic-bezier(.65, 0, .3, 1) calc(var(--o) * 50ms), opacity .2s linear calc(var(--o) * 50ms + .4s);
}

/* sun: rises behind the site with a soft glow */
.sp-sun {
  position: absolute; left: 75%; top: 33%;
  width: calc(96 * var(--u)); height: calc(96 * var(--u)); margin: calc(-48 * var(--u)) 0 0 calc(-48 * var(--u));
  opacity: 0; transform: translateY(calc(110 * var(--u))) scale(.8);
  animation: spSun 1.5s cubic-bezier(.2, .7, .2, 1) 1.55s forwards;
}
.sp-sun::before {
  content: ""; position: absolute; inset: -160%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--g), .30), rgba(var(--g), .10) 45%, transparent);
}
.sp-sun svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.sp-sun circle, .sp-sun path { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: spDraw 1s ease 1.75s forwards; }
.sp-sun circle { fill: rgba(var(--g), .16); }

/* ---- the 3D world: perspective > parallax > dolly (exit) > camera (orbit) > sheet ---- */
.sp-world { perspective: calc(1500 * var(--u)); perspective-origin: 50% 38%; transition: opacity .45s ease .25s; }
.sp-par, .sp-dolly, .sp-cam { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.sp-par { left: 50%; top: 64%; }
.sp-dolly { transition: transform .9s cubic-bezier(.5, 0, .3, 1); }
.sp-cam { animation: spCam 3.1s linear .05s both; }
.sp-sheet {
  position: absolute; transform-style: preserve-3d;
  left: calc(-500 * var(--u)); top: calc(-500 * var(--u)); width: calc(1000 * var(--u)); height: calc(1000 * var(--u));
}
/* blueprint grid; the mask fades the far edges like a shallow depth of field */
.sp-grid {
  position: absolute; inset: calc(-260 * var(--u));
  background:
    radial-gradient(closest-side, rgba(var(--g), .07), transparent 70%),
    linear-gradient(rgba(var(--g), .16) 1px, transparent 1px) 0 0 / calc(50 * var(--u)) calc(50 * var(--u)),
    linear-gradient(90deg, rgba(var(--g), .16) 1px, transparent 1px) 0 0 / calc(50 * var(--u)) calc(50 * var(--u)),
    linear-gradient(rgba(var(--g), .06) 1px, transparent 1px) 0 0 / calc(10 * var(--u)) calc(10 * var(--u)),
    linear-gradient(90deg, rgba(var(--g), .06) 1px, transparent 1px) 0 0 / calc(10 * var(--u)) calc(10 * var(--u));
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
  opacity: 0; animation: spFade .9s ease .05s forwards;
}
/* the site plan drafts itself */
.sp-plan { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sp-plan path, .sp-plan circle {
  fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: spDraw .8s var(--ease-in-out) forwards; animation-delay: calc(var(--i) * 26ms + .12s);
}
.sp-plan .thin { stroke-width: 1.4; opacity: .75; }
.sp-plan .dash { stroke-width: 1.2; opacity: .45; }
.sp-plan .dash2 { stroke-width: 1.6; opacity: .6; }
.sp-plan .tree { stroke-width: 1.2; opacity: .55; }
.sp-plan .fill { fill: rgba(var(--g), .5); }
.sp-plan text { fill: rgba(var(--g), .85); font: 600 13px/1 var(--font-body); letter-spacing: .12em; text-anchor: middle; opacity: 0; animation: spFade .6s ease 1s forwards; }
/* scanning light passes over the sheet */
.sp-scan {
  position: absolute; left: 8%; right: 8%; top: 0; height: calc(70 * var(--u));
  background: linear-gradient(rgba(var(--g), 0), rgba(var(--g), .06) 80%, rgba(255, 236, 170, .36) 98%, transparent);
  opacity: 0; transform: translateY(calc(40 * var(--u)));
  animation: spScan 1.7s cubic-bezier(.45, 0, .4, 1) .55s forwards;
}

/* buildings: a footprint box whose faces stand up; scaleZ extrudes it out of the sheet */
.sp-sheet .b {
  --fl: 20;
  position: absolute; transform-style: preserve-3d;
  left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u)); height: calc(var(--d) * var(--u));
  transform: scale3d(1, 1, .02);
  animation: spExtrude 1.05s cubic-bezier(.2, .85, .25, 1) var(--t) forwards;
}
.sp-sheet .b i, .sp-sheet .pv i, .sp-dust i { position: absolute; display: block; }
.b > .f {
  --dir: to top; --dir2: to right;
  box-sizing: border-box; border: 1px solid rgba(var(--g), .9);
  background:
    repeating-linear-gradient(var(--dir), rgba(var(--g), .42) 0 1px, transparent 1px calc(var(--fl) * var(--u))),
    linear-gradient(var(--dir), rgba(var(--g), .2), rgba(var(--g), .03));
  opacity: 0; animation: spFade .3s ease var(--t) forwards;
}
.b > .f.n, .b > .f.s { left: 0; width: 100%; height: calc(var(--h) * var(--u)); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.b > .f.n { top: calc(var(--h) * var(--u) * -1); }
.b > .f.s { top: calc((var(--d) - var(--h)) * var(--u)); }
.b > .f.w, .b > .f.e { top: 0; height: 100%; width: calc(var(--h) * var(--u)); }
.b > .f.w { --dir: to left; --dir2: to bottom; left: calc(var(--h) * var(--u) * -1); transform-origin: 100% 50%; transform: rotateY(90deg); }
.b > .f.e { --dir: to right; --dir2: to bottom; left: 100%; transform-origin: 0 50%; transform: rotateY(-90deg); }
.b > .f.r { inset: 0; transform: translateZ(calc(var(--h) * var(--u))); background: rgba(var(--g), .14); box-shadow: inset 0 0 0 calc(8 * var(--u)) rgba(14, 27, 43, .35), inset 0 0 0 calc(8 * var(--u) + 1px) rgba(var(--g), .55); }
/* the block: curtain-wall mullions */
.b.bk > .f:not(.r) {
  --fl: 24;
  background:
    repeating-linear-gradient(var(--dir), rgba(var(--g), .42) 0 1px, transparent 1px calc(var(--fl) * var(--u))),
    repeating-linear-gradient(var(--dir2), rgba(var(--g), .22) 0 1px, transparent 1px calc(17 * var(--u))),
    linear-gradient(var(--dir), rgba(var(--g), .2), rgba(var(--g), .03));
}
.b.t2 { --fl: 19; }
.b.hs { --fl: 999; }
/* tower: antenna + a vertical dimension line that draws after it has risen */
.b.tw .ant { left: 50%; top: 50%; width: 1px; height: calc(50 * var(--u)); background: var(--gold); transform-origin: 50% 0; transform: translateZ(calc(var(--h) * var(--u))) rotateX(90deg); opacity: 0; animation: spFade .3s ease calc(var(--t) + .6s) forwards; }
.b.tw .dim {
  left: calc(-44 * var(--u)); top: calc((var(--d) - var(--h)) * var(--u)); width: calc(26 * var(--u)); height: calc(var(--h) * var(--u));
  transform-origin: 50% 100%; transform: rotateX(-90deg);
  border-top: 1px solid rgba(var(--g), .8); border-bottom: 1px solid rgba(var(--g), .8);
  opacity: 0; animation: spFade .5s ease calc(var(--t) + .75s) forwards;
}
.b.tw .dim::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(var(--g), .8); transform-origin: 50% 100%; transform: scaleY(0); animation: spGrowY .7s var(--ease-out) calc(var(--t) + .8s) forwards; }
.b.tw .dim b { position: absolute; left: 50%; top: 50%; font: 600 calc(12 * var(--u))/1 var(--font-body); letter-spacing: .14em; color: var(--gold); white-space: nowrap; background: var(--navy); padding: 3px 4px; transform: translate(-50%, -50%) rotate(-90deg); }
/* house: pitched roof (two planes hinged on the eaves) */
.b.hs .rf { left: 0; width: 100%; height: calc(var(--d) * .61 * var(--u)); box-sizing: border-box; border: 1px solid rgba(var(--g), .9); background: repeating-linear-gradient(to right, rgba(var(--g), .3) 0 1px, transparent 1px calc(9 * var(--u))), rgba(var(--g), .12); opacity: 0; animation: spFade .3s ease calc(var(--t) + .1s) forwards; }
.b.hs .rf.a { top: 0; transform-origin: 50% 0; transform: translateZ(calc(var(--h) * var(--u))) rotateX(35deg); }
.b.hs .rf.b { bottom: 0; transform-origin: 50% 100%; transform: translateZ(calc(var(--h) * var(--u))) rotateX(-35deg); }
/* tower crane: lattice mast, slewing jib, hook that lowers and lifts a load */
.b.cr > .f { --fl: 14; background: repeating-linear-gradient(45deg, rgba(var(--g), .55) 0 1px, transparent 1px calc(14 * var(--u))), repeating-linear-gradient(var(--dir), rgba(var(--g), .55) 0 1px, transparent 1px calc(14 * var(--u))); }
.b.cr .jib { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--h) * var(--u))) rotateZ(-38deg); animation: spJib 3.2s cubic-bezier(.45, 0, .3, 1) 1.6s forwards; }
.b.cr .jb, .b.cr .jv, .b.cr .cw { opacity: 0; animation: spFade .3s ease calc(var(--t) + .25s) forwards; }
.b.cr .jb, .b.cr .jv { left: calc(-70 * var(--u)); width: calc(300 * var(--u)); box-sizing: border-box; border: 1px solid rgba(var(--g), .9); background: repeating-linear-gradient(60deg, rgba(var(--g), .5) 0 1px, transparent 1px calc(12 * var(--u))); }
.b.cr .jb { top: calc(-4 * var(--u)); height: calc(8 * var(--u)); }
.b.cr .jv { top: calc(-16 * var(--u)); height: calc(16 * var(--u)); transform-origin: 50% 100%; transform: rotateX(-90deg); }
.b.cr .cw { left: calc(-66 * var(--u)); top: calc(-24 * var(--u)); width: calc(26 * var(--u)); height: calc(24 * var(--u)); transform-origin: 50% 100%; transform: translateZ(calc(-20 * var(--u))) rotateX(-90deg); background: rgba(var(--g), .3); border: 1px solid var(--gold); }
.b.cr .hook { position: absolute; left: calc(176 * var(--u)); top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.b.cr .cable { left: 0; top: calc(-300 * var(--u)); width: 1px; height: calc(300 * var(--u)); background: var(--gold); transform-origin: 50% 100%; transform: rotateX(90deg) scaleY(.12); opacity: 0; animation: spCable 1.4s cubic-bezier(.45, 0, .3, 1) 1.7s forwards, spFade .3s ease 1.6s forwards; }
.b.cr .load { left: calc(-12 * var(--u)); top: calc(-16 * var(--u)); width: calc(24 * var(--u)); height: calc(16 * var(--u)); transform-origin: 50% 100%; transform: translateZ(calc(-52 * var(--u))) rotateX(-90deg); border: 1px solid var(--gold); background: rgba(var(--g), .35); box-shadow: 0 0 12px rgba(var(--g), .5); opacity: 0; animation: spLoad 1.4s cubic-bezier(.45, 0, .3, 1) 1.7s forwards, spFade .3s ease 1.6s forwards; }
/* solar panels: stand up and tilt toward the sun */
.sp-sheet .pv { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(34 * var(--u)); height: calc(48 * var(--u)); transform-style: preserve-3d; }
.sp-sheet .pv i {
  inset: 0; box-sizing: border-box; border: 1px solid var(--gold);
  background: repeating-linear-gradient(to right, rgba(var(--g), .5) 0 1px, transparent 1px calc(8.5 * var(--u))), repeating-linear-gradient(to bottom, rgba(var(--g), .5) 0 1px, transparent 1px calc(12 * var(--u))), rgba(var(--g), .16);
  transform-origin: 100% 50%; transform: translateZ(calc(10 * var(--u))) rotateY(0deg);
  opacity: 0; animation: spPanel 1.1s var(--ease-out) var(--t) forwards;
}
/* gold dust rising in the light */
.sp-dust { position: absolute; inset: 0; transform-style: preserve-3d; }
.sp-dust i {
  left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: 3px; height: 3px; border-radius: 50%;
  background: #F6DE86; box-shadow: 0 0 6px 1px rgba(var(--g), .7);
  opacity: 0; transform: translateZ(0) rotateX(-90deg);
  animation: spDust 2.2s ease-out var(--dl) forwards;
}

/* ---- type ---- */
.sp-type {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(60px, 8vh) 20px max(74px, 7vh);
  transition: opacity .45s ease, transform .9s var(--ease-in-out);
}
/* soft navy floor under the progress line + tagline so they stay readable over the site */
.sp-type::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(to top, var(--navy) 25%, transparent); }
.sp-top, .sp-bottom { position: relative; display: flex; flex-direction: column; align-items: center; }
.sp-top { gap: 12px; }
.sp-bottom { gap: 10px; width: min(640px, 88vw); }
.sp-logo { position: relative; width: 70px; height: 70px; }
.sp-ring { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); overflow: visible; transform: rotate(-90deg); }
.sp-ring circle { fill: none; stroke: rgba(var(--g), .7); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; animation: spDraw 1s var(--ease-in-out) .45s forwards, spFadeOut .5s ease 1.6s forwards; }
.splash-logo { position: relative; display: block; width: 70px; height: 70px; opacity: 0; transform: perspective(500px) rotateY(-75deg) scale(.7); animation: spForge 1s var(--ease-out) .55s forwards; }
.sp-shine { position: absolute; inset: 0; overflow: hidden; -webkit-mask: url(../assets/img/logo-gold.png) center / contain no-repeat; mask: url(../assets/img/logo-gold.png) center / contain no-repeat; }
.sp-shine i { position: absolute; top: -20%; bottom: -20%; left: 0; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 246, 214, .95), transparent); transform: translateX(-120%) skewX(-12deg); animation: spShine .9s ease-in-out 1.25s forwards; }
.splash-name {
  display: flex; margin: 4px 0 0; font-family: var(--font-head); font-weight: 600; line-height: 1;
  font-size: clamp(1.7rem, 5vw, 2.7rem); letter-spacing: .05em; color: var(--on-ink);
  text-shadow: 0 1px 0 rgba(var(--g), .55), 0 2px 0 rgba(var(--g), .25), 0 12px 28px rgba(0, 0, 0, .45);
}
.splash-name span { display: inline-block; opacity: 0; transform-origin: 50% 100%; transform: perspective(520px) translate3d(0, .45em, -80px) rotateX(-88deg); animation: spLetter .85s var(--ease-out) forwards; animation-delay: calc(.85s + var(--l) * 42ms); }
.splash-sub { display: flex; margin: 2px 0 0; font-size: .7rem; font-weight: 600; letter-spacing: .5em; color: var(--gold); }
.splash-sub span { display: inline-block; opacity: 0; transform: translateX(calc(var(--k) * .55em)); animation: spRise 1s var(--ease-out) 1.45s forwards; }
.splash-foot { display: flex; align-items: center; gap: 14px; width: 100%; font-size: .68rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: rgba(var(--g), .85); opacity: 0; animation: spFade .5s ease .1s forwards; }
.splash-bar { flex: 1; height: 1px; background: rgba(var(--g), .2); position: relative; overflow: hidden; }
/* THE clock: 0 → 100% over 3s (js/motion.js reads this animation for the counter) */
.splash-bar::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; animation: spBar 3s cubic-bezier(.45, 0, .55, 1) forwards; }
.splash-count { min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; color: var(--on-ink); }
.splash-tag { margin: 0; font-family: var(--font-head); font-style: italic; font-size: clamp(.95rem, 2.2vw, 1.15rem); color: rgba(255, 255, 255, .78); opacity: 0; transform: translateY(10px); animation: spRise .8s var(--ease-out) 2.1s forwards; }

/* ---- HUD: corner brackets, meta labels, skip ---- */
.splash-corner { position: absolute; width: 28px; height: 28px; border: 0 solid rgba(var(--g), .6); opacity: 0; transform: scale(.3); animation: spRise .7s var(--ease-out) .15s forwards; }
.splash-corner.tl { top: 24px; left: 24px; border-top-width: 1.5px; border-left-width: 1.5px; transform-origin: 0 0; }
.splash-corner.tr { top: 24px; right: 24px; border-top-width: 1.5px; border-right-width: 1.5px; transform-origin: 100% 0; }
.splash-corner.bl { bottom: 24px; left: 24px; border-bottom-width: 1.5px; border-left-width: 1.5px; transform-origin: 0 100%; }
.splash-corner.br { bottom: 24px; right: 24px; border-bottom-width: 1.5px; border-right-width: 1.5px; transform-origin: 100% 100%; }
.splash-meta { position: absolute; top: 30px; left: 64px; right: 64px; display: flex; justify-content: space-between; font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: rgba(var(--g), .7); opacity: 0; transform: translateY(-6px); animation: spRise .8s var(--ease-out) .3s forwards; }
.splash-skip { position: absolute; right: 64px; bottom: 30px; z-index: 2; padding: 8px 14px; border: 1px solid rgba(var(--g), .45); border-radius: 999px; background: rgba(14, 27, 43, .6); color: var(--gold); font: 600 .66rem/1 var(--font-body); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; opacity: 0; animation: spFade .4s ease .15s forwards; }
.splash-skip:hover, .splash-skip:focus-visible { background: var(--gold); color: var(--navy); outline: none; }

/* ---- exit: louvres open, camera pushes through the site, type lifts away ----
   .is-leaving comes from js/motion.js; .sp-skip from the head snippet (a click/key/scroll before motion.js loaded) */
:is(.splash.is-leaving, .sp-skip .splash) { background-color: transparent; transition-delay: 0s; pointer-events: none; }
:is(.splash.is-leaving, .sp-skip .splash) .sp-louvres span { transform: rotateY(70deg) scaleX(0); opacity: 0; }
:is(.splash.is-leaving, .sp-skip .splash) .sp-dolly { transform: translate3d(0, calc(330 * var(--u)), calc(620 * var(--u))) rotateX(-6deg); }
:is(.splash.is-leaving, .sp-skip .splash) .sp-world { opacity: 0; }
:is(.splash.is-leaving, .sp-skip .splash) .sp-type { opacity: 0; transform: translateY(-5vh) scale(1.04); }
:is(.splash.is-leaving, .sp-skip .splash) :is(.sp-sky, .sp-hud) { opacity: 0; transition: opacity .35s; }
:is(.splash.is-leaving, .sp-skip .splash) .splash-skip { opacity: 0 !important; transition: opacity .2s; animation: none; }

/* ---- small screens / low-power devices: same idea, fewer layers ---- */
.sp-lite .sp-dust, .sp-lite .b > .f.n, .sp-lite .b > .f.e, .sp-lite .sp-plan .tree, .sp-lite .sp-shine { display: none; }
@media (max-width: 640px) {
  .sp-dust, .sp-plan .tree, .b > .f.n, .b > .f.e { display: none; }
  .sp-par { left: 53%; top: 61%; }
  .sp-sun { left: 80%; top: 37%; }
  .splash-meta { left: 40px; right: 40px; font-size: .55rem; letter-spacing: .18em; }
  .splash-meta span:last-child { display: none; }
  .splash-skip { right: 40px; bottom: 24px; }
  .sp-type { padding-bottom: 76px; }
  .splash-sub { letter-spacing: .38em; }
  .sp-louvres span:nth-child(n+5) { display: none; }
}

@keyframes spFade { to { opacity: 1; } }
@keyframes spFadeOut { to { opacity: 0; } }
@keyframes spRise { to { opacity: 1; transform: none; } }
@keyframes spDraw { to { stroke-dashoffset: 0; } }
@keyframes spBar  { to { transform: scaleX(1); } }
@keyframes spGrowY { to { transform: scaleY(1); } }
@keyframes spGone { to { opacity: 0; visibility: hidden; } }
@keyframes spSun  { to { opacity: 1; transform: none; } }
@keyframes spScan { 12% { opacity: 1; } 80% { opacity: .9; } to { opacity: 0; transform: translateY(calc(890 * var(--u))); } }
@keyframes spCam {
  0%   { transform: translate3d(0, calc(-150 * var(--u)), 0) rotateX(8deg) rotateZ(-4deg) scale3d(.5, .5, .5); animation-timing-function: linear; }
  12%  { transform: translate3d(0, calc(-145 * var(--u)), 0) rotateX(10deg) rotateZ(-6deg) scale3d(.52, .52, .52); animation-timing-function: cubic-bezier(.55, 0, .2, 1); }
  50%  { transform: translate3d(0, 0, 0) rotateX(58deg) rotateZ(-45deg) scale3d(.94, .94, .94); animation-timing-function: cubic-bezier(.3, 0, .45, 1); }
  100% { transform: translate3d(0, 0, 0) rotateX(55deg) rotateZ(-31deg) scale3d(1, 1, 1); }
}
@keyframes spExtrude { to { transform: scale3d(1, 1, 1); } }
@keyframes spJib { to { transform: translateZ(calc(var(--h) * var(--u))) rotateZ(16deg); } }
@keyframes spCable { 45% { transform: rotateX(90deg) scaleY(.86); } 60% { transform: rotateX(90deg) scaleY(.86); } to { transform: rotateX(90deg) scaleY(.42); } }
@keyframes spLoad { 45% { transform: translateZ(calc(-274 * var(--u))) rotateX(-90deg); } 60% { transform: translateZ(calc(-274 * var(--u))) rotateX(-90deg); } to { transform: translateZ(calc(-142 * var(--u))) rotateX(-90deg); } }
@keyframes spPanel { 30% { opacity: 1; } to { opacity: 1; transform: translateZ(calc(10 * var(--u))) rotateY(36deg); } }
@keyframes spDust { 25% { opacity: .9; } to { opacity: 0; transform: translateZ(calc(var(--z) * var(--u))) rotateX(-90deg); } }
@keyframes spForge { 60% { opacity: 1; } to { opacity: 1; transform: perspective(500px) rotateY(0deg) scale(1); } }
@keyframes spShine { to { transform: translateX(260%) skewX(-12deg); } }
@keyframes spLetter { 40% { opacity: 1; } to { opacity: 1; transform: perspective(520px) translate3d(0, 0, 0) rotateX(0deg); } }

/* ---------- 1b. Page transitions (between pages) ---------- */
.js-arrive body::before {
  content: ""; position: fixed; inset: 0; z-index: 999; background: var(--navy); pointer-events: none;
  transition: transform .8s var(--ease-in-out);
}
.js-arrive.arrive-go body::before { transform: translateY(-100%); }
.page-cover {
  position: fixed; inset: 0; z-index: 999; background: var(--navy); pointer-events: none;
  transform: translateY(100%); transition: transform .55s var(--ease-in-out);
  display: grid; place-items: center;
}
.page-cover img { width: 56px; height: 56px; opacity: 0; transition: opacity .3s .2s; }
.page-cover.is-on { transform: none; }
.page-cover.is-on img { opacity: 1; }

/* ---------- 2. Header: glass + shadow on scroll, progress bar ---------- */
.site-header { transition: box-shadow .35s, background-color .35s, backdrop-filter .35s; }
.js-motion .site-header.is-scrolled {
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  box-shadow: 0 6px 24px rgba(14,27,43,.08);
}
.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), #E8C65A);
  transform: scaleX(0); transform-origin: left; pointer-events: none;
}

/* ---------- 3. Hero ---------- */
.hero { isolation: isolate; }
.hero-fx { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.hero-fx .orb {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55;
  will-change: transform;
}
.hero-fx .o1 { width: 420px; height: 420px; left: -80px; top: -60px; background: radial-gradient(circle, rgba(201,162,39,.35), transparent 65%); animation: drift1 16s ease-in-out infinite alternate; }
.hero-fx .o2 { width: 520px; height: 520px; right: -140px; top: 10%; background: radial-gradient(circle, rgba(14,27,43,.14), transparent 65%); animation: drift2 20s ease-in-out infinite alternate; }
.hero-fx .o3 { width: 360px; height: 360px; left: 35%; bottom: -160px; background: radial-gradient(circle, rgba(232,198,90,.30), transparent 65%); animation: drift3 18s ease-in-out infinite alternate; }
.hero-fx .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(14,27,43,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,27,43,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-140px, 60px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-90px, -70px) scale(1.2); } }
.hero .watermark { animation: floaty 9s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translate(-50%, -50%) rotate(-1deg); } to { transform: translate(-50%, -53%) rotate(1deg); } }

/* headline words (split by motion.js) */
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .w > span { display: inline-block; }
.js-motion .hero-title .w > span { transform: translateY(105%); }
.js-motion.page-ready .hero-title .w > span { transform: none; transition: transform 1s var(--ease-out) calc(var(--wi) * 70ms + 150ms); }
.hero-title .gold-shine {
  background: linear-gradient(100deg, #9C7A12 0%, var(--gold) 30%, #F3DA7A 50%, var(--gold) 70%, #9C7A12 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 5s linear infinite;
}
@keyframes shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.js-motion .hero .eyebrow,
.js-motion .hero-lead,
.js-motion .hero .btn-row,
.js-motion .scroll-cue { opacity: 0; transform: translateY(18px); }
.js-motion.page-ready .hero .eyebrow { opacity: 1; transform: none; transition: opacity .8s, transform .8s var(--ease-out); }
.js-motion.page-ready .hero-lead     { opacity: 1; transform: none; transition: opacity .9s .55s, transform .9s var(--ease-out) .55s; }
.js-motion.page-ready .hero .btn-row { opacity: 1; transform: none; transition: opacity .9s .75s, transform .9s var(--ease-out) .75s; }
.js-motion.page-ready .scroll-cue    { opacity: 1; transform: none; transition: opacity 1s 1.2s, transform 1s var(--ease-out) 1.2s; }

.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 40px; color: var(--muted); font-size: .7rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
}
.scroll-cue .mouse { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.scroll-cue .mouse::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  border-radius: 2px; background: var(--gold); animation: wheel 1.8s var(--ease-in-out) infinite;
}
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }

/* project photo reel at the bottom of the hero */
.hero-reel {
  margin-top: clamp(44px, 7vw, 72px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.hero-reel ul { display: flex; gap: 16px; width: max-content; margin: 0; padding: 6px 0 18px; list-style: none; animation: reel 70s linear infinite; }
.hero-reel:hover ul { animation-play-state: paused; }
.hero-reel li { flex: none; width: clamp(180px, 22vw, 270px); aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(14,27,43,.14); transform: rotate(var(--r, 0deg)); transition: transform .4s var(--ease-out); }
.hero-reel li:nth-child(odd) { --r: -1.2deg; }
.hero-reel li:nth-child(even) { --r: 1.2deg; margin-top: 14px; }
.hero-reel li:hover { transform: rotate(0) scale(1.04); }
.hero-reel a { display: block; height: 100%; }
.hero-reel img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@keyframes reel { to { transform: translateX(-50%); } }
.js-motion .hero-reel { opacity: 0; transform: translateY(30px); }
.js-motion.page-ready .hero-reel { opacity: 1; transform: none; transition: opacity 1.2s .9s, transform 1.2s var(--ease-out) .9s; }

/* ---------- 4. Ventures ticker band ---------- */
.ticker { background: var(--navy); color: var(--gold); overflow: hidden; border-block: 1px solid rgba(201,162,39,.25); }
.ticker ul { display: flex; width: max-content; margin: 0; padding: 16px 0; list-style: none; animation: reel 40s linear infinite; }
.ticker li { display: flex; align-items: center; gap: 26px; padding-right: 26px; white-space: nowrap; font-family: var(--font-head); font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; letter-spacing: .02em; }
.ticker li::after { content: ""; width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg); opacity: .8; }
.ticker li:nth-child(even) { color: var(--on-ink); }

/* ---------- 5. Scroll reveals ---------- */
.js-motion .rv { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js-motion .rv.rv-zoom  { transform: scale(.94) translateY(20px); }
.js-motion .rv.rv-left  { transform: translateX(-44px); }
.js-motion .rv.rv-right { transform: translateX(44px); }
.js-motion .rv.is-in { opacity: 1; transform: none; }

/* image wipe */
/* the clip goes on the inner link, so the observed tile keeps its size */
.js-motion .rv-wipe > * { clip-path: inset(0 0 100% 0 round 12px); transition: clip-path 1.1s var(--ease-in-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js-motion .rv-wipe.is-in > * { clip-path: inset(0 0 0 0 round 12px); }
.js-motion .rv-wipe img { transform: scale(1.18); transition: transform 1.6s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js-motion .rv-wipe.is-in img { transform: scale(1); }

/* section heading: eyebrow line + heading rise */
.section-head .eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.section-head .eyebrow::before, .section-head .eyebrow::after {
  content: ""; width: 28px; height: 1.5px; background: currentColor; opacity: .7;
  transform: scaleX(1); transition: transform .9s var(--ease-out) .2s;
}
.section-head .eyebrow::before { transform-origin: right; }
.section-head .eyebrow::after { transform-origin: left; }
.js-motion .section-head:not(.is-in) .eyebrow::before,
.js-motion .section-head:not(.is-in) .eyebrow::after { transform: scaleX(0); }

/* value icons draw themselves */
.js-motion .value-strip svg :is(path, circle, rect) { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.6s var(--ease-in-out); transition-delay: calc(var(--d, 0) * 1ms + 200ms); }
.js-motion .value-strip .is-in svg :is(path, circle, rect) { stroke-dashoffset: 0; }
.value-strip svg { transition: background-color .3s, color .3s, transform .4s var(--ease-out); }
.value-strip li:hover svg { background: var(--gold); color: var(--navy); transform: translateY(-4px) rotate(-6deg); }

/* ---------- 6. Hover & interaction polish ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease-out);
}
.btn:hover::before { left: 130%; }
.btn-gold { box-shadow: 0 8px 22px rgba(201,162,39,.28); }
.btn-gold:hover { box-shadow: 0 12px 28px rgba(201,162,39,.38); }

.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .5s var(--ease-out), box-shadow .3s; }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(201,162,39,.16), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.tilt:hover::after { opacity: 1; }
.card.company, .ongoing-card, .glance, .pv-finish, .kc-facts div { position: relative; }

.icon-badge { transition: transform .5s var(--ease-out), background-color .3s, color .3s; }
.card.company:hover .icon-badge { transform: rotate(-8deg) scale(1.08); background: var(--gold); color: var(--navy); }

.glance { transition: background-color .3s; }
.glance h3::before { transition: width .5s var(--ease-out); }
.glance:hover { background: var(--surface); }
.glance:hover h3::before { width: 64px; }

/* rotating gold ring around director photos */
.director-ring { position: relative; width: 172px; height: 172px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; }
.director-ring::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--gold), transparent 30%, #F3DA7A 50%, transparent 70%, var(--gold));
  animation: spin 6s linear infinite; z-index: 0;
}
.director-ring::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--navy); z-index: 0; }
.director-ring .director-photo { position: relative; z-index: 1; border: 0; box-shadow: none; transition: transform .6s var(--ease-out); }
.director:hover .director-photo { transform: scale(1.05); }
@keyframes spin { to { transform: rotate(1turn); } }

.project, .g-link, .pv-photos li { transition: box-shadow .35s, transform .35s var(--ease-out); }
.project:hover, .g-link:hover { box-shadow: 0 14px 34px rgba(14,27,43,.18); transform: translateY(-3px); }
.project-caption { transition: padding .35s var(--ease-out); }
.project:hover .project-caption { padding-bottom: 20px; }

.main-nav a { transition: color .2s; }
.main-nav a:hover { color: var(--gold-text); }

/* ---------- 7. Reduced motion: keep everything still ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-fx .orb, .hero .watermark, .hero-reel ul, .ticker ul, .director-ring::before,
  .hero-title .gold-shine, .scroll-cue .mouse::after { animation: none !important; }
}

/* ---------- 8. Page heroes on project / product pages ---------- */
.js-motion .kc-hero-img { transform: scale(1.12); }
.js-motion.page-ready .kc-hero-img { transform: scale(1); transition: transform 2.6s var(--ease-out); }
.js-motion :is(.kc-hero-text, .pv-hero-text) > * { opacity: 0; transform: translateY(24px); }
.js-motion.page-ready :is(.kc-hero-text, .pv-hero-text) > * { opacity: 1; transform: none; transition: opacity .9s, transform 1s var(--ease-out); }
.js-motion.page-ready :is(.kc-hero-text, .pv-hero-text) > :nth-child(2) { transition-delay: .12s; }
.js-motion.page-ready :is(.kc-hero-text, .pv-hero-text) > :nth-child(3) { transition-delay: .24s; }
.js-motion.page-ready :is(.kc-hero-text, .pv-hero-text) > :nth-child(4) { transition-delay: .36s; }
.js-motion.page-ready :is(.kc-hero-text, .pv-hero-text) > :nth-child(5) { transition-delay: .48s; }
.js-motion .pv-hero-grid li { opacity: 0; scale: .92; }
.js-motion.page-ready .pv-hero-grid li { opacity: 1; scale: 1; transition: opacity .9s, scale 1.1s var(--ease-out); }
.js-motion.page-ready .pv-hero-grid li:nth-child(2) { transition-delay: .15s; }
.js-motion.page-ready .pv-hero-grid li:nth-child(3) { transition-delay: .3s; }
.js-motion.page-ready .pv-hero-grid li:nth-child(4) { transition-delay: .45s; }
.pv-hero-grid img { transition: transform .8s var(--ease-out); }
.pv-hero-grid li:hover img { transform: scale(1.06); }
.js-motion .gallery-section .section-head h1 { opacity: 0; transform: translateY(20px); }
.js-motion.page-ready .gallery-section .section-head h1 { opacity: 1; transform: none; transition: opacity .9s .1s, transform 1s var(--ease-out) .1s; }

/* ---------- 9. Gold cursor ring ---------- */
.cursor-ring, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 998; pointer-events: none; opacity: 0; transition: opacity .3s; }
.has-cursor .cursor-ring, .has-cursor .cursor-dot { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--gold); }
.cursor-ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 1.5px solid rgba(201,162,39,.75);
  display: grid; place-items: center;
}
.cursor-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: transparent; transition: background-color .3s, transform .35s var(--ease-out); }
.cursor-ring span { position: relative; font: 700 .62rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: 0; transform: scale(.6); transition: opacity .25s, transform .35s var(--ease-out); }
.cursor-ring { transition: opacity .3s, width .35s var(--ease-out), height .35s var(--ease-out), margin .35s var(--ease-out), border-color .3s; }
.cursor-ring.is-link { width: 54px; height: 54px; margin: -27px 0 0 -27px; border-color: var(--gold); }
.cursor-ring.is-link::before { background: rgba(201,162,39,.12); }
.cursor-ring.is-media { width: 84px; height: 84px; margin: -42px 0 0 -42px; border-color: var(--gold); }
.cursor-ring.is-media::before { background: var(--gold); }
.cursor-ring.is-media span { opacity: 1; transform: none; }
.cursor-ring.is-media ~ .cursor-dot, .cursor-ring.is-link ~ .cursor-dot { opacity: 0; }
.cursor-ring.is-down::before { transform: scale(.85); }
@media (hover: none), (pointer: coarse) { .cursor-ring, .cursor-dot { display: none; } }

/* ---------- 10. Statement band ---------- */
.statement { padding: clamp(72px, 12vw, 150px) 0; background: var(--bg); }
.statement-text {
  max-width: 1000px; margin: 0 auto; text-align: center;
  font-family: var(--font-head); font-weight: 600; line-height: 1.22; letter-spacing: -.01em;
  font-size: clamp(1.7rem, 4.2vw, 3.2rem); color: var(--ink);
}
.js-motion .statement-text .sw { color: rgba(14,27,43,.14); transition: color .5s ease; }
.js-motion .statement-text .sw.on { color: var(--ink); }
.js-motion .statement-text .sw.gold.on { color: var(--gold); }
.statement-text .gold { color: var(--gold); }

/* ---------- 11. Directors spotlight ---------- */
#directors.has-spot::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 40%), rgba(201,162,39,.13), transparent 60%);
  transition: opacity .4s;
}
#directors > .container { position: relative; z-index: 1; }

/* ---------- 12. Footer wordmark ---------- */
.site-footer { overflow: hidden; }
.footer-mark {
  margin: clamp(28px, 5vw, 48px) auto -0.18em; padding: 0 var(--gutter);
  text-align: center; white-space: nowrap; user-select: none;
  font-family: var(--font-head); font-weight: 600; line-height: 1; letter-spacing: -.02em;
  font-size: clamp(3rem, 13.5vw, 13rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(201,162,39,.35);
  background: linear-gradient(90deg, var(--gold) 0 var(--fill, 0%), transparent var(--fill, 0%) 100%);
  -webkit-background-clip: text; background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
  .cursor-ring, .cursor-dot { display: none; }
}
