/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --bg: #06060b;
  --bg-2: #0c0b14;
  --fg: #efedf7;
  --muted: #a7a2bd;
  --dim: #6f6a86;
  --line: rgb(255 255 255 / 0.09);
  --line-2: rgb(255 255 255 / 0.16);
  --panel: rgb(16 14 26 / 0.55);
  /* The accent is rewritten every frame from the scroll position (see main.js). */
  --acc: 167 139 250;
  --accent: rgb(var(--acc));
  --accent-soft: rgb(var(--acc) / 0.16);
  --accent-text: color-mix(in oklab, rgb(var(--acc)) 72%, white);

  --f-display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --f-body: 'Space Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --gutter: clamp(16px, 6vw, 112px);
  --side: clamp(16px, 9vw, 150px);
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.booting { overflow: hidden; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--fg); color: var(--bg); border-radius: 8px; }
.skip:focus { top: 16px; }

/* ───────────────────────── Backdrop layers ───────────────────────── */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
body.no-webgl #scene { display: none; }
body.no-webgl {
  background:
    radial-gradient(60vw 60vw at 75% 20%, rgb(var(--acc) / 0.22), transparent 60%),
    radial-gradient(50vw 50vw at 10% 90%, rgb(var(--acc) / 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgb(0 0 0 / 0.75)); }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  --mx: 0px; --my: 0px;
  position: relative; display: inline-flex; align-items: center; gap: 0.6em;
  min-height: 52px; padding: 0 1.6em; border-radius: 999px;
  font: 600 0.95rem/1 var(--f-body); letter-spacing: 0.01em; white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform 0.5s var(--ease), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.4s, opacity 0.3s;
}
.btn svg { transition: transform 0.4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-solid { background: var(--fg); color: var(--bg); box-shadow: 0 0 0 0 rgb(var(--acc) / 0); }
.btn-solid:hover { background: var(--accent-text); box-shadow: 0 10px 40px -8px rgb(var(--acc) / 0.65); }
.btn-ghost { border: 1px solid var(--line-2); background: rgb(255 255 255 / 0.03); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn:disabled { opacity: 0.35; cursor: progress; }

/* ───────────────────────── Boot ───────────────────────── */
#boot {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(80% 70% at 50% 40%, #120f22, var(--bg) 70%);
  transition: clip-path 1.2s var(--ease-in), opacity 0.6s 0.7s;
  clip-path: inset(0 0 0 0);
}
#boot.gone { clip-path: inset(0 0 100% 0); opacity: 0; pointer-events: none; }
.boot-inner { width: min(640px, 100%); display: grid; gap: 22px; }
.boot-tag { color: var(--dim); }
.boot-title { font: 900 clamp(2.6rem, 9vw, 5.6rem)/0.92 var(--f-display); letter-spacing: -0.03em; text-transform: uppercase; }
.boot-log { min-height: 7.5em; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: none; display: grid; gap: 4px; align-content: start; }
.boot-log li::before { content: '› '; color: var(--accent); }
.boot-log .ok { color: var(--accent-text); }
.boot-bar { height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.boot-bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.3s; box-shadow: 0 0 18px var(--accent); }
.boot-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.boot-hint { color: var(--dim); font-size: 0.68rem; letter-spacing: 0.1em; }

/* ───────────────────────── HUD ───────────────────────── */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter); pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--fg); position: relative; display: grid; place-items: center; transition: transform 0.6s var(--ease); }
.logo-mark::before, .logo-mark::after { content: ''; position: absolute; background: var(--fg); }
.logo-mark::before { width: 1.5px; height: 40px; }
.logo-mark::after { height: 1.5px; width: 40px; }
.logo-mark i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); z-index: 1; }
.hud-logo:hover .logo-mark { transform: rotate(90deg); }
.hud-right { display: flex; gap: 10px; align-items: center; }
.sound, .menu-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgb(8 8 14 / 0.5); backdrop-filter: blur(12px);
  transition: border-color 0.3s, background 0.3s;
}
.sound:hover, .menu-btn:hover { border-color: var(--accent); }
.bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.bars i { width: 2px; height: 100%; background: var(--fg); border-radius: 1px; transform: scaleY(var(--h, 0.18)); transition: transform 0.08s linear; }
.sound[aria-pressed='true'] .bars i { background: var(--accent-text); }
.sound-label { font-size: 0.68rem; }
.burger { display: grid; gap: 5px; width: 18px; }
.burger i { height: 1.5px; background: var(--fg); transition: transform 0.45s var(--ease); }
.menu-btn[aria-expanded='true'] .burger i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded='true'] .burger i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.hud-side {
  position: fixed; left: clamp(16px, 2.6vw, 40px); top: 50%; z-index: 20; transform: translateY(-50%);
  display: grid; justify-items: center; gap: 14px; color: var(--muted); pointer-events: none;
}
.lvl-num { font: 500 1.6rem/1 var(--f-display); color: var(--fg); letter-spacing: 0; }
.lvl-line { width: 1px; height: 90px; background: linear-gradient(var(--accent), transparent); }
.lvl-name { writing-mode: vertical-rl; letter-spacing: 0.3em; font-size: 0.66rem; }

