/* ==========================================================================
   SOURCE FOUNDER — Active Theory system
   Measured from activetheory.net at a 1024px viewport:
   pill 238x44 @ top 42 / right 41 · headline ≈ 8.6vw, lh .86 · side copy 13/24 caps
   list rows 33px in lilac · glass panels with 1px light rim · grain over everything.
   Palette rule: teal / lime / gold / blue / lilac on near-black. No pink.
   ========================================================================== */
:root {
  --bg: #0a0a0c;
  --bg-2: #141416;
  --ink: #eef5f5;
  --ink-dim: rgba(238, 245, 245, 0.62);
  --cyan: #6cc7dd;
  --teal: #5fe3d6;
  --lilac: #b4a8ff;
  --gold: #e9c46a;
  --line: rgba(255, 255, 255, 0.16);
  --line-2: rgba(255, 255, 255, 0.28);
  --glass: rgba(9, 22, 27, 0.5);
  --mono: "Kode Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --side: clamp(18px, 3.75vw, 56px);
  --fs-xs: 10px;
  --fs-s: clamp(11px, 0.95vw, 13px);
  --fs-big: clamp(34px, 5.4vw, 92px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* UI colour tokens: the defaults are the original teal look; html.ui-* swaps them */
  --t-label: var(--cyan);
  --t-list: var(--lilac);
  --t-link: var(--lilac);
  --t-accent: var(--teal);
  --t-accent-rgb: 95, 227, 214;
  --t-accent-ink: #03201c;
  --t-glass-a: rgba(14, 26, 30, 0.72);
  --t-glass-b: rgba(6, 14, 17, 0.72);
  --t-glass-s: rgba(8, 18, 22, 0.6);
  --t-glass-tk: rgba(8, 18, 22, 0.45);
  --t-panel-a: rgba(20, 40, 46, 0.55);
  --t-panel-b: rgba(6, 16, 20, 0.62);
  --t-panel-open-a: rgba(20, 40, 46, 0.72);
  --t-panel-open-b: rgba(6, 16, 20, 0.86);
  --t-spill-1: rgba(190, 255, 240, 0.55);
  --t-spill-2: rgba(95, 227, 214, 0.18);
  --t-spill-3: rgba(95, 227, 214, 0);
  --t-brand-glow: rgba(95, 227, 214, 0.15);
  --t-veil: rgba(1, 6, 8, 0.55);
  --t-option-bg: #0b1b20;
  --t-btn-ink: #fff;
  --t-btn-bg: linear-gradient(180deg, rgba(95, 227, 214, 0.18), rgba(95, 227, 214, 0.06));
  --t-btn-ring: inset 0 0 0 1px rgba(95, 227, 214, 0.55), 0 0 24px rgba(95, 227, 214, 0.12);
  --t-btn-bg-h: linear-gradient(180deg, rgba(95, 227, 214, 0.3), rgba(95, 227, 214, 0.1));
  --t-btn-ring-h: inset 0 0 0 1px rgba(160, 255, 245, 0.9), 0 0 30px rgba(95, 227, 214, 0.25);
  --t-quiet-ring: rgba(180, 168, 255, 0.45);
  --t-quiet-ring-h: rgba(200, 190, 255, 0.85);
  --t-quiet-bg-h: rgba(180, 168, 255, 0.08);
  --t-ask-ring: rgba(180, 168, 255, 0.4);
  --t-ask-bg: rgba(80, 60, 160, 0.08);
  --t-ask-ring-h: rgba(210, 200, 255, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* neutral near-black like iPhone dark mode by default; ?look=classic restores the teal water */
html.look-classic { --bg: #03090c; --bg-2: #061419; }

/* UI themes: ice is the default (set on <html>); ?ui=gold|teal previews the others. Neutral glass, three levels of white, one accent */
html.ui-gold, html.ui-ice, html.ui-teal {
  --ink: #f5f5f7;
  --ink-dim: rgba(235, 235, 245, 0.62);
  --t-label: rgba(235, 235, 245, 0.48);
  --t-list: rgba(235, 235, 245, 0.66);
  --t-link: var(--t-accent);
  --t-glass-a: rgba(44, 44, 48, 0.62);
  --t-glass-b: rgba(22, 22, 26, 0.62);
  --t-glass-s: rgba(30, 30, 34, 0.58);
  --t-glass-tk: rgba(30, 30, 34, 0.45);
  --t-panel-a: rgba(40, 40, 44, 0.58);
  --t-panel-b: rgba(16, 16, 19, 0.66);
  --t-panel-open-a: rgba(36, 36, 40, 0.82);
  --t-panel-open-b: rgba(14, 14, 17, 0.9);
  --t-spill-1: rgba(var(--t-accent-rgb), 0.45);
  --t-spill-2: rgba(var(--t-accent-rgb), 0.14);
  --t-spill-3: rgba(var(--t-accent-rgb), 0);
  --t-brand-glow: rgba(255, 255, 255, 0.08);
  --t-veil: rgba(0, 0, 0, 0.55);
  --t-option-bg: #1c1c1e;
  --t-btn-ink: var(--t-accent-ink);
  --t-btn-bg: var(--t-accent);
  --t-btn-ring: 0 0 24px rgba(var(--t-accent-rgb), 0.25);
  --t-btn-bg-h: var(--t-accent-hi);
  --t-btn-ring-h: 0 0 32px rgba(var(--t-accent-rgb), 0.4);
  --t-quiet-ring: rgba(255, 255, 255, 0.28);
  --t-quiet-ring-h: rgba(255, 255, 255, 0.7);
  --t-quiet-bg-h: rgba(255, 255, 255, 0.06);
  --t-ask-ring: rgba(255, 255, 255, 0.22);
  --t-ask-bg: rgba(255, 255, 255, 0.03);
  --t-ask-ring-h: rgba(255, 255, 255, 0.6);
}
html.ui-gold { --t-accent: #e9c46a; --t-accent-rgb: 233, 196, 106; --t-accent-hi: #f3d58c; --t-accent-ink: #17120a; }
html.ui-teal { --t-accent: #5fe3d6; --t-accent-rgb: 95, 227, 214; --t-accent-hi: #8ff0e6; --t-accent-ink: #03201c; }
/* ice: dark smoked glass with a frost grain, an icy rim light on top and icy-white accents */
html.ui-ice {
  --t-accent: #e6f0ff; --t-accent-rgb: 214, 232, 255; --t-accent-hi: #ffffff; --t-accent-ink: #0a0a0c;
  --t-glass-a: rgba(64, 66, 74, 0.38);
  --t-glass-b: rgba(22, 23, 27, 0.5);
  --t-glass-s: rgba(44, 46, 52, 0.42);
  --t-glass-tk: rgba(40, 42, 48, 0.38);
  --t-panel-a: rgba(58, 60, 68, 0.4);
  --t-panel-b: rgba(18, 19, 23, 0.56);
  --t-panel-open-a: rgba(52, 54, 62, 0.62);
  --t-panel-open-b: rgba(16, 17, 21, 0.82);
  --t-spill-1: rgba(214, 232, 255, 0.4);
  --t-spill-2: rgba(150, 190, 255, 0.12);
  --t-spill-3: rgba(150, 190, 255, 0);
  --frost: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .09 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --rim: inset 0 1px 0 rgba(235, 244, 255, 0.38), inset 0 0 0 1px rgba(220, 235, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 12px 34px rgba(0, 0, 0, 0.38);
}
html.ui-ice .pill { background: var(--frost), linear-gradient(180deg, var(--t-glass-a), var(--t-glass-b)); box-shadow: var(--rim); -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5); }
html.ui-ice .lang summary, html.ui-ice .tk-btn, html.ui-ice .brand-mark { background: var(--frost), var(--t-glass-s); box-shadow: var(--rim); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); }
html.ui-ice .glass { background: var(--frost), linear-gradient(160deg, var(--t-panel-a), var(--t-panel-b)); box-shadow: var(--rim), 0 30px 80px rgba(0, 0, 0, 0.45); -webkit-backdrop-filter: blur(28px) saturate(1.5); backdrop-filter: blur(28px) saturate(1.5); }
/* the language list sits over bright particles: near-solid smoked frost so every name reads */
html.ui-ice .lang-panel { background: var(--frost), linear-gradient(160deg, rgba(40, 42, 48, 0.94), rgba(16, 17, 21, 0.97)); box-shadow: var(--rim), 0 24px 60px rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(30px) saturate(1.4); backdrop-filter: blur(30px) saturate(1.4); }
html.ui-ice .card-item.is-open { background: var(--frost), linear-gradient(160deg, var(--t-panel-open-a), var(--t-panel-open-b)); box-shadow: var(--rim), 0 40px 120px rgba(0, 0, 0, 0.6); }
html.ui-ice .ask, html.ui-ice .btn-quiet { background: var(--frost), rgba(255, 255, 255, 0.03); box-shadow: var(--rim); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
html.ui-ice .btn:not(.btn-quiet) { box-shadow: inset 0 1px 0 #fff, 0 0 26px rgba(214, 232, 255, 0.28); }
html.ui-ice .wave[aria-pressed="true"] path { filter: drop-shadow(0 0 4px rgba(214, 232, 255, 0.7)); }

/* menu outfits: capsule is the default (set on <html>), ?menu=dock previews the bottom dock. Language, Work,
   the sound wave and Contact share one frosted capsule */
html.menu-capsule .hud-row, html.menu-dock .hud-row {
  gap: 0; padding: 4px; border-radius: 999px;
  background: var(--frost, none), linear-gradient(180deg, var(--t-glass-a), var(--t-glass-b));
  box-shadow: var(--rim, inset 0 0 0 1px rgba(255, 255, 255, 0.2));
  -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
}
html.menu-capsule .lang summary, html.menu-dock .lang summary { width: 38px; height: 38px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: none; backdrop-filter: none; }
/* the language list hangs from the capsule's right edge, so it stays on screen on phones */
html.menu-capsule .hud-row { position: relative; }
html.menu-capsule .lang { position: static; }
html.menu-capsule .lang-panel { top: calc(100% + 10px); right: 0; width: min(260px, calc(100vw - 32px)); }
html.menu-capsule .pill, html.menu-dock .pill { height: 38px; padding: 0 20px 0 18px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.menu-dock .hud-right { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); right: auto; left: 50%; transform: translateX(-50%); justify-items: center; }
html.menu-dock .lang-panel { top: auto; bottom: 54px; right: auto; left: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); -webkit-tap-highlight-color: transparent; }
/* no double-tap zoom on controls: taps land at once and never fight a scroll */
a, button, summary, label, [role="button"] { touch-action: manipulation; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--fs-s);
  line-height: 1.85;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 1px solid var(--t-accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(var(--t-accent-rgb), 0.35); color: #fff; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); transition: top .3s; }
.skip-link:focus { top: 12px; }

/* ---------- stage ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; background: var(--bg); }
html.no-webgl #gl { display: none; }
html.no-webgl body { background: radial-gradient(80% 60% at 0% 0%, rgba(95,227,214,.18), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(80,120,255,.14), transparent 60%), var(--bg); }

/* ---------- loader ---------- */
/* the loader styles live inline in index.html so it paints before this file arrives */

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.hud > * { pointer-events: auto; }
.brand, .hud-row { transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
html.js:not(.hud-in) .brand, html.js:not(.hud-in) .hud-row { opacity: 0; transform: translateY(-12px); }
.brand {
  position: absolute; left: max(var(--side), env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 40px);
  display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.14em;
}
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); font-size: 14px; letter-spacing: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.18), rgba(255,255,255,0) 60%);
  box-shadow: inset 0 0 12px var(--t-brand-glow);
}
.brand-name { opacity: 0.85; }

.hud-right { position: absolute; right: max(var(--side), env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 33px); display: grid; justify-items: end; gap: 12px; }
.hud-row { display: flex; align-items: center; gap: 10px; }

.pill {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 16px;
  height: 44px; padding: 0 24px; border-radius: 999px;
  font-size: 12.5px; letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--t-glass-a), var(--t-glass-b));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), inset 0 1px 0 rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
/* light spilling under the pill */
.pill::after {
  content: ""; position: absolute; z-index: -1; left: 12%; right: 12%; top: 70%; height: 46px;
  background: radial-gradient(50% 50% at 50% 30%, var(--t-spill-1), var(--t-spill-2) 45%, var(--t-spill-3) 75%);
  filter: blur(6px); pointer-events: none;
  animation: spill 6s ease-in-out infinite;
}
@keyframes spill { 50% { opacity: .7; transform: scaleX(.92); } }
.pill a { position: relative; padding: 10px 0; transition: opacity .3s; }
.pill a:hover { opacity: .75; }
.wave { width: 54px; height: 22px; display: grid; place-items: center; }
.wave svg { width: 54px; height: 16px; overflow: visible; }
.wave path { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1; stroke-linecap: round; transition: stroke .4s, stroke-width .4s; }
.wave[aria-pressed="true"] path { stroke: url(#waveGrad); stroke-width: 2.2; filter: drop-shadow(0 0 4px rgba(150, 255, 240, .6)); }
/* Apps sits in the capsule as a plain item, like Work and Contact. */
.pill .wave-link { width: auto; height: auto; display: inline-flex; }
.wave-link svg { display: none; }
.wave-label { position: static; display: inline; }

.lang { position: relative; }
.lang summary {
  list-style: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  font-size: 11px; letter-spacing: .08em;
  background: var(--t-glass-s); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.lang summary::-webkit-details-marker { display: none; }
.lang-panel { position: absolute; right: 0; top: 54px; width: 260px; max-height: min(70vh, 520px); overflow: auto; overscroll-behavior: contain; padding: 12px; border-radius: 16px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.lang-label { font-size: var(--fs-xs); opacity: .55; padding: 2px 8px 8px; letter-spacing: .14em; }
.lang-option { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 7px 8px; border-radius: 8px; text-transform: none; line-height: 1.3; }
.lang-option bdi { font-size: 13px; }
.lang-option span { grid-column: 1; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; opacity: .62; }
.lang-option i { grid-column: 2; grid-row: 1 / span 2; font-style: normal; color: var(--t-accent); }
.lang-option:hover, .lang-option[aria-current="true"] { background: rgba(255,255,255,.06); }

.tk-btn {
  height: 24px; min-width: 30px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); background: var(--t-glass-tk);
}
.tk-btn:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5); }

.thumb { position: absolute; right: calc(env(safe-area-inset-right, 0px) + 5px); top: 0; bottom: 0; width: 4px; }
.thumb i { position: absolute; left: 0; top: 0; width: 4px; height: 22px; border-radius: 3px; background: rgba(255,255,255,.88); will-change: transform; }

/* ---------- shared ---------- */
.glass {
  background: linear-gradient(160deg, var(--t-panel-a), var(--t-panel-b));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14), inset 0 1px 0 rgba(255,255,255,0.16), 0 30px 80px rgba(0,0,0,0.45);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
}
.eyebrow { font-size: var(--fs-xs); letter-spacing: 0.16em; color: var(--t-label); }
.big { font-size: var(--fs-big); line-height: 0.9; letter-spacing: -0.01em; font-weight: 400; text-wrap: balance; }
.lede { max-width: 44ch; color: var(--ink-dim); }
.text-link { color: var(--t-link); }
.text-link:hover { color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: 0.1em; color: var(--t-btn-ink);
  background: var(--t-btn-bg);
  box-shadow: var(--t-btn-ring);
  transition: box-shadow .4s, background .4s;
}
.btn:hover { background: var(--t-btn-bg-h); box-shadow: var(--t-btn-ring-h); }
.btn-quiet { color: var(--t-list); background: transparent; box-shadow: inset 0 0 0 1px var(--t-quiet-ring); }
.btn-quiet:hover { background: var(--t-quiet-bg-h); box-shadow: inset 0 0 0 1px var(--t-quiet-ring-h); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
[data-reveal] { will-change: opacity, transform; }

/* ---------- sections ---------- */
main { position: relative; }
/* without WebGL the cards become a readable list */
html.no-webgl .s-work { height: auto; padding-block: 18vh 8vh; }
html.no-webgl .work-pin { position: relative; height: auto; display: grid; gap: 24px; }
html.no-webgl .work-pin > * { position: static; }
html.no-webgl .work-head { position: static; opacity: 1; transform: none; }
html.no-webgl .work-meta { display: none; }
html.no-webgl .cards { position: static; display: grid; gap: 16px; margin-top: 24px; pointer-events: auto; }
html.no-webgl .card-item { display: grid; gap: 12px; padding: 24px; border-radius: 20px; text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.6; box-shadow: inset 0 0 0 1px var(--line); background: var(--glass); }
html.no-webgl .panel-close { display: none; }
html.no-webgl .s-intro { height: 30vh; }
html.no-webgl .s-statement { height: auto; }
html.no-webgl .statement-pin { position: relative; height: auto; display: grid; gap: 30px; padding-block: 10vh; }
html.no-webgl .gl-head, html.no-webgl .statement-side { position: static; width: auto; }
section { position: relative; padding-left: max(var(--side), env(safe-area-inset-left, 0px)); padding-right: max(var(--side), env(safe-area-inset-right, 0px)); }

.s-intro { height: 280vh; }
.scroll-cue {
  position: absolute; left: 0; right: 0; top: 30vh; text-align: center;
  color: var(--t-label); font-size: 11.5px; letter-spacing: 0.12em;
  transition: opacity .6s;
}

.s-statement { height: 190vh; }
.statement-pin { position: sticky; top: 0; height: 100vh; height: 100svh; }
/* sections already carry the side gutter, so positioned children start at 0 */
.gl-head {
  position: absolute; left: 0; top: 27vh;
  width: min(62vw, 1100px);
  font-size: clamp(36px, 6.4vw, 124px); line-height: 0.86; font-weight: 400; letter-spacing: -0.005em;
  text-wrap: balance;
}
html.gl-text-on .gl-head { color: transparent; }
.statement-side {
  position: absolute; left: calc(64vw - var(--side)); top: calc(27vh + 2.3 * 0.86 * clamp(36px, 6.4vw, 124px)); width: min(30vw, 440px);
  display: grid; gap: 18px; line-height: 1.65;
}
.eyebrow-dot { display: flex; gap: 10px; align-items: baseline; color: #fff; }
.eyebrow-dot .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--t-accent); box-shadow: 0 0 10px var(--t-accent); flex: none; transform: translateY(-1px); }
.statement-side > p { text-transform: none; letter-spacing: 0; font-size: 14px; }
.statement-side .eyebrow-dot { position: relative; display: block; padding-inline-start: 16px; font-size: 13px; font-weight: 500; }
.statement-side .eyebrow-dot .dot { position: absolute; inset-inline-start: 0; top: .65em; }
.statement-side .fine { color: var(--ink-dim); font-size: 11.5px; }
.statement-side .btn { max-width: 100%; height: auto; min-height: 40px; padding-block: 10px; line-height: 1.4; text-align: center; }

/* work */
.s-work { height: calc(11 * 62vh + 100vh); }
.s-work .anchor { position: absolute; top: calc(2 * 62vh); left: 0; width: 1px; height: 1px; }
.work-pin { position: sticky; top: 0; height: 100vh; height: 100svh; pointer-events: none; }
.work-pin > * { pointer-events: auto; }
/* the top-right corner is empty on activetheory.net's work view; the section headings live there */
.work-heads { position: absolute; right: 0; top: calc(env(safe-area-inset-top, 0px) + 132px); width: min(27vw, 380px); text-align: right; }
.work-head { position: absolute; inset: 0 0 auto auto; display: grid; justify-items: end; gap: 8px; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .8s var(--ease); pointer-events: none; }
.work-head.is-on { opacity: 1; transform: none; pointer-events: auto; }
.work-head h2 { font-size: clamp(16px, 1.6vw, 24px); line-height: 1.2; font-weight: 400; }
.work-head .lede { font-size: var(--fs-xs); line-height: 1.8; letter-spacing: .08em; }

.work-list { position: absolute; left: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 7vh); display: grid; gap: 4px; }
.wl-title { color: #fff; margin-bottom: 6px; }
.work-list ul { display: grid; gap: 0; }
.work-list li button { display: block; text-align: left; color: var(--t-list); line-height: 33px; white-space: nowrap; transition: color .3s; }
.work-list li button:hover, .work-list li button.is-on { color: #fff; }
.ask {
  margin-top: 18px; justify-self: start; height: 46px; padding: 0 26px; border-radius: 999px; display: inline-flex; align-items: center;
  color: var(--t-list); box-shadow: inset 0 0 0 1px var(--t-ask-ring); background: var(--t-ask-bg);
  transition: box-shadow .4s, color .4s;
}
.ask:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--t-ask-ring-h); }

.work-meta { position: absolute; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 7vh); display: grid; justify-items: end; gap: 10px; }
.wm-idx { font-size: clamp(22px, 2.4vw, 36px); line-height: 1; font-variant-numeric: tabular-nums; }
.wm-open { color: var(--t-accent); }
.wm-open:hover { color: #fff; }
.wm-nav { display: flex; gap: 6px; }

/* card content: hidden until opened as a panel */
.cards { position: absolute; inset: 0; pointer-events: none; }
.card-item { display: none; }
.card-item.is-open {
  display: grid; gap: 16px; pointer-events: auto;
  position: fixed; z-index: 120; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 32px)); max-height: calc(100svh - 120px); overflow: auto; overscroll-behavior: contain;
  padding: 30px; border-radius: 22px; text-transform: none; letter-spacing: 0; line-height: 1.6; font-size: 14px;
  background: linear-gradient(160deg, var(--t-panel-open-a), var(--t-panel-open-b));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16), inset 0 1px 0 rgba(255,255,255,0.2), 0 40px 120px rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  animation: panel-in .7s var(--ease) both;
}
@keyframes panel-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); filter: blur(6px); } }
.card-item h3 { font-size: clamp(26px, 3vw, 40px); line-height: 1; font-weight: 400; text-transform: uppercase; letter-spacing: -0.01em; }
.card-item .eyebrow { text-transform: uppercase; }
.panel-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; line-height: 1; box-shadow: inset 0 0 0 1px var(--line-2); text-transform: none; }
.panel-close:hover { box-shadow: inset 0 0 0 1px #fff; }
.panel-shot { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); width: 100%; height: auto; }
.panel-print { display: grid; gap: 6px; }
.panel-print img { border-radius: 10px; width: 100%; height: auto; }
.panel-print figcaption { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }
.facts { display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.facts dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--t-label); }
.included { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-label); }
.checks { display: grid; gap: 6px; }
.checks li { padding-left: 26px; position: relative; }
.checks li::before { content: "->"; position: absolute; left: 0; color: var(--t-accent); font-size: 12px; }
.card-item .actions .btn { text-transform: uppercase; }
.veil { position: fixed; inset: 0; z-index: 110; background: var(--t-veil); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .5s both; }
@keyframes fade { from { opacity: 0; } }

