/* Version 3 effects: progress line, cursor, toast, speed strip, split headings, orbs */

/* scroll progress */
.progress { position: fixed; z-index: 70; left: 0; right: 0; top: 0; height: 3px; transform-origin: 0 50%; transform: scaleX(var(--pp, 0)); background: linear-gradient(90deg, #5b76ff, var(--blue)); pointer-events: none; }

/* custom cursor: a small dot that becomes a ring, and a glass "View" bubble over projects */
.cursor { position: fixed; z-index: 90; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor.is-on { opacity: 1; }
.cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; }
.cursor__dot { width: 8px; height: 8px; background: var(--blue); transition: scale 0.3s var(--ease-out), opacity 0.3s; }
.cursor__ring { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid rgba(37, 64, 255, 0.55); transition: width 0.5s var(--ease-out), height 0.5s var(--ease-out), background 0.4s, border-color 0.4s; }
.cursor__ring span { font: 500 12px var(--font-mono); text-transform: uppercase; color: #fff; opacity: 0; transition: opacity 0.3s; }
.cursor.is-link .cursor__ring { width: 56px; height: 56px; background: rgba(37, 64, 255, 0.10); }
.cursor.is-view .cursor__ring { width: 92px; height: 92px; background: rgba(37, 64, 255, 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(255, 255, 255, 0.5); }
.cursor.is-view .cursor__ring span { opacity: 1; }
.cursor.is-view .cursor__dot { scale: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* copy confirmation */
.toast { position: fixed; z-index: 95; left: 50%; bottom: 28px; padding: 12px 20px; border-radius: 999px; color: var(--ink); opacity: 0; transform: translate(-50%, 16px); transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* headings arrive word by word */
.js .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js .split .w > span { display: inline-block; transform: translateY(108%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.055s); }
.js .split.is-in .w > span { transform: none; }

/* a strip of services that speeds up and leans with your scroll */
.strip { position: relative; overflow: hidden; width: min(1240px, calc(100% - 2 * var(--gutter))); margin: clamp(56px, 7vw, 96px) auto; padding: 18px 0; border-radius: 999px; color: var(--ink); }
.strip__track { display: flex; align-items: center; gap: 28px; width: max-content; white-space: nowrap; will-change: transform; }
.strip__track span { font-size: clamp(22px, 2.6vw, 38px); font-weight: 500; letter-spacing: -0.03em; }
.strip__track i { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); flex: none; }

/* decorative colour behind glass in the footer */
.footer .orb { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0; width: 34vw; height: 34vw; right: -6vw; top: 18%; background: rgba(37, 64, 255, 0.16); }
.footer .container { position: relative; z-index: 1; }

/* clock digits roll when the minute changes */
#clock.is-tick { display: inline-block; animation: tick 0.6s var(--ease-out); }
@keyframes tick { from { transform: translateY(60%); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .progress { display: none; } }

/* the Contact pill also leans toward the pointer */
.nav__cta { transform: translate(var(--tx, 0px), var(--ty, 0px)); transition: transform 0.4s var(--ease-out), background 0.3s; }

/* load reveal: a blue brick wall with the logo, drawn by js/reveal.js, opens to uncover the page */
.boot { display: none; }
.js .boot { display: block; position: fixed; inset: 0; z-index: 300; background: var(--blue); pointer-events: none; animation: boot-failsafe 0.01s linear 6s forwards; }
.boot canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.boot__logo { position: absolute; left: 50%; top: 50%; width: clamp(64px, 7vw, 104px); height: auto; opacity: 0; transform: translate(-50%, -50%); animation: boot-logo 0.55s var(--ease-out) 0.05s forwards; }
.boot.is-open .boot__logo { animation: boot-logo-out 0.3s ease-in forwards; }
@keyframes boot-logo { from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes boot-logo-out { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } }
@keyframes boot-failsafe { to { opacity: 0; visibility: hidden; } }
/* the hero's own entrance animations wait until the wall starts to open */
.js:not(.is-ready) .hero, .js:not(.is-ready) .hero *, .js:not(.is-ready) .hero *::before, .js:not(.is-ready) .hero *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .js .boot { display: none; } }
