/* ==========================================================================
   GlitchRealm Labs — visual language modelled on labs.google:
   bright white canvas, near-black type, large rounded cards, pill buttons,
   Google four-colour accents and generous whitespace.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f1f3f4;
  --surface-2: #e8eaed;
  --ink: #1f1f1f;
  --ink-2: #444746;
  --ink-3: #747775;
  --line: #e3e3e3;
  --blue: #4285f4;
  --red: #ea4335;
  --yellow: #fbbc04;
  --green: #34a853;
  --night: #05060d;
  --radius-xl: 40px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --pad: clamp(20px, 4vw, 56px);
  --max: 1440px;
  --font: "Google Sans Flex", "Google Sans", "Product Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 99px;
}
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #e8eaed; }
.btn-ghost { background: transparent; border-color: #c4c7c5; color: var(--ink); }
.btn-ghost:hover { background: var(--surface); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 72px; padding: 0 var(--pad);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  transition: box-shadow .3s;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; color: var(--ink); justify-self: start; }
.brand-mark { width: 28px; height: 28px; }
.brand-word { letter-spacing: -0.01em; }
.brand-word strong { font-weight: 500; }
.nav-links { display: flex; gap: 4px; background: var(--surface); padding: 4px; border-radius: 999px; }
.nav-links a {
  padding: 8px 18px; border-radius: 999px; font-size: 15px; color: var(--ink-2);
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: #fff; color: var(--ink); }
.nav-links a.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.nav-cta { justify-self: end; }
.menu-btn { display: none; }

.mobile-menu {
  position: fixed; inset: 72px 0 0; z-index: 49; background: #fff;
  display: flex; flex-direction: column; gap: 4px; padding: 24px var(--pad);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) { font-size: 32px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 24px; align-self: flex-start; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 12vw, 160px) var(--pad) clamp(48px, 7vw, 96px);
  text-align: center;
}
.eyebrow {
  font-family: var(--mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 28px;
}
.eyebrow-light { color: rgba(255,255,255,.6); }
.hero-title {
  font-size: clamp(44px, 8.4vw, 128px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 400;
}
.rotator {
  display: inline-block; position: relative; vertical-align: bottom;
  background: linear-gradient(90deg, var(--blue), #a142f4 30%, var(--red) 55%, var(--yellow) 80%, var(--green));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hue 8s linear infinite;
}
.rotator span { display: inline-block; transition: opacity .4s var(--ease), transform .4s var(--ease), filter .4s; }
.rotator span.is-out { opacity: 0; transform: translateY(30%); filter: blur(6px); }
@keyframes hue { to { background-position: -200% 0; } }
.hero-sub {
  max-width: 640px; margin: 32px auto 0;
  font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2);
}
.hero-actions { margin-top: 44px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Featured ---------- */
.featured { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.featured-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-xl); background: var(--night); color: #fff;
  min-height: clamp(560px, 70vw, 820px);
  display: flex; flex-direction: column; justify-content: flex-end;
  cursor: crosshair;
}
#cosmos { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.featured-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, rgba(5,6,13,.92) 0%, rgba(5,6,13,.4) 35%, rgba(5,6,13,0) 60%);
}
.featured-content { padding: clamp(28px, 5vw, 72px); max-width: 860px; pointer-events: none; }
.featured-content a, .featured-content .chip { pointer-events: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
}
.chip-glass { background: rgba(255,255,255,.12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.18); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,168,83,.7); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(52,168,83,0); } 100% { box-shadow: 0 0 0 0 rgba(52,168,83,0); } }
.featured-title { font-size: clamp(48px, 8vw, 112px); line-height: 1; letter-spacing: -0.045em; margin: 24px 0 20px; }
.featured-desc { font-size: clamp(17px, 1.5vw, 21px); color: rgba(255,255,255,.78); max-width: 620px; }
.featured-actions { margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hint { font-family: var(--mono); font-size: 13px; color: rgba(255,255,255,.55); }
.featured-meta {
  position: absolute; top: clamp(20px, 3vw, 36px); right: clamp(20px, 3vw, 36px);
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; pointer-events: none;
}
.featured-meta span {
  font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.12);
}

.feature-points {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 16px;
}
.point { background: var(--surface); border-radius: var(--radius-lg); padding: 32px 28px 36px; }
.point h3 { font-size: 22px; margin: 28px 0 10px; }
.point p { color: var(--ink-2); font-size: 16px; }
.point-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.point-icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-blue { background: var(--blue); } .c-red { background: var(--red); } .c-yellow { background: var(--yellow); } .c-green { background: var(--green); }