/* hud cards (SEO code / AI package / demo visuals) */
.code-card, .hud-card { border-radius: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 1.9; text-transform: none; letter-spacing: 0; box-shadow: inset 0 0 0 1px var(--line); background: rgba(0,0,0,.25); }
.code-card .dim { color: var(--ink-dim); }
.code-card .indent { padding-left: 18px; }
.code-card .str { color: var(--gold); }
.code-card .ok { color: var(--t-accent); }
.hc-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.hc-head .tag { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }
.hc-head .muted { opacity: .55; }
.hud-card ol li, .hc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; opacity: .6; }
.hud-card ol li.is-current, .hc-list li.is-current { opacity: 1; color: #fff; }
.hc-list li span { color: var(--t-accent); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

/* process */
.s-process { height: 320vh; }
/* starts below the menu capsule, keeps a margin at the bottom, and sizes by height too so short screens fit */
.process-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: center; gap: 3.5vh; padding: clamp(88px, 13vh, 120px) 0 6vh; }
.s-process .big { font-size: clamp(30px, min(5.4vw, 7vh), 92px); }
.s-process .demo { max-width: 600px; }
.sec-head { display: grid; gap: 14px; max-width: 980px; }
.process-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 5vw; align-items: center; }
.steps { display: grid; gap: 4px; }
.step { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: baseline; text-align: left; width: 100%; line-height: 33px; color: var(--t-list); transition: color .3s; }
.step .step-n { font-size: var(--fs-xs); letter-spacing: .14em; color: var(--ink-dim); }
.step[aria-expanded="true"], .step:hover { color: #fff; }
.step[aria-expanded="true"] .step-n { color: var(--t-accent); }
.step-d { padding: 0 0 12px 106px; max-width: 62ch; color: var(--ink-dim); text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.6; }
/* the step visuals share one grid cell, so the card grows to fit the tallest (the step 03 mini browser) */
.demo { position: relative; display: grid; min-height: 290px; border-radius: 20px; padding: 26px; text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 1.8; }
.demo-visual { grid-area: 1 / 1; align-self: center; opacity: 0; transform: translateY(8px) scale(.98); filter: blur(4px); transition: opacity .6s, transform .8s var(--ease), filter .6s; }
.demo-visual.is-active { opacity: 1; transform: none; filter: none; }
.demo-visual.code-card { box-shadow: none; background: none; padding: 0; }
.mini-browser { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); background: rgba(0,0,0,.3); font-size: 11px; }
.mb-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mb-dots { display: flex; gap: 5px; }
.mb-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); }
.mb-url { flex: 1; text-align: center; opacity: .6; font-size: 10px; }
.mb-page { padding: 12px; display: grid; gap: 12px; }
.mb-nav { display: flex; align-items: center; gap: 8px; opacity: .8; }
.mb-nav span { width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); }
.mb-nav em { margin-left: auto; font-style: normal; padding: 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); }
.mb-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: center; }
.mb-kicker { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--t-label); }
.mb-title { font-size: 15px; line-height: 1.15; margin: 4px 0 8px; }
.mb-line { height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); margin-bottom: 10px; }
.mb-btn { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--t-accent); color: var(--t-accent-ink); font-size: 10px; }
.mb-image { aspect-ratio: 16 / 10; border-radius: 8px; background: radial-gradient(circle at 30% 30%, rgba(95,227,214,.6), rgba(60,90,200,.4) 60%, rgba(0,0,0,.2)); }
.mb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mb-cards span { height: 34px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); }