.hud-bottom {
  position: fixed; inset: auto 0 0 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gutter); color: var(--dim); font-size: 0.66rem; pointer-events: none;
}
.xp { display: inline-flex; align-items: center; gap: 10px; }
.xp-label { color: var(--accent-text); }
.xp-track { width: clamp(80px, 18vw, 240px); height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.xp-fill { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.xp-val { min-width: 4ch; color: var(--muted); }

/* ───────────────────────── Menu ───────────────────────── */
.menu {
  position: fixed; inset: 0; z-index: 25; display: grid; align-content: center; gap: 28px; padding: 100px var(--gutter) 60px;
  background: rgb(6 6 11 / 0.82); backdrop-filter: blur(20px);
  animation: menu-in 0.6s var(--ease);
}
.menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; } }
.menu-title { color: var(--accent-text); }
.menu ol { display: grid; gap: 2px; }
.menu a {
  display: flex; align-items: baseline; gap: 18px; padding: 6px 0;
  font: 700 clamp(1.8rem, 5.4vw, 4rem)/1.1 var(--f-display); text-transform: uppercase; letter-spacing: -0.02em;
  color: var(--muted); transition: color 0.3s, transform 0.5s var(--ease);
  animation: menu-link 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.menu a span { color: var(--accent-text); font-size: 0.75rem; }
.menu a:hover, .menu a:focus-visible { color: var(--fg); transform: translateX(14px); }
@keyframes menu-link { from { opacity: 0; transform: translateY(30px); } }

/* ───────────────────────── Cursor: a glowing dot, and a ring that trails behind it ───────────────────────── */
.cursor, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.has-cursor .cursor, .has-cursor .cursor-ring { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [tabindex] { cursor: none; }
.cursor::before {
  content: ''; position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: var(--fg); box-shadow: 0 0 12px 2px rgb(var(--acc) / 0.8);
  transition: transform 0.35s var(--ease), background 0.3s;
}
.cursor-ring::before {
  content: ''; position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.35); background: rgb(var(--acc) / 0);
  transition: transform 0.5s var(--ease), border-color 0.3s, background 0.3s;
}
.cursor.hover::before { transform: scale(0.5); background: var(--accent-text); }
.cursor-ring.hover::before { transform: scale(1.8); border-color: rgb(var(--acc) / 0.7); background: rgb(var(--acc) / 0.12); backdrop-filter: blur(2px); }
.cursor-ring.press::before { transform: scale(0.75); transition-duration: 0.12s; }
.cursor-ring.hover.press::before { transform: scale(1.45); }
.ripple { position: fixed; z-index: 89; pointer-events: none; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 1.5px solid var(--accent); animation: ripple 0.6s var(--ease) forwards; }
@keyframes ripple { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(2.6); opacity: 0; } }

/* ───────────────────────── Shared section bits ───────────────────────── */
main { position: relative; z-index: 2; }
section { position: relative; padding: clamp(110px, 18vh, 200px) var(--gutter) clamp(80px, 14vh, 160px) var(--side); }
.eyebrow { color: var(--accent-text); display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.sec-head { display: grid; gap: 22px; margin-bottom: clamp(48px, 8vh, 90px); }
.sec-title { font: 700 clamp(2.3rem, 6.4vw, 5.6rem)/1.0 var(--f-display); letter-spacing: -0.035em; text-transform: uppercase; }
em { font-style: normal; color: var(--accent-text); }

/* Scroll reveal */
[data-reveal] {
  opacity: 0; transform: translate3d(0, 44px, 0) rotateX(-14deg); transform-origin: 50% 100%; filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0.02em 0.1em; margin: -0.04em -0.02em -0.1em; }
.split-c { display: inline-block; transform: translate3d(0, 112%, 0) rotate(7deg); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 26ms + var(--d, 0) * 90ms); will-change: transform; }
.in .split-c, .split-c.in { transform: none; }

