/* ==========================================================================
   Prism — styles.css
   Original glass-card design system + motion. Pairs with main.js.

   The whole kit rests on ONE primitive: `.glass`. Everything else
   (cards, nav, modal, stats, templates) is `.glass` plus a modifier.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #05060c;
  --ink: #eef2ff;
  --ink-2: #aab3cc;
  --ink-3: #6b7390;
  --accent: #8ec5ff;
  --accent-2: #c58cff;
  --green: #6ee7b7;
  --amber: #fbbf6d;

  /* glass recipe */
  --g-fill-top: rgba(255, 255, 255, .055);
  --g-fill-bot: rgba(255, 255, 255, .012);
  --g-border-hi: rgba(255, 255, 255, .75);
  --g-border-lo: rgba(255, 255, 255, .05);
  --g-blur: 14px;
  --g-radius: 24px;
  --g-shadow: 0 30px 80px -30px rgba(0, 0, 0, .65);
  /* inner light: crisp top edge, faint bottom edge, soft coloured refraction along the lower-right */
  --g-inner: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(255, 255, 255, .05),
             inset -18px -24px 40px -34px rgba(142, 197, 255, .35), inset 18px 20px 40px -36px rgba(255, 255, 255, .35);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 4vw, 64px);
  --wrap: 1360px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; cursor: none;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: none; }
ul { list-style: none; }
img, svg, canvas { display: block; }
::selection { background: var(--accent); color: var(--bg); }
@media (hover: none) { body, button { cursor: auto; } .cursor, .cursor-ring { display: none; } }

/* Smooth-scroll container (see main.js §1) */
.scroll { position: fixed; top: 0; left: 0; width: 100%; will-change: transform; z-index: 2; }
body.no-smooth .scroll { position: static; will-change: auto; }

/* ---------- Backdrop ---------- */
.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.bg-fallback {
  position: fixed; inset: -20%; z-index: 0; display: none;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(60, 90, 220, .55), transparent 70%),
    radial-gradient(35% 45% at 75% 25%, rgba(170, 70, 220, .45), transparent 70%),
    radial-gradient(45% 45% at 60% 80%, rgba(20, 170, 190, .4), transparent 70%),
    var(--bg);
  filter: blur(40px);
  animation: drift 24s ease-in-out infinite alternate;
}
body.no-webgl .bg { display: none; }
body.no-webgl .bg-fallback { display: block; }
@keyframes drift { to { transform: translate(6%, -4%) rotate(8deg) scale(1.1); } }

/* =========================================================================
   THE GLASS PRIMITIVE
   - translucent gradient fill + backdrop blur/saturate
   - 1px refractive gradient border drawn with a masked ::before
   - pointer-tracking specular sheen on ::after (main.js sets --mx / --my)
   - inner top highlight + soft drop shadow + fine grain
   ========================================================================= */
.glass {
  position: relative;
  border-radius: var(--g-radius);
  background: linear-gradient(160deg, var(--g-fill-top), var(--g-fill-bot));
  -webkit-backdrop-filter: blur(var(--g-blur)) saturate(150%) brightness(1.05);
  backdrop-filter: blur(var(--g-blur)) saturate(150%) brightness(1.05);
  box-shadow: var(--g-shadow), var(--g-inner);
  isolation: isolate;
}
.glass::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, var(--g-border-hi) 0%, var(--g-border-lo) 35%, var(--g-border-lo) 65%, rgba(255,255,255,.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background:
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .14), transparent 42%),
    linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.05) 18%, transparent 32%, transparent 68%, rgba(255,255,255,.03) 84%, rgba(255,255,255,.09) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/></svg>");
  opacity: .6; transition: opacity .5s var(--ease-out);
}
.glass:hover::after { opacity: 1; }
.glass > * { position: relative; z-index: 3; }

/* modifiers */
.glass--dense { --g-fill-top: rgba(255,255,255,.12); --g-fill-bot: rgba(255,255,255,.04); --g-blur: 20px; }
.glass--clear { --g-fill-top: rgba(255,255,255,.03); --g-fill-bot: rgba(255,255,255,0); --g-blur: 8px; }
.glass--accent { --g-fill-top: rgba(142,197,255,.22); --g-fill-bot: rgba(197,140,255,.08); --g-border-hi: rgba(200,225,255,.8); }

