/* Splash and page wipe (v7), the v3 idea in the current look: the homepage gradient, grain and Cabinet Grotesk.
   Homepage load: a plain gradient circle grows from the logo corner to fill the screen, then shrinks into the centre (as in v3).
   Link to another page: a gradient circle grows from the click, carrying the page's name; the next page opens behind it. */
.splash { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(115deg, #8fbfff, #7a88ff 48%, #ff8fc4); background-size: 160% 160%; color: #fff;
  clip-path: inset(0 round 0); pointer-events: none; animation: splash-drift 6s ease-in-out infinite alternate; }
.splash::after { content: ""; position: absolute; inset: 0; background: url(img/grain.png); background-size: 80px 80px; opacity: .14; pointer-events: none; }
.splash.is-off { display: none; }
.splash.is-on { pointer-events: auto; }
.splash__word { position: relative; z-index: 1; display: block; padding: 0 24px; text-align: center; white-space: nowrap;
  font-family: "Cabinet Grotesk", Arial, sans-serif; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  font-size: clamp(64px, 14vw, 240px); text-shadow: 0 12px 50px rgba(40, 50, 140, .22); }
.splash__word.is-label { font-weight: 700; font-size: clamp(40px, 6.4vw, 110px); white-space: normal; max-width: 16ch; line-height: 1.02; }
.splash__mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.splash__ch { display: inline-block; transform: translateY(110%); }
@keyframes splash-drift { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }
@media (prefers-reduced-motion: reduce) { .splash { display: none !important; } }
/* homepage load starts with the circle closed at the logo, so nothing flashes before it grows */
html.splash-intro .splash { clip-path: circle(0% at 40px 40px); }
html.splash-arrive .splash { clip-path: circle(150% at 50% 50%); }

/* the hero's 3D balloon stays hidden until the splash has covered the screen, then fades in as the circle opens
   (it is drawn the moment the page loads, which is before the circle has grown) */
.hero__mono { transition: opacity .7s ease; }
html.splash-intro .hero__mono, html.splash-arrive .hero__mono, html.splash-hold .hero__mono { opacity: 0; }

/* page load: keep the page itself hidden while the circle grows, so nothing shows before it covers the screen
   (on phones the page can take a moment to load before the circle starts). Revealed as the circle opens. */
html.splash-intro body > *:not(.splash):not(script) { visibility: hidden; }
/* safety net: if the splash script never runs, the page still appears after 4 seconds */
html.splash-intro body > *:not(.splash):not(script) { animation: splash-unhide 0s linear 4s forwards; }
@keyframes splash-unhide { to { visibility: visible; } }