/* ───────────────────────── Hero ───────────────────────── */
.hero { min-height: 100svh; display: grid; align-content: end; gap: clamp(20px, 3.4vh, 36px); padding-bottom: clamp(90px, 13vh, 140px); }
.hero-hi { font: 400 clamp(1.15rem, 1.8vw, 1.6rem)/1.2 var(--f-body); color: var(--muted); margin-bottom: -0.4em; }
.hero-name { font: 900 clamp(2.5rem, 10.2vw, 11.5rem)/0.86 var(--f-display); white-space: nowrap; letter-spacing: -0.055em; text-transform: uppercase; display: grid; margin-left: -0.05em; }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--fg); transition: color 0.6s; }
.hero-name .outline { -webkit-text-stroke-width: clamp(1px, 0.18vw, 2.5px); }
.hero-name:hover .outline { color: rgb(var(--acc) / 0.18); }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px; }
.hero-lede { max-width: 34ch; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--muted); }
.inline-link { color: var(--fg); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1.5px no-repeat; padding-bottom: 2px; transition: background-size 0.4s var(--ease), color 0.3s; }
.inline-link:hover { color: var(--bg); background-size: 100% 100%; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-hint { position: absolute; right: var(--gutter); top: 50%; display: grid; justify-items: center; gap: 14px; color: var(--dim); font-size: 0.62rem; writing-mode: vertical-rl; }
.scroll-hint i { width: 1px; height: 64px; background: linear-gradient(var(--fg), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ───────────────────────── About ───────────────────────── */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: center; gap: clamp(36px, 6vw, 96px); }
.about-text { display: grid; gap: clamp(36px, 6vh, 64px); }
/* ── The hologram: the cut-out photo, tinted, lined, flickering, over a projector ── */
.portrait { position: relative; width: 100%; max-width: 420px; justify-self: end; padding-bottom: 40px; }
.portrait::after { display: none; }
.portrait-float {
  position: relative; z-index: 1; isolation: isolate; will-change: transform;
  animation: float 6s ease-in-out infinite, flicker 5s steps(1) infinite;
  -webkit-mask: linear-gradient(#000 74%, transparent 97%); mask: linear-gradient(#000 74%, transparent 97%);
}
.portrait img {
  display: block; width: 100%; height: auto;
  filter: grayscale(1) brightness(1.18) contrast(1.15)
    drop-shadow(-3px 0 0 rgb(255 60 120 / 0.55)) drop-shadow(3px 0 0 rgb(34 211 238 / 0.55))
    drop-shadow(0 0 22px rgb(var(--acc) / 0.55));
  opacity: 0.9;
}
.holo-layer {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url(img/umais-cut.webp) center / 100% 100% no-repeat; mask: url(img/umais-cut.webp) center / 100% 100% no-repeat;
}
/* Colour: the grey picture takes the glow colour, cyan at the top, the accent lower down. */
.holo-tint { background: linear-gradient(180deg, rgb(120 230 255), rgb(var(--acc)) 70%); mix-blend-mode: color; }
/* Scan lines, and a bright band sweeping down. */
.holo-lines {
  background:
    linear-gradient(180deg, transparent 0%, rgb(255 255 255 / 0.35) 4%, transparent 8%),
    repeating-linear-gradient(180deg, transparent 0 2px, rgb(0 0 0 / 0.38) 2px 3px);
  background-size: 100% 300%, 100% 100%;
  animation: sweep 4.5s linear infinite, lines 0.6s linear infinite;
  mix-blend-mode: hard-light;
}
/* Glitch: slices of the picture jump sideways for a moment every few seconds. */
.holo-glitch {
  background: url(img/umais-cut.webp) center / 100% 100% no-repeat;
  filter: grayscale(1) brightness(1.4) sepia(1) hue-rotate(150deg) saturate(3);
  opacity: 0; animation: glitch 5s steps(1) infinite;
}
.holo-beam {
  position: absolute; left: 8%; right: 8%; bottom: 30px; height: 85%; z-index: 0;
  background: linear-gradient(0deg, rgb(var(--acc) / 0.35), rgb(var(--acc) / 0.08) 60%, transparent);
  clip-path: polygon(30% 100%, 70% 100%, 100% 0, 0 0);
  filter: blur(6px);
}
.holo-base {
  position: absolute; left: 22%; right: 22%; bottom: 14px; height: 34px; z-index: 0; border-radius: 50%;
  border: 1.5px solid rgb(var(--acc) / 0.9);
  background: radial-gradient(closest-side, rgb(var(--acc) / 0.55), rgb(var(--acc) / 0.08) 70%, transparent);
  box-shadow: 0 0 24px rgb(var(--acc) / 0.6), inset 0 0 14px rgb(var(--acc) / 0.5);
}
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes sweep { from { background-position: 0 100%, 0 0; } to { background-position: 0 -200%, 0 0; } }
@keyframes lines { to { background-position: 0 100%, 0 3px; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 41% { opacity: 0.82; } 42% { opacity: 1; } 77% { opacity: 0.9; } 78% { opacity: 1; } 79% { opacity: 0.86; } 80% { opacity: 1; } }
@keyframes glitch {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
  90% { opacity: 0.85; transform: translateX(-8px); clip-path: inset(18% 0 70% 0); }
  92% { opacity: 0.85; transform: translateX(10px); clip-path: inset(46% 0 40% 0); }
  94% { opacity: 0.85; transform: translateX(-5px); clip-path: inset(66% 0 22% 0); }
  96% { opacity: 0.6; transform: translateX(6px); clip-path: inset(30% 0 62% 0); }
}
.statement { font: 500 clamp(1.6rem, 3.9vw, 3.6rem)/1.18 var(--f-display); letter-spacing: -0.03em; max-width: 22ch; }
.statement .w { opacity: 0.13; transition: opacity 0.35s, color 0.35s; }
.statement .w.on { opacity: 1; }
.statement .w.hl.on { color: var(--accent-text); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; border-top: 1px solid var(--line); }
.stat { padding: 26px 24px 0 0; display: grid; gap: 10px; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dt { color: var(--dim); font-size: 0.66rem; }
.stat dd { font: 700 clamp(2.4rem, 5.4vw, 4.6rem)/1 var(--f-display); letter-spacing: -0.04em; }

/* ───────────────────────── Services ───────────────────────── */
.svc-list { border-top: 1px solid var(--line); counter-reset: svc; }
.svc {
  position: relative; display: grid; grid-template-columns: 70px minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px 32px; align-items: center;
  padding: clamp(26px, 4vh, 40px) 18px; border-bottom: 1px solid var(--line); isolation: isolate; outline-offset: -2px;
}
.svc::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(var(--acc) / 0.16), transparent 80%); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease); }
.svc:hover::before, .svc:focus-visible::before { transform: scaleX(1); }
.svc-num { color: var(--dim); transition: color 0.3s; }
.svc-name { font: 700 clamp(1.5rem, 3.4vw, 3.1rem)/1.05 var(--f-display); letter-spacing: -0.03em; transition: transform 0.6s var(--ease), color 0.3s; }
.svc-desc { color: var(--muted); max-width: 46ch; }
.svc-tags { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.64rem; }
.svc-tags li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); transition: border-color 0.3s, color 0.3s; }
.svc:hover .svc-num, .svc:focus-visible .svc-num { color: var(--accent-text); }
.svc:hover .svc-name, .svc:focus-visible .svc-name { transform: translateX(12px); }
.svc:hover .svc-tags li { border-color: rgb(var(--acc) / 0.5); color: var(--fg); }