/* ---------- Experiments ---------- */
.experiments { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--pad) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 40px; }
.section-title { font-size: clamp(40px, 5.6vw, 80px); line-height: 1.04; letter-spacing: -0.04em; }
.section-sub { font-size: 19px; color: var(--ink-2); max-width: 520px; justify-self: end; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  height: 40px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1px solid #c4c7c5; font-size: 15px; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.filter:hover { background: var(--surface); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .5s var(--ease), opacity .4s var(--ease), background .3s;
}
.card.is-hidden { display: none; }
a.card:hover { background: var(--surface-2); }
.card:hover .card-art > * { transform: scale(1.05); }
.card-xl { grid-column: span 2; grid-row: span 2; }
.card-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin: 12px 12px 0; border-radius: var(--radius-md); }
.card-art > * { transition: transform .8s var(--ease); }
.card-tall { grid-row: span 2; }
.card-xl .card-art, .card-tall .card-art { flex: 1; aspect-ratio: auto; min-height: 360px; }
.card-body { padding: 24px 28px 30px; }
.card-tags { display: flex; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: #fff; color: var(--ink-2); }
.tag-live { background: #c4eed0; color: #0d652d; display: inline-flex; align-items: center; gap: 6px; }
.tag-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent, var(--green)); }
.tag-soon { background: transparent; border: 1px solid #c4c7c5; }
.card h3 { font-size: 26px; margin-bottom: 8px; }
.card-xl h3 { font-size: clamp(32px, 3vw, 44px); }
.card p { color: var(--ink-2); font-size: 16px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 500; }
.card-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .3s var(--ease); }
a.card:hover .card-link svg { transform: translate(2px, -2px); }