/* faq */
.s-faq { padding-block: 30vh 12vh; display: grid; gap: 6vh; }
.faq-controls { display: flex; gap: 18px; }
.text-button { color: var(--t-list); font-size: var(--fs-xs); letter-spacing: .14em; }
.text-button:hover { color: #fff; }
.faq-list { max-width: 980px; display: grid; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px 1fr; padding: 16px 0; color: var(--t-list); transition: color .3s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "->"; color: var(--ink-dim); transition: transform .4s var(--ease), color .3s; }
.faq-list details[open] summary, .faq-list summary:hover { color: #fff; }
.faq-list details[open] summary::before { transform: rotate(90deg); color: var(--t-accent); }
.answer { padding: 0 0 20px 34px; max-width: 70ch; color: var(--ink-dim); text-transform: none; letter-spacing: 0; font-size: 14.5px; line-height: 1.7; }

/* next */
.s-next { padding-block: 14vh; display: grid; gap: 6vh; }
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1180px; }
.next-card { border-radius: 20px; padding: 24px; display: grid; gap: 12px; align-content: start; }
.next-card h3 { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.15; font-weight: 400; }
.next-card p:not(.eyebrow) { color: var(--ink-dim); text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.6; }
.next-card .btn { justify-self: start; margin-top: 6px; }

/* contact */
.s-contact { padding-block: 16vh 14vh; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 5vw; align-items: start; max-width: 1280px; }
.contact-copy { display: grid; gap: 16px; }
.contact-copy p { color: var(--ink-dim); text-transform: none; letter-spacing: 0; font-size: 14.5px; line-height: 1.7; max-width: 48ch; }
.contact-email { font-size: clamp(16px, 1.6vw, 22px); color: var(--t-accent); text-transform: none; letter-spacing: 0; justify-self: start; }
.contact-email:hover { color: #fff; }
.contact-alt a { color: var(--t-link); }
.contact-form { border-radius: 22px; padding: 26px; display: grid; gap: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; font-size: var(--fs-xs); letter-spacing: .14em; color: var(--t-label); }
.field input, .field select, .field textarea {
  width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; background: rgba(0,0,0,.28); color: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2); text-transform: none; letter-spacing: 0; font-size: 14px; line-height: 1.5; outline: none;
  transition: box-shadow .3s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--t-option-bg); color: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 1px var(--t-accent), 0 0 0 3px rgba(var(--t-accent-rgb), .12); }