/* ---------- 3D tilt (main.js §4 sets --rx / --ry / --tz) ---------- */
.tilt { transform-style: preserve-3d; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform .12s linear, box-shadow .5s var(--ease-out); }
.tilt.is-leaving { transition: transform .9s var(--ease-out); }
.tilt__inner { transform: translateZ(var(--tz, 0px)); transform-style: preserve-3d; height: 100%; display: flex; flex-direction: column; }
.tilt:hover { box-shadow: 0 50px 120px -30px rgba(0,0,0,.8), var(--g-inner); }

/* ---------- Reveals: blur-in (main.js §6 adds .in) ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(28px); filter: blur(14px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; filter: blur(0); }
/* headline words — main.js §5 wraps each word in .wd */
[data-words] .wd { display: inline-block; opacity: 0; transform: translateY(40%) ; filter: blur(10px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i) * 60ms + var(--d, 0s)); }
[data-words].in .wd { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Type ---------- */
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; }
.h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5vw, 68px); line-height: 1.02; letter-spacing: -.03em; max-width: 16ch; }
.section__sub { color: var(--ink-2); max-width: 52ch; font-size: clamp(15px, 1.2vw, 18px); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.08); }

/* ---------- Layout ---------- */
.section { padding: clamp(80px, 10vw, 160px) var(--pad); max-width: var(--wrap); margin: 0 auto; position: relative; }
.section__head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 72px); }

/* ---------- Preloader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); transition: opacity .8s var(--ease), visibility 0s .8s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__glass { width: min(360px, 80vw); padding: 28px; display: grid; gap: 16px; }
.loader__logo { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.loader__track { height: 3px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.loader__fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; transform: scaleX(var(--p, 0)); }
.loader__pct { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Page wipe ---------- */
.wipe { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: linear-gradient(160deg, rgba(142,197,255,.35), rgba(197,140,255,.35)); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); transform: translateY(101%); }
.wipe.is-in  { transition: transform .6s var(--ease); transform: translateY(0); }
.wipe.is-out { transition: transform .6s var(--ease); transform: translateY(-101%); }

/* ---------- Cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 99; pointer-events: none; }
.cursor__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); transition: transform .3s var(--ease-out); }
.cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 98; pointer-events: none;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6);
  display: grid; place-items: center; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  transition: width .4s var(--ease-out), height .4s var(--ease-out), background .4s, border-color .4s, opacity .3s;
}
.cursor-ring.is-link { width: 56px; height: 56px; background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cursor-ring.is-label { width: 84px; height: 84px; background: rgba(255,255,255,.9); color: var(--bg); border-color: transparent; }
.cursor-ring.is-hidden, .cursor.is-hidden { opacity: 0; }
body.is-dragging .cursor-ring { width: 64px; height: 64px; }

/* ---------- Header + nav pill ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--pad); transition: transform .7s var(--ease);
}
.header.is-hidden { transform: translateY(-120%); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; padding: 8px 0; }
.logo__mark { width: 14px; height: 14px; border-radius: 4px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 18px rgba(142,197,255,.7); transform: rotate(45deg); }
/* ---------- Side menu — docked middle-left ---------- */
.sidenav {
  position: fixed; left: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%); z-index: 60;
  --g-radius: 20px; --g-blur: 12px; display: grid; gap: 2px; padding: 10px;
  opacity: 0; translate: -24px 0; transition: opacity 1s var(--ease) .6s, translate 1s var(--ease) .6s;
}
body.is-ready .sidenav { opacity: 1; translate: 0 0; }
.sidenav__link { position: relative; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 500; color: var(--ink-3); transition: color .3s; }
.sidenav__link:hover, .sidenav__link.is-active { color: var(--ink); }
.sidenav__idx { font-size: 10px; letter-spacing: .1em; font-variant-numeric: tabular-nums; opacity: .7; }
.sidenav__txt { display: inline-block; min-width: 6.5em; }
.sidenav__marker { position: absolute; left: 10px; right: 10px; top: var(--my, 10px); height: var(--mh, 0px); border-radius: 12px; background: rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); transition: top .5s var(--ease-out), height .5s var(--ease-out); z-index: 3; }
.sidenav__link.is-active .sidenav__idx { color: var(--accent); opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease-out), box-shadow .4s, background .4s, color .4s;
}
.btn > span { position: relative; z-index: 2; }
.btn--solid { background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px -10px rgba(238,242,255,.5); }
.btn--solid::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(142,197,255,.6) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn--solid:hover::before { transform: translateX(120%); }
.btn--glass {
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); color: var(--ink);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 0 0 1px rgba(255,255,255,.12);
}
.btn--glass:hover { background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 0 0 1px rgba(255,255,255,.25), 0 10px 30px -10px rgba(142,197,255,.4); }
.btn--sm { padding: 10px 16px; font-size: 13px; }
.btn--lg { padding: 18px 32px; font-size: 16px; }
.btn--full { width: 100%; }
[data-magnetic] { will-change: transform; }

