/* SitesMade shared motion. Every visitor gets the full animations, whatever their device's Reduce Motion setting. */

/* ---------- Scroll progress bar ---------- */
.progress {
  position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); height: 3px; z-index: 30;
  background: linear-gradient(90deg, var(--blue), #7aa2ff); transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(31, 94, 255, .45);
}

/* ---------- Page load: header drops in ---------- */
@keyframes drop-in { from { translate: 0 -100%; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.js header { animation: drop-in .7s cubic-bezier(.2,.8,.2,1) backwards; }
.js .announce { animation: drop-in .7s .12s cubic-bezier(.2,.8,.2,1) backwards; }

/* Header stays in view; it gains a shadow once the page has scrolled */
header { transition: translate .35s cubic-bezier(.2,.8,.2,1), box-shadow .3s, background .3s; }
header.scrolled { box-shadow: 0 10px 30px -18px rgba(11, 22, 64, .35); background: rgba(255, 255, 255, .95); }

/* ---------- Reveal on scroll (both directions) ----------
   Uses the individual translate/scale properties so hover tilts (which use transform) still work. */
.js .reveal {
  opacity: 0; translate: 0 46px;
  transition: opacity .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s), translate .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s),
              scale .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), border-color .2s, box-shadow .25s;
}
.js .reveal.from-top { translate: 0 -46px; }
.js .reveal.zoom { scale: .94; }
.js .reveal.from-left { translate: -60px 0; }
.js .reveal.from-right { translate: 60px 0; }
.js .reveal.in { opacity: 1; translate: 0 0; scale: 1; }

/* Children that cascade in one after another */
.js [data-stagger] > * {
  opacity: 0; translate: 0 18px;
  transition: opacity .5s ease calc(var(--d, 0s) + var(--i, 0) * 70ms), translate .6s cubic-bezier(.2,.8,.2,1) calc(var(--d, 0s) + var(--i, 0) * 70ms);
}
.js [data-stagger].from-top > * { translate: 0 -18px; }
.js [data-stagger].in > * { opacity: 1; translate: 0 0; }

/* ---------- Split headlines: letters rise in ---------- */
[data-split] .w { display: inline-block; white-space: nowrap; }
.js [data-split] .ch {
  display: inline-block; opacity: 0; translate: 0 .55em; rotate: 8deg; filter: blur(6px);
  transition: opacity .55s ease, translate .8s cubic-bezier(.2,.8,.2,1), rotate .8s cubic-bezier(.2,.8,.2,1), filter .6s ease;
  transition-delay: calc(var(--d, 0s) + var(--i, 0) * 26ms);
}
.js [data-split].from-top .ch { translate: 0 -.55em; rotate: -8deg; }
.js [data-split].in .ch { opacity: 1; translate: 0 0; rotate: 0deg; filter: none; }

/* ---------- Headline words that fill with colour as you scroll ---------- */
[data-scrub] h2 .ghost {
  background: linear-gradient(90deg, var(--blue) 0 calc(var(--p, 0) * 100%), #b9c3e0 calc(var(--p, 0) * 100%) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Tilt + spotlight cards ---------- */
[data-tilt] { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)) scale(var(--fs, 1)); transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .25s, opacity .7s, translate .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s); will-change: transform; }
[data-tilt].tilting { transition: transform .08s linear, border-color .2s, box-shadow .25s, opacity .7s, translate .8s; }
.js .reveal[data-tilt] { transition: opacity .7s cubic-bezier(.2,.7,.2,1) var(--d, 0s), translate .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), scale .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s), transform .5s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .25s; }
.js .reveal[data-tilt].tilting { transition: opacity .7s, translate .8s, scale .8s, transform .08s linear, border-color .2s, box-shadow .25s; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(61, 120, 255, .16), transparent 60%);
}
[data-tilt]:hover::after, [data-tilt].pressing::after { opacity: 1; }
[data-tilt].pressing, .js .reveal[data-tilt].pressing { transition: opacity .7s, translate .8s, scale .8s, transform .12s ease-out, border-color .2s, box-shadow .25s; }

/* ---------- Magnetic buttons ---------- */
.btn { translate: var(--bx, 0px) var(--by, 0px); }
.btn.magnet { transition: transform .15s, box-shadow .15s, background .15s, translate .12s linear; }
.btn:not(.magnet) { transition: transform .15s, box-shadow .15s, background .15s, translate .5s cubic-bezier(.2,.8,.2,1); }
/* Shine that sweeps across solid buttons on hover */
.btn:not(.outline) { position: relative; overflow: hidden; isolation: isolate; }
.btn:not(.outline)::before {
  content: ""; position: absolute; inset: 0; z-index: -1; translate: -120% 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transition: translate .7s ease;
}
.btn:not(.outline):hover::before, .btn.shine::before { translate: 120% 0; }
/* Buttons give a little squish when pressed */
.btn:active { scale: .97; }

/* ---------- Floating colour blobs behind heroes ----------
   Each blob is a soft-edged gradient rather than a blurred circle: Safari can cut a blur that isn't moving
   into a hard-edged box, while a gradient looks the same everywhere, moving or still. */
.blobs { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; translate: 0 calc(var(--sy, 0) * 1px); }
.blobs span {
  position: absolute; border-radius: 50%; opacity: .55; animation: drift 18s ease-in-out infinite alternate;
  background: radial-gradient(closest-side, rgb(var(--c)) 22%, rgb(var(--c) / .84) 41%, rgb(var(--c) / .5) 61%, rgb(var(--c) / .16) 81%, rgb(var(--c) / 0) 100%);
}
.blobs span:nth-child(1) { --c: 122 162 255; width: 700px; height: 700px; left: -240px; top: -200px; }
.blobs span:nth-child(2) { --c: 169 196 255; width: 620px; height: 620px; right: -220px; top: -160px; animation-duration: 22s; animation-delay: -6s; }
.blobs span:nth-child(3) { --c: 199 215 255; width: 540px; height: 540px; left: calc(40% - 120px); top: 40px; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift {
  0% { translate: 0 0; scale: 1; }
  50% { translate: 60px 40px; scale: 1.12; }
  100% { translate: -40px 70px; scale: .92; }
}

/* ---------- Infinite marquee strip ---------- */
.marquee { overflow: hidden; padding-block: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee.reverse .track { animation-direction: reverse; }
.marquee .item { display: flex; gap: 12px; padding-right: 12px; }
.marquee .chip {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 12px 20px; border-radius: 999px; background: var(--surface, #fff); border: 1px solid var(--line);
  font-weight: 700; font-size: 15.5px; color: var(--ink); box-shadow: 0 1px 2px rgba(14,21,48,.05);
}
.marquee .chip svg { color: var(--blue); flex: none; }
@keyframes marquee { to { translate: -50% 0; } }

/* ---------- Count-up numbers ---------- */
[data-count] { font-variant-numeric: tabular-nums; }

/* ---------- Gentle float ---------- */
@keyframes bob { 50% { translate: 0 -8px; } }
.bob { animation: bob 5s ease-in-out infinite; }

/* ---------- Sparkle burst (score reveal) ---------- */
.burst { position: absolute; inset: 0; pointer-events: none; }
.burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); opacity: 0; animation: burst .9s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--delay, 0s); }
@keyframes burst {
  0% { opacity: 1; translate: -50% -50%; scale: 1; }
  100% { opacity: 0; translate: calc(-50% + var(--x)) calc(-50% + var(--y)); scale: .3; }
}