.field textarea { resize: vertical; min-height: 120px; }
.btn-send { justify-self: start; }
.form-note { font-size: var(--fs-xs); letter-spacing: .1em; color: var(--ink-dim); }

/* footer */
.site-footer {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; align-items: center;
  padding: 26px max(var(--side), env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 30px) max(var(--side), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line); font-size: var(--fs-xs); letter-spacing: .14em;
}
.footer-brand span { opacity: .55; margin-left: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { color: var(--t-list); }
.site-footer nav a:hover { color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .brand-name { display: none; }
  .gl-head { width: calc(100vw - 2 * var(--side)); top: 18vh; font-size: clamp(32px, 9.6vw, 70px); }
  .statement-side { left: 0; right: 0; width: auto; top: auto; bottom: 8vh; }
  /* Tablet and phone: like desktop, top-right under the menu, but the title alone. */
  .work-heads { width: min(62vw, 360px); top: calc(env(safe-area-inset-top, 0px) + 96px); }
  .work-head .eyebrow, .work-head .lede, .work-head .text-link { display: none; }
  .work-list { bottom: calc(env(safe-area-inset-bottom, 0px) + 4vh); }
  .work-list ul { display: none; }
  .work-meta { bottom: calc(env(safe-area-inset-bottom, 0px) + 4vh); }
  .process-body { grid-template-columns: minmax(0, 1fr); }
  .demo { display: none; }
  .step-d { padding-left: 0; }
  .next-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .pill { gap: 10px; padding: 0 16px; height: 40px; font-size: 11px; }
  .wave, .wave svg { width: 38px; }
  .lang summary { width: 40px; height: 40px; }
  .step { grid-template-columns: 70px 1fr; }
  .thumb { display: none; }
}
/* Touch: every control gets a finger-sized (44px) hit area; the small ones grow invisibly so the look stays. */
@media (pointer: coarse) {
  .wm-nav { gap: 12px; }
  .tk-btn { position: relative; height: 34px; min-width: 44px; font-size: 12px; }
  .tk-btn::before { content: ""; position: absolute; inset: -5px -6px; }
  .brand { padding: 7px; margin: -7px; }
  .pill a::before { content: ""; position: absolute; inset: 0 -8px; }
  .work-list li button { line-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .pill::after { animation: none; }
}

/* Joined and syllabic scripts must not be letter-spaced (Arabic letters would come apart). */
html:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh-Hans"]) body,
html:is([lang="ar"], [lang="hi"], [lang="bn"], [lang="zh-Hans"]) body * { letter-spacing: 0 !important; }
/* Kode Mono has Latin only; give each script a real fallback instead of a monospace one. */
html[lang="ar"] { --mono: "Kode Mono", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", sans-serif; }
html[lang="hi"] { --mono: "Kode Mono", "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", sans-serif; }
html[lang="bn"] { --mono: "Kode Mono", "Nirmala UI", "Noto Sans Bengali", "Kohinoor Bangla", sans-serif; }
html[lang="zh-Hans"] { --mono: "Kode Mono", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif; }