/* ───────────────────────── Work ───────────────────────── */
.work-title {
  position: relative; white-space: nowrap; font: 900 clamp(3rem, 14.5vw, 15rem)/0.86 var(--f-display); letter-spacing: -0.06em; text-transform: uppercase;
  color: var(--fg);
}
/* The gradient sits on each letter: a gradient clipped to the heading would not show through the animated letters. */
.work-title .split-c { background: linear-gradient(180deg, var(--fg) 35%, rgb(var(--acc)) 125%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: 0;
  -webkit-background-clip: text; background-clip: text;
}
.glitch::before { color: rgb(var(--acc)); transform: translate(-4px, 0); clip-path: inset(10% 0 60% 0); }
.glitch::after { color: #22d3ee; transform: translate(4px, 0); clip-path: inset(55% 0 12% 0); mix-blend-mode: screen; }
.glitch:hover::before, .glitch.glitching::before { animation: glitch-a 0.5s steps(2) both; }
.glitch:hover::after, .glitch.glitching::after { animation: glitch-b 0.5s steps(2) both; }
@keyframes glitch-a { 0% { opacity: 0.9; clip-path: inset(10% 0 60% 0); } 30% { clip-path: inset(40% 0 20% 0); transform: translate(-8px, 2px); } 60% { clip-path: inset(70% 0 5% 0); transform: translate(5px, -2px); } 100% { opacity: 0; } }
@keyframes glitch-b { 0% { opacity: 0.9; clip-path: inset(55% 0 12% 0); } 30% { clip-path: inset(5% 0 70% 0); transform: translate(8px, -2px); } 60% { clip-path: inset(30% 0 40% 0); transform: translate(-5px, 1px); } 100% { opacity: 0; } }
.work-sub { max-width: 52ch; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted); }
.work-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.work-url { color: var(--dim); }
.work-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: clamp(48px, 8vh, 80px); }
.work-stats > div { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(14px); display: grid; gap: 8px; }
.work-stats dt { color: var(--dim); font-size: 0.64rem; }
.work-stats dd { font: 700 clamp(2rem, 4.4vw, 3.8rem)/1 var(--f-display); letter-spacing: -0.04em; color: var(--accent-text); }