/* Card artworks */
.art-cosmos { background: var(--night); }
.mini-cosmos { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-wave { background: linear-gradient(135deg, #d3e3fd, #e9d7fd); display: grid; place-items: center; }
.bars { display: flex; gap: 6px; align-items: center; height: 50%; }
.bars i { width: 8px; border-radius: 8px; background: var(--blue); height: 30%; animation: bar 1.4s var(--ease) infinite alternate; }
.bars i:nth-child(odd) { background: #a142f4; }
.bars i:nth-child(1){animation-delay:-.1s}.bars i:nth-child(2){animation-delay:-.5s}.bars i:nth-child(3){animation-delay:-.9s}.bars i:nth-child(4){animation-delay:-.3s}.bars i:nth-child(5){animation-delay:-1.1s}.bars i:nth-child(6){animation-delay:-.7s}.bars i:nth-child(7){animation-delay:-.2s}.bars i:nth-child(8){animation-delay:-1.3s}.bars i:nth-child(9){animation-delay:-.6s}.bars i:nth-child(10){animation-delay:-1s}.bars i:nth-child(11){animation-delay:-.4s}.bars i:nth-child(12){animation-delay:-.8s}
@keyframes bar { to { height: 100%; } }
.art-grid { background: #fef7e0; display: grid; place-items: center; }
.tiles {
  width: 70%; aspect-ratio: 2 / 1;
  background:
    linear-gradient(90deg, transparent 48%, var(--yellow) 48% 52%, transparent 52%) 0 0 / 25% 50%,
    linear-gradient(transparent 48%, #e37400 48% 52%, transparent 52%) 0 0 / 25% 50%;
  border-radius: 12px; animation: slide 6s linear infinite;
}
@keyframes slide { to { background-position: 100% 0, 100% 0; } }
.art-hypergrid { background: radial-gradient(120% 90% at 50% 40%, #06281a, #020a06 70%); }
.art-fluidlab { background: radial-gradient(120% 90% at 50% 40%, #2a1004, #0d0502 70%); }
.art-kinetic { background: radial-gradient(120% 100% at 50% 30%, #f7f2ff, #ede5ff 75%); }
.mini-hypergrid, .mini-fluid, .mini-kinetic { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.card-wide { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
.card-wide .card-art { flex: 1.3; aspect-ratio: auto; min-height: 240px; margin: 12px 0 12px 12px; }
.card-wide .card-body { flex: 1; align-self: center; padding: 32px 40px; }
.art-utils { background: radial-gradient(120% 100% at 30% 20%, #eef3ff, #dbe6ff 75%); display: grid; place-items: center; }
.util-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: min(78%, 420px); }
.util-tiles i {
  font-style: normal; font-weight: 600; font-size: clamp(14px, 1.6vw, 20px); color: #0059ff;
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px;
  background: #fff; box-shadow: 0 6px 18px -10px rgba(0, 89, 255, .45);
  animation: util-pick 4s var(--ease) infinite;
}
.util-tiles i:nth-child(2){animation-delay:.5s}.util-tiles i:nth-child(3){animation-delay:1s}.util-tiles i:nth-child(4){animation-delay:1.5s}.util-tiles i:nth-child(5){animation-delay:3.5s}.util-tiles i:nth-child(6){animation-delay:3s}.util-tiles i:nth-child(7){animation-delay:2.5s}.util-tiles i:nth-child(8){animation-delay:2s}
@keyframes util-pick { 0%, 20%, 100% { background: #fff; color: #0059ff; transform: none; } 6%, 12% { background: #0059ff; color: #fff; transform: translateY(-4px); } }
.art-rings { background: #1f1f1f; display: grid; place-items: center; }
.art-rings i { position: absolute; border-radius: 50%; border: 2px solid var(--yellow); width: 20%; aspect-ratio: 1; animation: ring 3s ease-out infinite; opacity: 0; }
.art-rings i:nth-child(2) { animation-delay: 1s; border-color: var(--red); }
.art-rings i:nth-child(3) { animation-delay: 2s; border-color: var(--blue); }
@keyframes ring { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }

/* ---------- Sessions band ---------- */
.sessions { padding: clamp(96px, 12vw, 180px) var(--pad) 0; }
.sessions-inner {
  max-width: var(--max); margin: 0 auto; border-radius: var(--radius-xl);
  padding: clamp(48px, 9vw, 140px) clamp(28px, 8vw, 120px);
  background:
    radial-gradient(60% 80% at 10% 0%, rgba(66,133,244,.45), transparent 60%),
    radial-gradient(50% 70% at 100% 100%, rgba(234,67,53,.35), transparent 60%),
    radial-gradient(40% 60% at 70% 10%, rgba(251,188,4,.25), transparent 60%),
    var(--ink);
  color: #fff;
}
.sessions-title { font-size: clamp(30px, 4.2vw, 60px); line-height: 1.15; letter-spacing: -0.03em; max-width: 1100px; }
.sessions-by { margin-top: 32px; color: rgba(255,255,255,.65); font-size: 18px; }

/* ---------- About ---------- */
.about { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--pad) 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.about-copy p { font-size: clamp(19px, 1.6vw, 24px); color: var(--ink-2); margin-bottom: 24px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; border-top: 1px solid var(--line); padding-top: 32px; }
.stat-num { display: block; font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.04em; line-height: 1; }
.stat-label { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-3); }

/* ---------- CTA ---------- */
.cta { max-width: var(--max); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--pad); }
.cta-card { text-align: center; background: var(--surface); border-radius: var(--radius-xl); padding: clamp(56px, 8vw, 120px) var(--pad); }
.cta-card h2 { font-size: clamp(36px, 5.4vw, 76px); letter-spacing: -0.04em; line-height: 1.05; }
.cta-card p { margin: 20px auto 40px; max-width: 560px; font-size: 19px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.footer { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding: 48px 0; border-top: 1px solid var(--line); }
.footer-cols { display: flex; gap: clamp(32px, 6vw, 96px); flex-wrap: wrap; }
.footer-cols h4 { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.footer-cols a { display: block; color: var(--ink-2); font-size: 15px; padding: 4px 0; }
.footer-cols a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }

/* ---------- Intro splash (plays once per session) ---------- */
.intro-screen { display: none; }
.intro .intro-screen {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; overflow: hidden;
  background: #fff; color: var(--ink);
  animation: intro-exit .9s var(--ease) 3.5s forwards;
}
.intro-screen.is-skipped { animation: intro-exit .55s var(--ease) forwards; }
@keyframes intro-exit { from { clip-path: inset(0 0 0 0 round 0); } to { clip-path: inset(0 0 100% 0 round 0 0 48px 48px); visibility: hidden; } }
.intro-stage {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 var(--pad);
}
.intro .intro-stage { animation: intro-lift .9s var(--ease) 3.5s forwards; }
@keyframes intro-lift { to { transform: translateY(-12vh); opacity: 0; } }

/* Four colour orbs dance around the centre, then fall into the flask. */
.intro-orbs { position: absolute; left: 50%; top: 50%; width: 0; height: 0; animation: orbs-spin 1.3s var(--ease) forwards; }
.intro-orbs i {
  position: absolute; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
  animation: orb 1.5s var(--ease) var(--d, 0s) forwards;
}
.o-blue { background: var(--blue); --x: -64px; --y: -40px; }
.o-red { background: var(--red); --x: 64px; --y: -40px; --d: .06s; }
.o-yellow { background: var(--yellow); --x: 64px; --y: 40px; --d: .12s; }
.o-green { background: var(--green); --x: -64px; --y: 40px; --d: .18s; }
@keyframes orb {
  0% { transform: translate(0, 0) scale(0); }
  30% { transform: translate(var(--x), var(--y)) scale(1.15); }
  45% { transform: translate(var(--x), var(--y)) scale(1); }
  80% { transform: translate(0, -46px) scale(.5); opacity: 1; }
  100% { transform: translate(0, -46px) scale(0); opacity: 0; }
}
@keyframes orbs-spin { from { transform: rotate(-90deg); } to { transform: rotate(0deg); } }

.intro-mark { width: clamp(72px, 9vw, 112px); height: auto; overflow: visible; margin-bottom: 28px; }
.intro-flask {
  fill: var(--ink); fill-opacity: 0; stroke: var(--ink); stroke-width: .9; stroke-linejoin: round;
  stroke-dasharray: 80; stroke-dashoffset: 80;
  animation: flask-draw .9s var(--ease) .9s forwards, flask-fill .4s ease 1.6s forwards;
}
@keyframes flask-draw { to { stroke-dashoffset: 0; } }
@keyframes flask-fill { to { fill-opacity: 1; } }
.intro-mark .bub { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: bubble .6s cubic-bezier(.3, 1.6, .5, 1) var(--d) forwards; }
.bub1 { --d: 1.7s; } .bub2 { --d: 1.8s; } .bub3 { --d: 1.9s; } .bub4 { --d: 2s; }
@keyframes bubble { to { transform: scale(1); } }

.intro-word { font-size: clamp(34px, 9.5vw, 132px); line-height: 1.05; letter-spacing: -0.045em; white-space: nowrap; }
.intro-word strong { font-weight: 500; }
.intro-word span:not(.sp) {
  display: inline-block; opacity: 0; transform: translateY(60%) rotate(6deg); filter: blur(8px);
  animation: letter .8s var(--ease) calc(1.5s + var(--i) * 40ms) forwards;
}
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }

.intro-tag { margin-top: 20px; font-size: clamp(18px, 2.2vw, 30px); color: var(--ink-2); letter-spacing: -0.01em; }
.intro-tag span {
  display: inline-block; opacity: 0; transform: translateY(14px);
  animation: tag-word .7s var(--ease) calc(2.3s + var(--i) * 90ms) forwards;
}
@keyframes tag-word { to { opacity: 1; transform: none; } }
.intro-tag .intro-grad {
  background: linear-gradient(90deg, var(--blue), #a142f4 30%, var(--red) 55%, var(--yellow) 80%, var(--green));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: tag-word .7s var(--ease) calc(2.3s + var(--i) * 90ms) forwards, hue 4s linear infinite;
}

.intro-skip {
  position: absolute; right: var(--pad); bottom: 32px;
  height: 40px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 0; font-size: 14px; color: var(--ink-2);
  opacity: 0; animation: tag-word .5s var(--ease) .6s forwards;
}
.intro-skip:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Hover play ----------
   Pointer-driven extras (tilt, spotlight, magnetic buttons) get their --vars from main.js.
   Only for real hover devices that haven't asked for reduced motion. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.18) rotate(-12deg); } 65% { transform: scale(.94) rotate(8deg); } 100% { transform: scale(1.06) rotate(0); } }
@keyframes bubble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes live-ping { 50% { transform: scale(1.7); } }
@keyframes hero-glow { to { transform: translate(-50%, -50%) rotate(360deg); } }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* Buttons: pulled toward the cursor, with a spinning four-colour halo on solid buttons. */
  .btn, .filter { transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, translate .35s var(--ease), scale .25s var(--ease); }
  .btn:active, .filter:active { scale: .96; }
  .btn-dark, .btn-light { position: relative; isolation: isolate; }
  .btn-dark::before, .btn-light::before {
    content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: inherit;
    background: conic-gradient(from var(--spin), var(--blue), var(--red), var(--yellow), var(--green), var(--blue));
    filter: blur(6px); opacity: 0; transition: opacity .3s var(--ease);
  }
  .btn-dark:hover::before, .btn-light:hover::before { opacity: .9; animation: spin 2.4s linear infinite; }
  .filter:hover { border-color: var(--ink-3); }

  /* Brand: the flask bubbles fizz. */
  .brand-mark circle { transform-box: fill-box; transform-origin: center; }
  .brand:hover .brand-mark circle { animation: bubble .7s var(--ease) infinite; }
  .brand:hover .brand-mark circle:nth-of-type(2) { animation-delay: .1s; }
  .brand:hover .brand-mark circle:nth-of-type(3) { animation-delay: .2s; }
  .brand:hover .brand-mark circle:nth-of-type(4) { animation-delay: .3s; }

  /* Hero: a soft colour glow trails the cursor. */
  .hero { position: relative; isolation: isolate; }
  .hero::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: var(--mx, 50%); top: var(--my, 50%); width: 420px; aspect-ratio: 1; border-radius: 50%;
    background: conic-gradient(var(--blue), var(--red), var(--yellow), var(--green), var(--blue));
    filter: blur(90px); opacity: 0; transform: translate(-50%, -50%);
    transition: opacity .6s var(--ease), left .5s var(--ease), top .5s var(--ease);
    animation: hero-glow 10s linear infinite;
  }
  .hero:hover::before { opacity: .22; }

  /* Feature points: lift, tint and a bouncy icon. */
  .point { transition: opacity .9s var(--ease), transform .9s var(--ease), translate .4s var(--ease), background .3s; }
  .point:hover { translate: 0 -6px; }
  .point:hover .point-icon { animation: pop .6s var(--ease) forwards; }
  .point:has(.c-blue):hover { background: #e8f0fe; }
  .point:has(.c-red):hover { background: #fce8e6; }
  .point:has(.c-yellow):hover { background: #fef7e0; }
  .point:has(.c-green):hover { background: #e6f4ea; }

  /* Cards: tilt toward the cursor under a spotlight in the card's accent colour. */
  .card {
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
    transition: transform .6s var(--ease), box-shadow .4s var(--ease), background .3s;
  }
  .card:hover { --lift: -6px; box-shadow: 0 24px 48px -24px rgba(31, 31, 31, .35); transition: transform .2s ease-out, box-shadow .4s var(--ease), background .3s; }
  .card::after, .cta-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent, var(--blue)) 22%, transparent), transparent 70%);
    opacity: 0; transition: opacity .4s var(--ease);
  }
  .card:hover::after, .cta-card:hover::after { opacity: 1; }
  .cta-card { position: relative; overflow: hidden; }
  .card-link { transition: gap .3s var(--ease); }
  a.card:hover .card-link { gap: 10px; }
  a.card:hover .tag-live::before { animation: live-ping 1s var(--ease) infinite; }

  /* Coming-soon art plays faster while hovered. */
  .card:hover .bars i { animation-duration: .5s; }
  .card:hover .tiles { animation-duration: 2s; }
  .card:hover .art-rings i { animation-duration: 1.5s; }
  .card:hover .util-tiles i { animation-duration: 2.4s; }

  /* Stats light up in the four-colour gradient. */
  .stat { cursor: default; }
  .stat-num { transition: color .3s; }
  .stat:hover .stat-num {
    background: linear-gradient(90deg, var(--blue), #a142f4 30%, var(--red) 55%, var(--yellow) 80%, var(--green));
    background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: hue 3s linear infinite;
  }

  /* Footer links: a four-colour underline sweeps in. */
  .footer-cols a {
    background: linear-gradient(90deg, var(--blue), var(--red), var(--yellow), var(--green)) left bottom / 0 2px no-repeat;
    transition: background-size .35s var(--ease), color .2s;
  }
  .footer-cols a:hover { text-decoration: none; background-size: 100% 2px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .feature-points { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-xl { grid-column: span 2; grid-row: auto; }
  .card-tall { grid-row: auto; }
}
@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    border: 0; background: var(--surface); border-radius: 50%; cursor: pointer;
  }
  .menu-btn span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease); }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .section-head, .about-grid { grid-template-columns: 1fr; }
  .section-sub { justify-self: start; }
  .featured-meta { display: none; }
}
@media (max-width: 620px) {
  .feature-points, .grid { grid-template-columns: 1fr; }
  .card-xl { grid-column: auto; }
  .card-xl .card-art, .card-tall .card-art { min-height: 260px; }
  .card-wide { flex-direction: column; }
  .card-wide .card-art { flex: none; aspect-ratio: 16 / 10; min-height: 0; margin: 12px 12px 0; }
  .card-wide .card-body { padding: 24px 28px 30px; }
  .stats { grid-template-columns: 1fr; }
  .featured-card { border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