/* ---------- Hero (above the fold) ---------- */
.hero {
  min-height: 100svh; position: relative;
  padding: calc(var(--pad) * 1.6 + 40px) var(--pad) var(--pad);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero__head { text-align: center; display: grid; gap: 22px; justify-items: center; position: relative; z-index: 5; max-width: 760px; }
.hero__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 5.6vw, 84px); line-height: 1; letter-spacing: -.035em; max-width: 14ch; }
.hero__sub { color: var(--ink-2); font-size: clamp(15px, 1.2vw, 19px); max-width: 44ch; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero__scroll { position: absolute; left: 50%; bottom: var(--pad); translate: -50% 0; display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.hero__scroll span { width: 36px; height: 1px; background: currentColor; overflow: hidden; position: relative; }
.hero__scroll span::after { content: ''; position: absolute; inset: 0; background: var(--ink); animation: slide 1.6s var(--ease) infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* ---------- Spine layer (fixed canvas behind content: DNA, atoms, jellyfish) ---------- */
.spine { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- Orbit stage: sticky viewport where cards circle the spine ---------- */
.orbit-section { position: relative; height: calc(6 * 230px + 100vh); }   /* main.js sets the exact height from card spacing */
.orbit { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; touch-action: pan-y; }
.helix { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.orbit__ring { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.orbit__hint { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); z-index: 5; pointer-events: none; opacity: var(--hint, 0); transition: opacity .6s; }

/* orbiting glass cards (transform, opacity and z-index set every frame by main.js) */
.ocard {
  position: absolute; left: 0; top: 0; width: 186px; pointer-events: auto;
  padding: 9px; display: grid; gap: 8px; color: inherit; will-change: transform, opacity; opacity: 0;
  --g-radius: 16px; --g-blur: 5px; contain: layout paint;
  -webkit-backdrop-filter: blur(var(--g-blur)); backdrop-filter: blur(var(--g-blur));   /* cheaper than the full glass filter chain */
}
.ocard::after { display: none; }   /* no pointer sheen on moving cards */
.ocard__art { height: 92px; border-radius: 11px; }
.ocard__body { display: grid; gap: 2px; padding: 2px 6px 6px; }
.ocard__body strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.ocard__body span { font-size: 12px; color: var(--ink-3); }
.ocard:hover { --g-fill-top: rgba(255,255,255,.12); }
.ocard.is-front { --g-shadow: 0 40px 90px -30px rgba(0,0,0,.8); }

/* ---------- Cursor lens flares (main.js §16 positions; .is-on toggles) ---------- */
.flares { position: fixed; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity .8s var(--ease); }
.flares.is-on { opacity: 1; }
.flare { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; translate: -50% -50%; }
.flare--core { width: 520px; height: 520px; background: radial-gradient(closest-side, rgba(142,197,255,.30), rgba(197,140,255,.10) 40%, transparent 72%); filter: blur(6px); }
.flare--halo { width: 180px; height: 180px; border: 1.5px solid rgba(255,255,255,.14); box-shadow: inset 0 0 40px rgba(142,197,255,.14), 0 0 40px rgba(197,140,255,.12); }
.flare--ghost { background: radial-gradient(closest-side, rgba(255,255,255,.22), rgba(142,197,255,.10) 55%, transparent 72%); }
.flare--g1 { width: 70px; height: 70px; } .flare--g2 { width: 34px; height: 34px; background: radial-gradient(closest-side, rgba(197,140,255,.45), transparent 72%); }
.flare--g3 { width: 120px; height: 120px; border: 1px solid rgba(255,255,255,.10); background: radial-gradient(closest-side, transparent 60%, rgba(110,231,183,.10) 80%, transparent 100%); }
.flare--g4 { width: 22px; height: 22px; background: radial-gradient(closest-side, rgba(255,255,255,.9), transparent 70%); }
.flare--streak { width: 640px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(142,197,255,.18) 30%, rgba(255,255,255,.3) 50%, rgba(197,140,255,.18) 70%, transparent); filter: blur(2px); }

/* ---------- Assembly (atoms → molecules → structure) ---------- */
.assembly { position: relative; height: clamp(420px, 60vh, 640px); overflow: hidden; --g-radius: 28px; }
.assembly__canvas { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 3; }
.assembly__phases { position: absolute; left: 24px; bottom: 24px; z-index: 4; display: flex; gap: 8px; flex-wrap: wrap; }
.assembly__phases li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); color: var(--ink-3); font-size: 12px; transition: background .5s, color .5s, box-shadow .5s; }
.assembly__phases li strong { font-family: var(--font-display); font-size: 14px; color: var(--ink-2); transition: color .5s; }
.assembly__phases li span:last-child { grid-column: 2; }
.assembly__dot { grid-row: span 2; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.2); transition: background .5s, box-shadow .5s; }
.assembly__phases li.is-on { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); color: var(--ink-2); }
.assembly__phases li.is-on strong { color: var(--ink); }
.assembly__phases li.is-on .assembly__dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.chip { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(142,197,255,.15); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--green { color: var(--green); } .dot.dot--green { background: var(--green); box-shadow: 0 0 10px var(--green); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(from 200deg, #8ec5ff, #c58cff, #6ee7b7, #8ec5ff); box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); flex: none; }
.avatar--lg { width: 48px; height: 48px; }

/* ---------- Strip ---------- */
.strip { padding: 0 var(--pad); max-width: var(--wrap); margin: 0 auto; }
.strip__inner { --g-radius: 18px; display: flex; align-items: center; gap: 28px; padding: 18px 24px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); flex-wrap: wrap; }
.strip__logos { display: flex; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }

/* ---------- Work cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { display: block; padding: 14px; color: inherit; }
.card .tilt__inner { gap: 18px; }
.card__art { aspect-ratio: 16 / 10; border-radius: calc(var(--g-radius) - 8px); overflow: hidden; transform: translateZ(10px); }
.card__body { padding: 6px 10px 12px; display: grid; gap: 10px; }
.card__row { display: flex; justify-content: space-between; align-items: center; }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -.02em; }
.card p { color: var(--ink-2); font-size: 15px; }
.card__arrow { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: transform .5s var(--ease-out), background .4s; }
.card:hover .card__arrow { transform: translate(3px, -3px) rotate(45deg); background: var(--ink); color: var(--bg); }
.tags { display: flex; gap: 8px; } .tags li { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--ink-2); }

/* generated art tiles — replace with <img>/<video> (object-fit: cover) */
.art { position: relative; overflow: hidden; background: var(--bg); }
.art::before { content: ''; position: absolute; inset: -30%; filter: blur(30px); transition: transform 1.4s var(--ease-out); }
.art--1::before { background: radial-gradient(40% 50% at 30% 40%, #8ec5ff, transparent 70%), radial-gradient(40% 50% at 70% 70%, #c58cff, transparent 70%), #101632; }
.art--2::before { background: radial-gradient(45% 55% at 70% 30%, #6ee7b7, transparent 70%), radial-gradient(40% 50% at 25% 75%, #8ec5ff, transparent 70%), #0d1f24; }
.art--3::before { background: radial-gradient(45% 55% at 25% 30%, #fbbf6d, transparent 70%), radial-gradient(40% 50% at 75% 75%, #c58cff, transparent 70%), #24141f; }
.art--4::before { background: radial-gradient(45% 55% at 60% 40%, #ff8fa3, transparent 70%), radial-gradient(40% 50% at 20% 80%, #8ec5ff, transparent 70%), #1a1030; }
.card:hover .art::before, .tpl:hover .art::before { transform: scale(1.12) rotate(6deg); }
.art__shape { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(255,255,255,.35); box-shadow: inset 0 0 40px rgba(255,255,255,.15), 0 0 60px rgba(255,255,255,.08); transition: transform .8s var(--ease-out); }
.art__shape::after { content: ''; position: absolute; inset: 22%; border-radius: 50%; background: rgba(255,255,255,.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.art--2 .art__shape { border-radius: 24%; } .art--3 .art__shape { border-radius: 50% 50% 50% 8%; } .art--4 .art__shape { border-radius: 8%; }
.card:hover .art__shape { transform: translate(-50%, -50%) rotate(20deg) scale(1.08); }

/* ---------- Capabilities ---------- */
.caps { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0; overflow: hidden; }
.caps__tabs { position: relative; padding: 18px; border-right: 1px solid rgba(255,255,255,.08); display: grid; align-content: start; gap: 4px; }
.caps__tabs button { position: relative; z-index: 2; width: 100%; text-align: left; display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 16px; font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 1.8vw, 24px); color: var(--ink-3); transition: color .4s; }
.caps__tabs button[aria-selected="true"], .caps__tabs button:hover { color: var(--ink); }
.caps__idx { font-family: var(--font-body); font-size: 12px; font-weight: 500; letter-spacing: .1em; }
.caps__marker { position: absolute; left: 18px; right: 18px; top: var(--my, 18px); height: var(--mh, 0px); border-radius: 16px; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); transition: top .5s var(--ease-out), height .5s var(--ease-out); z-index: 1; }
.caps__panels { position: relative; padding: clamp(24px, 3vw, 40px); min-height: 540px; }
.caps__panel { position: absolute; inset: clamp(24px, 3vw, 40px); display: grid; gap: 16px; align-content: start; opacity: 0; transform: translateY(16px); filter: blur(10px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease); pointer-events: none; }
.caps__panel.is-active { opacity: 1; transform: none; filter: blur(0); pointer-events: auto; }
.caps__art { height: clamp(160px, 20vw, 260px); border-radius: 16px; }
.caps__panel h3 { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.caps__panel p { color: var(--ink-2); max-width: 52ch; }

/* ---------- Component rail (drag to scroll) ---------- */
.rail { margin: 0 calc(50% - 50vw); padding: 24px calc(50vw - 50%); overflow: hidden; cursor: none; user-select: none; -webkit-user-select: none; }
.rail * { -webkit-user-drag: none; }
.rail__track { display: flex; gap: 20px; width: max-content; will-change: transform; }
.tpl { width: 300px; padding: 22px; flex: none; }
.tpl .tilt__inner { gap: 14px; }
.tpl__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.tpl__big { font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.tpl__big small { font-size: 16px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.tpl__delta { font-size: 13px; font-weight: 500; }
.tpl__muted { color: var(--ink-3); font-size: 13px; display: block; }
.tpl strong { font-weight: 600; }
.spark { display: flex; align-items: flex-end; gap: 6px; height: 56px; margin-top: 6px; }
.spark i { flex: 1; height: var(--h); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--accent), rgba(142,197,255,.2)); transform-origin: bottom; animation: grow 1.2s var(--ease-out) both; }
.spark i:nth-child(n) { animation-delay: calc(var(--k, 0) * 60ms); }
@keyframes grow { from { transform: scaleY(0); } }
.tpl__media { aspect-ratio: 16 / 10; border-radius: 14px; display: grid; place-items: center; }
.tpl__play { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); font-size: 12px; padding-left: 3px; }
.tpl__profile { display: flex; align-items: center; gap: 12px; }
.tpl__actions { display: flex; gap: 8px; }
.notice { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); font-size: 14px; }
.notice__icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(110,231,183,.18); color: var(--green); font-size: 12px; font-weight: 700; flex: none; }
.notice__icon--warn { background: rgba(251,191,109,.18); color: var(--amber); }
.tpl--accent { --g-fill-top: rgba(142,197,255,.2); --g-fill-bot: rgba(197,140,255,.06); --g-border-hi: rgba(200,225,255,.8); }
.checks { display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.checks li::before { content: '✓'; color: var(--green); margin-right: 10px; font-weight: 700; }

/* form primitives */
.field { display: grid; gap: 6px; font-size: 12px; color: var(--ink-3); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1); color: var(--ink); outline: none; transition: border-color .3s, box-shadow .3s; font-size: 14px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: rgba(142,197,255,.6); box-shadow: 0 0 0 4px rgba(142,197,255,.15); }
.toggle { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); cursor: none; }
.toggle input { position: absolute; opacity: 0; }
.toggle__track { width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: background .3s; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.toggle__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .4s var(--ease-out); }
.toggle input:checked + .toggle__track { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.toggle input:checked + .toggle__track::after { transform: translateX(18px); }

/* ---------- Studio / stats ---------- */
.studio__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad); align-items: center; }
.studio__copy { display: grid; gap: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { padding: 26px; display: grid; gap: 6px; color: var(--ink-3); font-size: 13px; }
.stat__num { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 4.5vw, 64px); letter-spacing: -.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- CTA ---------- */
.cta__panel { padding: clamp(40px, 6vw, 96px); display: grid; gap: 20px; justify-items: start; overflow: hidden; }
.cta__panel .h2 { max-width: 14ch; }
.cta__glow { position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(142,197,255,.35), rgba(197,140,255,.12) 50%, transparent 75%); filter: blur(20px); animation: pulse 6s ease-in-out infinite alternate; z-index: 0; }
@keyframes pulse { to { transform: translate(-10%, 10%) scale(1.15); } }

/* ---------- Footer ---------- */
.footer { max-width: var(--wrap); margin: 0 auto; padding: var(--pad); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); border-top: 1px solid rgba(255,255,255,.08); }
.footer__links { display: flex; gap: 20px; } .footer a:hover { color: var(--ink); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5,6,12,.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity .5s var(--ease); }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__panel { width: min(520px, 100%); padding: 32px; display: grid; gap: 14px; --g-fill-top: rgba(255,255,255,.14); --g-fill-bot: rgba(255,255,255,.05); opacity: 0; transform: translateY(30px) scale(.96); filter: blur(12px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s var(--ease); }
.modal.is-open .modal__panel { opacity: 1; transform: none; filter: blur(0); transition-delay: .1s; }
.modal__panel h3 { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.modal__form { display: grid; gap: 12px; margin-top: 6px; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 12px; transition: background .3s, transform .4s var(--ease-out); }
.modal__close:hover { background: rgba(255,255,255,.18); transform: rotate(90deg); }

/* keep content clear of the docked side menu on wide screens */
@media (min-width: 1001px) {
  main > .section, main > .strip, main > .footer { padding-left: max(var(--pad), calc(224px - max(0px, (100vw - var(--wrap)) / 2))); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { padding-top: 96px; padding-bottom: 88px; }
  .footer { padding-bottom: 96px; }
  .ocard { width: 150px; --g-blur: 4px; } .ocard__art { height: 76px; }
  .cards { grid-template-columns: 1fr; }
  .caps { grid-template-columns: 1fr; }
  .caps__tabs { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); grid-template-columns: 1fr 1fr; }
  .caps__marker { display: none; }
  .caps__tabs button { font-size: 16px; padding: 12px 14px; }
  .caps__panels { min-height: 480px; }
  .studio__grid { grid-template-columns: 1fr; }
  /* side menu becomes a bottom pill */
  .sidenav { left: 50%; top: auto; bottom: 14px; transform: translateX(-50%); --g-radius: 999px; grid-auto-flow: column; gap: 0; padding: 6px; max-width: calc(100vw - 28px); overflow-x: auto; }
  .sidenav__link { padding: 8px 12px; border-radius: 999px; }
  .sidenav__idx, .sidenav__marker { display: none; }
  .sidenav__txt { min-width: 0; }
  .flare--core { width: 320px; height: 320px; } .flare--streak { width: 480px; }
  .assembly__phases { left: 12px; bottom: 12px; gap: 6px; }
  .assembly__phases li { padding: 8px 10px; } .assembly__phases li span:last-child { display: none; }
}
@media (max-width: 560px) {
  .hero__title { font-size: clamp(30px, 9vw, 44px); }
  .ocard { width: 128px; padding: 8px; } .ocard__art { height: 62px; } .ocard__body strong { font-size: 13px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 18px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .header .btn { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  [data-reveal], [data-words] .wd { opacity: 1 !important; transform: none !important; filter: none !important; }
  .tilt { transform: none !important; }
  .flares { display: none; }
  .ocard { opacity: 1 !important; }
  .cursor, .cursor-ring { display: none; } body, button { cursor: auto; }
}

/* Contact details + SZDigital credit */
.contact { list-style: none; display: grid; gap: 10px; margin-top: 8px; position: relative; z-index: 1; }
.contact li { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; font-size: 16px; }
.contact__k { min-width: 92px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.contact a { color: var(--ink); border-bottom: 1px solid rgba(255,255,255,.25); transition: border-color .3s; }
.contact a:hover { border-color: var(--accent); }
.contact--modal { margin: 0 0 4px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer__credit { flex-basis: 100%; text-align: center; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.06); letter-spacing: .04em; }
.footer__credit a { color: var(--ink); font-weight: 600; }