[data-tilt] { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; transform-style: preserve-3d; }
[data-tilt].in { transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: opacity 1s var(--ease), transform 0.6s var(--ease), filter 1s var(--ease), border-color 0.3s; }
[data-tilt]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s; background: radial-gradient(400px circle at var(--gx) var(--gy), rgb(255 255 255 / 0.10), transparent 45%); }
[data-tilt]:hover::after { opacity: 1; }

.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: clamp(70px, 12vh, 130px); }
.feat {
  position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px);
  display: grid; gap: 12px; align-content: start;
}
.feat:hover { border-color: rgb(var(--acc) / 0.45); }
.feat svg { width: 30px; height: 30px; color: var(--accent-text); transform: translateZ(30px); }
.feat h3 { font: 600 1.2rem/1.25 var(--f-display); letter-spacing: -0.01em; transform: translateZ(20px); }
.feat p { color: var(--muted); font-size: 0.98rem; }

.client-work { margin-top: clamp(70px, 12vh, 130px); display: grid; gap: 28px; }
.client-work[hidden] { display: none; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.client { position: relative; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); display: grid; gap: 10px; }
.client:hover { border-color: rgb(var(--acc) / 0.45); }
.client .mono { color: var(--dim); font-size: 0.62rem; }
.client h3 { font: 600 1.3rem/1.2 var(--f-display); }
.client p { color: var(--muted); font-size: 0.96rem; }
.client ul { display: flex; flex-wrap: wrap; gap: 6px; }
.client ul li { font: 500 0.62rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.client a.visit { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-text); font-weight: 600; min-height: 44px; }

/* ───────────────────────── Studio ───────────────────────── */
.studio { display: grid; gap: 28px; }
.studio-card {
  position: relative; display: grid; gap: 18px; padding: clamp(28px, 5vw, 64px); border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgb(var(--acc) / 0.35); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(var(--acc) / 0.22), transparent 60%),
    linear-gradient(160deg, rgb(20 18 32 / 0.92), rgb(8 8 14 / 0.92));
}
.studio-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0.5; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask: radial-gradient(70% 90% at 80% 10%, #000, transparent); mask: radial-gradient(70% 90% at 80% 10%, #000, transparent);
}
.studio-card:hover { border-color: rgb(var(--acc) / 0.7); }
.studio-mark { font: 900 clamp(2.4rem, 10.4vw, 10rem)/0.9 var(--f-display); letter-spacing: -0.055em; white-space: nowrap; }
.studio-tld { color: var(--accent-text); }
.studio-tag { font: 600 clamp(1.3rem, 2.6vw, 2.2rem)/1.15 var(--f-display); letter-spacing: -0.02em; }
.studio-desc { max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); }
.studio-facts { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.66rem; }
.studio-facts li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fg); background: rgb(255 255 255 / 0.03); }
.studio-go { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-height: 44px; font-weight: 600; color: var(--accent-text); }
.studio-go svg { transition: transform 0.4s var(--ease); }
.studio-card:hover .studio-go svg { transform: translate(3px, -3px); }

/* ───────────────────────── Stack ───────────────────────── */
.loadout { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.slot { position: relative; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); display: grid; gap: 14px; align-content: start; }
.slot:hover { border-color: rgb(var(--acc) / 0.45); }
.slot-key { color: var(--accent-text); font-size: 0.62rem; }
.slot h3 { font: 700 1.5rem/1.1 var(--f-display); letter-spacing: -0.02em; transform: translateZ(24px); }
.slot ul { display: grid; gap: 8px; }
.slot li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.slot li::before { content: ''; width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); flex: none; }
.marquee { margin: clamp(56px, 9vh, 90px) calc(var(--gutter) * -1) 0 calc(var(--side) * -1); overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee span { padding: 0 28px; font: 700 clamp(1.4rem, 3vw, 2.6rem)/1 var(--f-display); letter-spacing: -0.02em; text-transform: none; color: transparent; -webkit-text-stroke: 1px var(--muted); display: inline-flex; align-items: center; gap: 56px; }
.marquee span::after { content: '✦'; -webkit-text-stroke: 0; color: var(--accent); font-size: 0.5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────────────────────── Process ───────────────────────── */
.steps { --prog: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 34px; }
.steps::before, .steps::after { content: ''; position: absolute; left: 6px; right: 0; top: 6px; height: 1px; background: var(--line-2); }
.steps::after { background: var(--accent); transform: scaleX(var(--prog)); transform-origin: left; box-shadow: 0 0 14px var(--accent); }
.step { position: relative; display: grid; gap: 10px; align-content: start; }
.step .node { position: absolute; top: -34px; left: 0; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--bg); transition: background 0.5s, border-color 0.5s, box-shadow 0.5s; z-index: 1; }
.step.lit .node { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgb(var(--acc) / 0.18), 0 0 20px var(--accent); }
.step .mono { color: var(--dim); font-size: 0.62rem; }
.step h3 { font: 700 1.6rem/1.1 var(--f-display); letter-spacing: -0.02em; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ───────────────────────── Contact ───────────────────────── */
.contact { min-height: 100svh; display: grid; align-content: center; gap: clamp(24px, 4vh, 40px); padding-bottom: 120px; }
.contact-title { font: 900 clamp(2.2rem, 8.4vw, 9rem)/0.92 var(--f-display); letter-spacing: -0.05em; text-transform: uppercase; display: grid; }
.contact-title .outline { -webkit-text-stroke-width: clamp(1px, 0.15vw, 2px); }
.contact-lede { max-width: 44ch; color: var(--muted); font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-links .btn { min-height: 60px; font-size: 1rem; }
.foot { margin-top: clamp(40px, 10vh, 100px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--dim); font-size: 0.62rem; letter-spacing: 0.1em; }
.foot a { min-height: 24px; color: var(--muted); }
.foot a:hover { color: var(--fg); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1100px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --side: var(--gutter); }
  .hud-side, .scroll-hint { display: none; }
  .hud-bottom .coords { display: none; }
  .hud-bottom { justify-content: center; padding-bottom: 14px; }
  .stats, .work-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding-bottom: 24px; }
  .svc { grid-template-columns: 1fr; gap: 12px; padding-inline: 4px; }
  .about { grid-template-columns: 1fr; }
  .portrait { justify-self: center; max-width: 320px; order: -1; }
  .svc-tags { grid-column: auto; }
  .steps { grid-template-columns: 1fr; gap: 36px; padding: 0 0 0 40px; }
  .steps::before, .steps::after { left: 6px; right: auto; top: 6px; bottom: 6px; width: 1px; height: auto; }
  .steps::after { transform: scaleY(var(--prog)); transform-origin: top; }
  .step .node { top: 2px; left: -40px; }
  .marquee { margin-inline: calc(var(--gutter) * -1); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .sound-label, .menu-btn .mono { display: none; }
  .hud-logo .mono { display: none; }
  .feat-grid, .loadout { grid-template-columns: 1fr; }
  .hero-cta, .work-cta { width: 100%; }
  .hero-cta .btn, .contact-links .btn { flex: 1 1 auto; justify-content: center; }
}

/* Phones and tablets: background blur is the one effect that costs a lot and barely shows, so panels are solid instead. */
@media (pointer: coarse) {
  :root { --panel: rgb(16 14 26 / 0.88); }
  .feat, .slot, .client, .btn-ghost, .sound, .menu-btn { backdrop-filter: none; }
  .menu { backdrop-filter: none; background: rgb(6 6 11 / 0.96); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { transform: none; filter: none; transition: opacity 0.4s; }
  .split-c { transform: none; transition: none; }
  .statement .w { opacity: 1; }
  [data-tilt].in { transform: none; }
  .grain { animation: none; }
  .marquee-track { animation: none; }
}
