/* Harsh Dubey: portfolio. One day in a meadow: cream, deep forest, marigold, poppy. */
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff") format("woff"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "JB"; src: url("../fonts/jbmono.woff") format("woff"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #101b15;
  --bg-2: #182820;
  --ink: #f6efdf;
  --mut: #b4b09d;
  --sig: #f4b23e;
  --sig-ink: #14201a;
  --poppy: #ec5b32;
  --leaf: #a3d977;
  --paper: #f6efdf;
  --paper-ink: #14201a;
  --veil: rgba(246, 239, 223, .1);
  --glass: rgba(16, 27, 21, .5);
  --glass-2: rgba(10, 18, 14, .62);
  --edge: rgba(246, 239, 223, .14);
  --m: clamp(16px, 2.4vw, 36px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --display: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --mono: "JB", ui-monospace, monospace;
  --s-small: 0.875rem;
  --s-body: 1.0625rem;
  --s-lead: clamp(1.25rem, 0.9rem + 1.1vw, 1.75rem);
  --s-head: clamp(2.6rem, 1rem + 5.4vw, 6.5rem);
  --s-mega: clamp(5.5rem, 1rem + 21vw, 24rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--display); font-size: var(--s-body); line-height: 1.5; font-variation-settings: "opsz" 14; -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .7s var(--ease), color .7s var(--ease); }
body.theme-paper { background: var(--paper); color: var(--paper-ink); }
body.theme-sig { background: var(--sig); color: var(--sig-ink); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--sig); color: var(--sig-ink); }
:focus-visible { outline: 3px solid var(--sig); outline-offset: 3px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.js body:not(.ready) { overflow: hidden; }

/* ---------- display type ---------- */
.hero__line, .work__name, .contact__title, .loader__name, .case__title, .menu__links a, .proof__grid b {
  font-family: var(--display); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase; letter-spacing: -0.035em; line-height: .8;
}
h2 { font-weight: 700; font-size: var(--s-head); line-height: .92; letter-spacing: -0.045em; font-variation-settings: "opsz" 96, "wdth" 85; }
em { font-style: normal; color: var(--sig); }

/* split text helpers (SplitText output) */
.line-mask { overflow: clip; padding: .04em 0 .2em; margin: -.04em 0 -.2em; }
.char, .word { display: inline-block; will-change: transform; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: none; }
.js .loader { display: block; }
.js.seen .loader__name, .js.seen .loader__note, .js.seen .loader__count { display: none; }
.loader__cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.loader__cols i { background: var(--bg); margin-right: -1px; }
.loader__name { position: absolute; left: var(--m); top: 50%; transform: translateY(-50%); display: flex; gap: .2em; font-size: clamp(3rem, 12vw, 12rem); color: var(--ink); }
.loader__name span { display: inline-block; }
.loader__note { position: absolute; left: var(--m); bottom: var(--m); font-size: var(--s-small); color: var(--mut); }
.loader__count { position: absolute; right: var(--m); bottom: calc(var(--m) - .1em); font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96; font-size: clamp(5rem, 16vw, 16rem); line-height: .8; color: var(--sig); font-variant-numeric: tabular-nums; }

/* ---------- grain, cursor, progress ---------- */
.grain { position: fixed; inset: -100%; z-index: 90; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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 1s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); } 60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(-4%, -5%); } }

.cursor { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; display: none; mix-blend-mode: difference; }
.has-cursor .cursor { display: block; }
.cursor__dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; }
.cursor__ring { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; transform: scale(.2); display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), transform .45s var(--ease), opacity .3s; opacity: .0; }
.cursor.is-link .cursor__ring { opacity: 1; transform: scale(1); }
.cursor.is-label .cursor__ring { opacity: 1; width: 104px; height: 104px; margin: -52px 0 0 -52px; transform: scale(1); }
.cursor.is-label .cursor__dot { opacity: 0; }
.cursor__label { color: #000; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; opacity: 0; transition: opacity .2s; }
.cursor.is-label .cursor__label { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input { cursor: text; }

.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--sig); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- top bar ---------- */
.bar { position: fixed; z-index: 50; left: 0; right: 0; top: 0; display: grid; grid-template-columns: 1fr 1fr 1fr auto auto auto auto; align-items: center; gap: 16px; padding: 18px var(--m); color: var(--bar-ink, var(--ink)); font-size: var(--s-small); font-weight: 600; transition: color .6s var(--ease); }
body.theme-paper { --bar-ink: var(--paper-ink); --bar-btn: var(--paper-ink); --bar-btn-ink: var(--paper); }
body.theme-sig { --bar-ink: var(--sig-ink); --bar-btn: var(--sig-ink); --bar-btn-ink: var(--sig); }
.bar__name { text-decoration: none; justify-self: start; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.bar__role { opacity: .7; }
.bar__time { opacity: .7; font-variant-numeric: tabular-nums; }
.bar__menu { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--bar-btn, var(--ink)); color: var(--bar-btn-ink, var(--bg)); font-weight: 700; transition: background-color .6s var(--ease), color .6s var(--ease); }
.bar__menu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sig); transition: transform .4s var(--ease); }
.menu-open .bar__menu-dot { transform: scale(1.8); }

/* text roll on hover: label duplicated in a ::after line */
[data-roll] { display: inline-block; position: relative; overflow: clip; vertical-align: top; }
[data-roll] .roll { display: block; transition: transform .55s var(--ease); }
[data-roll] .roll + .roll { position: absolute; left: 0; top: 100%; }
a:hover > [data-roll] .roll, button:hover > [data-roll] .roll, [data-roll]:hover .roll, a[data-roll]:hover .roll, button[data-roll]:hover .roll { transform: translateY(-100%); }

/* ---------- menu overlay ---------- */
.menu { position: fixed; inset: 0; z-index: 45; background: var(--sig); color: var(--sig-ink); display: flex; flex-direction: column; justify-content: space-between; padding: 110px var(--m) var(--m); clip-path: circle(0% at calc(100% - 70px) 40px); visibility: hidden; }
.menu__links { display: grid; gap: .04em; }
.menu__links a { display: inline-block; font-size: clamp(3.4rem, 11vw, 10rem); text-decoration: none; }
.menu__links li { overflow: clip; }
.menu__links a:hover { font-variation-settings: "wdth" 100, "opsz" 96; }
.menu__links a { transition: font-variation-settings .5s var(--ease), font-stretch .5s var(--ease); }
.menu__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-weight: 600; }
.menu__foot span { display: flex; gap: 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; letter-spacing: -0.01em; transition: background-color .3s, color .3s, transform .3s var(--ease); }
.btn--sig { background: var(--sig); color: var(--sig-ink); }
.btn--sig:hover { background: var(--ink); }
.btn--ghost { background: var(--veil); color: inherit; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(.96); }
[data-magnetic] { will-change: transform; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; padding: 0 var(--m); overflow: clip; }
.hero__name { position: absolute; inset: 0; pointer-events: none; }
.hero__line { position: absolute; display: block; font-size: var(--s-mega); white-space: nowrap; pointer-events: auto; }
.hero__line--a { left: calc(var(--m) - .04em); top: 88px; }
.hero__line--b { right: calc(var(--m) - .02em); bottom: calc(var(--m) - .06em); color: var(--sig); }
.hero__line .char { transition: font-variation-settings .35s ease-out; }
.hero__face { position: absolute; right: 7vw; top: 13vh; width: clamp(220px, 31vw, 520px); aspect-ratio: 1; }
.hero__hint { position: absolute; right: calc(7vw + 2%); top: calc(13vh + clamp(220px, 31vw, 520px) + 6px); font-size: var(--s-small); color: var(--mut); font-weight: 600; }
.hero__copy { position: absolute; left: var(--m); bottom: calc(var(--m) + 4px); width: min(40vw, 560px); }
.hero__lead { font-size: var(--s-lead); line-height: 1.22; letter-spacing: -0.02em; font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero__meta { position: absolute; left: var(--m); top: calc(88px + var(--s-mega) * .86); display: flex; align-items: center; gap: 10px; font-size: var(--s-small); font-weight: 600; color: var(--mut); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 0 rgba(163, 217, 119, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(163, 217, 119, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 217, 119, 0); } }
.hero__scroll { position: absolute; left: 50%; bottom: calc(var(--m) + 10px); width: 104px; height: 104px; margin-left: -52px; display: grid; place-items: center; text-decoration: none; font-size: 22px; }
.hero__scroll svg { position: absolute; inset: 0; animation: spin 14s linear infinite; }
.hero__scroll text { fill: currentColor; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- intro statement ---------- */
.intro { padding: 26vh var(--m) 12vh; }
.intro__text { max-width: 22ch; font-size: clamp(2.2rem, 1rem + 4.6vw, 6rem); line-height: .98; letter-spacing: -0.04em; font-weight: 700; font-variation-settings: "opsz" 96, "wdth" 85; }
.intro__text .word { opacity: .16; }
.no-js .intro__text .word, .reduce .intro__text .word { opacity: 1; }

/* ---------- the gate ---------- */
.gate { padding: 14vh var(--m); }
.gate__head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; margin-bottom: 64px; }
.gate__head h2 { max-width: 13ch; }
.gate__sub { font-size: var(--s-lead); line-height: 1.3; color: var(--mut); max-width: 34ch; }
.gate__body { display: grid; grid-template-columns: minmax(280px, 0.9fr) 1.6fr; gap: 24px; align-items: start; }
.attacks { display: grid; gap: 8px; position: sticky; top: 96px; }
.attack { width: 100%; text-align: left; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; padding: 16px 18px; border-radius: 18px; background: var(--bg-2); transition: background-color .3s, color .3s, transform .4s var(--ease); }
.attack:hover { transform: translateX(6px); }
.attack[aria-pressed="true"] { background: var(--sig); color: var(--sig-ink); }
.attack__id { grid-row: span 2; font-family: var(--mono); font-size: var(--s-small); font-weight: 700; padding-top: 3px; }
.attack__label { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.2; }
.attack__line { font-size: var(--s-small); color: var(--mut); line-height: 1.35; }
.attack[aria-pressed="true"] .attack__line { color: inherit; opacity: .75; }

.machine { position: relative; background: var(--bg-2); border-radius: 28px; padding: 28px; display: grid; gap: 18px; overflow: clip; }
.proposal { position: relative; padding: 20px 22px; border-radius: 18px; background: var(--bg); min-height: 112px; }
.proposal__who { font-size: var(--s-small); font-weight: 700; color: var(--mut); }
.proposal__text { margin-top: 6px; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; }
.proposal__inject { margin-top: 10px; font-family: var(--mono); font-size: var(--s-small); color: var(--mut); text-decoration: line-through; text-decoration-color: var(--poppy); text-decoration-thickness: 2px; }
.token { position: absolute; z-index: 5; right: 22px; top: 22px; width: 18px; height: 18px; border-radius: 5px; background: var(--sig); opacity: 0; }
.phases { display: grid; gap: 12px; }
.phase { display: grid; grid-template-columns: 82px 1fr; gap: 12px; align-items: start; }
.phase__name { font-size: var(--s-small); font-weight: 700; color: var(--mut); padding-top: 10px; }
.rules { display: flex; flex-wrap: wrap; gap: 6px; }
.rule { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--bg); font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--mut); transition: background-color .25s, color .25s; }
.rule::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .5; }
.rule.is-pass { background: rgba(70, 110, 52, .5); color: var(--leaf); }
.rule.is-pass::before { opacity: 1; }
.rule.is-fire { background: var(--poppy); color: #fff6ec; }
.rule.is-fire::before { opacity: 1; }
.rule.is-skip { opacity: .35; }
.rule--wide { width: 100%; font-family: var(--display); font-size: var(--s-small); padding: 12px 14px; }
.rule--wide b { font-weight: 800; color: var(--ink); }
.rule--wide.is-fire b, .rule--wide.is-pass b { color: inherit; }
.verdict { padding: 6px 2px 0; min-height: 132px; }
.verdict__big { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase; font-size: clamp(3rem, 1rem + 5vw, 6.2rem); line-height: .85; letter-spacing: -0.03em; }
.verdict__big.is-blocked { color: var(--poppy); }
.verdict__why { margin-top: 12px; max-width: 52ch; color: var(--mut); line-height: 1.4; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tally div { padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.tally dt { font-size: 12.5px; color: var(--mut); font-weight: 600; }
.tally dd { margin-top: 2px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ledger { display: grid; gap: 6px; max-height: 220px; overflow: auto; font-family: var(--mono); font-size: 12px; color: var(--mut); scrollbar-width: thin; }
.ledger li { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--bg); }
.ledger li b { color: var(--ink); font-weight: 600; }
.ledger li .ok { color: var(--leaf); }
.own { margin: 28px 0 0 calc((100% - 24px) * .36 + 24px); display: grid; gap: 10px; }
@media (max-width: 1080px) { .own { margin-left: 0; } }
.own label { font-weight: 700; font-size: 1.125rem; }
.own__row { display: flex; gap: 8px; }
.own input { flex: 1; min-width: 0; min-height: 56px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--bg-2); color: var(--ink); font: inherit; font-size: 1rem; }
.own input::placeholder { color: var(--mut); }
.own__note { font-size: var(--s-small); color: var(--mut); max-width: 70ch; }

/* ---------- work: curved 3D ring ---------- */
.work { position: relative; }
.work__pin { position: relative; height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 96px var(--m) var(--m); overflow: clip; }
.work__title { max-width: 26ch; font-size: clamp(2.2rem, 1rem + 3vw, 4.2rem); position: relative; z-index: 2; }
.ring-wrap { position: relative; perspective: 1400px; perspective-origin: 50% 50%; }
.ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.card { position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * .625); margin-left: calc(var(--cw) / -2); margin-top: calc(var(--cw) * -.3125); border-radius: 22px; overflow: clip; background: var(--bg-2); backface-visibility: hidden; cursor: pointer; transform-style: preserve-3d; }
.card__img { position: absolute; inset: 0; }
.card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(.8); transform: scale(1.08); transition: filter .7s var(--ease), transform 1.2s var(--ease); }
.card:hover .card__img img, .card.is-active .card__img img { filter: none; transform: scale(1); }
.card__tag { position: absolute; left: 16px; top: 16px; padding: 7px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 700; }
.work__now { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 12px 32px; }
.work__count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mut); padding-bottom: 8px; }
.work__name { font-size: clamp(3rem, 1rem + 7vw, 8.4rem); grid-column: 2; }
.work__fact { grid-column: 2; grid-row: 2; color: var(--sig); font-weight: 700; font-size: var(--s-lead); letter-spacing: -0.02em; }
.work__open { grid-column: 3; grid-row: 1 / span 2; align-self: center; margin-right: 112px; }

/* ---------- proof counters ---------- */
.proof { padding: 18vh var(--m) 12vh; }
.proof__title { max-width: 14ch; margin-bottom: 72px; }
.proof__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
.proof__grid li { display: grid; gap: 14px; align-content: start; }
.proof__grid b { font-size: clamp(3.6rem, 1rem + 6vw, 8rem); color: var(--sig); font-variant-numeric: tabular-nums; white-space: nowrap; }
.proof__grid span { max-width: 32ch; color: var(--mut); line-height: 1.4; }

/* ---------- awards marquee ---------- */
.awards { padding: 8vh 0; display: grid; gap: 6px; overflow: clip; }
.marquee { overflow: clip; background: var(--sig); color: var(--sig-ink); padding: 18px 0 10px; transform: rotate(-2deg) scale(1.04); }
.marquee--alt { background: var(--ink); color: var(--bg); transform: rotate(1.4deg) scale(1.04); margin-top: -6px; }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span { flex: none; padding-right: .5em; font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase; font-size: clamp(2.6rem, 1rem + 5vw, 6.4rem); line-height: .95; letter-spacing: -0.03em; white-space: nowrap; }
.marquee__track span::after { content: "✱"; display: inline-block; margin-left: .5em; font-size: .6em; vertical-align: .22em; }

/* ---------- about (paper) ---------- */
.about { padding: 20vh var(--m) 16vh; }
.about__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: end; }
.about__title { max-width: 11ch; }
.about__text { display: grid; gap: 18px; font-size: var(--s-lead); line-height: 1.32; letter-spacing: -0.015em; max-width: 36ch; }
.principles { margin-top: 14vh; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.principle { padding: 26px 24px 30px; border-radius: 24px; background: rgba(10, 18, 14, .06); min-height: 280px; display: flex; flex-direction: column; justify-content: space-between; transition: background-color .4s, color .4s, transform .5s var(--ease); }
.principle:hover { background: var(--paper-ink); color: var(--paper); transform: translateY(-8px) rotate(-1deg); }
.principle h3 { font-size: clamp(1.6rem, 1rem + 1.4vw, 2.3rem); line-height: .95; letter-spacing: -0.035em; font-weight: 800; font-variation-settings: "opsz" 96, "wdth" 80; }
.principle p { line-height: 1.4; }
.about__records { margin-top: 12vh; display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.facts dt { font-size: var(--s-small); font-weight: 600; opacity: .6; }
.facts dd { margin-top: 4px; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.records { display: grid; }
.records li { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; box-shadow: inset 0 -1px rgba(10, 18, 14, .14); }
.records li span:last-child { opacity: .6; text-align: right; }

/* ---------- stack list with cursor image ---------- */
.stack { position: relative; padding: 16vh var(--m) 18vh; }
.stack__title { margin-bottom: 48px; }
.tools { display: grid; }
.tool { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 22px 0 20px; isolation: isolate; box-shadow: inset 0 -1px var(--veil); }
.tool::before { content: ""; position: absolute; inset: 0 calc(var(--m) * -1); background: var(--sig); z-index: -1; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease); }
.tool:hover::before { transform: scaleY(1); }
.tool:hover { color: var(--sig-ink); }
.tool__name { font-size: clamp(2rem, 1rem + 3.4vw, 4.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: .95; font-variation-settings: "opsz" 96, "wdth" 80; transition: transform .5s var(--ease); }
.tool:hover .tool__name { transform: translateX(18px); }
.tool__where { font-weight: 600; color: var(--mut); white-space: nowrap; }
.tool:hover .tool__where { color: inherit; }
.tools__float { position: fixed; left: 0; top: 0; width: 300px; aspect-ratio: 4 / 5; z-index: 40; pointer-events: none; border-radius: 18px; overflow: clip; opacity: 0; transform: scale(.6); }
.tools__float img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- contact (signal) ---------- */
.contact { min-height: 100svh; padding: 18vh var(--m) var(--m); display: flex; flex-direction: column; }
.contact__ask { font-size: var(--s-lead); font-weight: 600; letter-spacing: -0.02em; }
.contact__title { margin-top: 2vh; font-size: clamp(5rem, 2rem + 17vw, 22rem); line-height: .78; }
.contact__title .char { display: inline-block; }
.contact__title .word { white-space: nowrap; margin-right: .18em; }
.contact__row { margin-top: auto; padding-top: 10vh; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.contact__mail { position: relative; text-align: left; font-size: clamp(1.6rem, 1rem + 2.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variation-settings: "opsz" 96, "wdth" 85; }
.contact__mail-text { background-image: linear-gradient(currentColor, currentColor); background-size: 0% 4px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 6px; transition: background-size .6s var(--ease); }
.contact__mail:hover .contact__mail-text { background-size: 100% 4px; }
.contact__copied { position: absolute; left: 0; top: -1.6em; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.contact__links { display: flex; flex-wrap: wrap; gap: 10px 28px; font-weight: 700; font-size: 1.1rem; }
.contact__links a { text-decoration: none; }
.foot { padding-right: 112px; margin-top: 8vh; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: var(--s-small); font-weight: 600; }
.foot a { text-decoration: none; }

/* ---------- case overlay ---------- */
.case { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.case.is-open { visibility: visible; }
.case__wipe { position: absolute; inset: 0; background: var(--sig); transform-origin: 0 0; }
.case__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); color: var(--ink); padding: 110px var(--m) var(--m); opacity: 0; }
.case__close { position: fixed; right: var(--m); top: 18px; z-index: 2; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: var(--s-small); }
.case__kind { font-weight: 700; color: var(--mut); }
.case__title { margin-top: 8px; font-size: clamp(4rem, 1rem + 13vw, 15rem); }
.case__fact { margin-top: 18px; color: var(--sig); font-size: var(--s-lead); font-weight: 700; letter-spacing: -0.02em; }
.case__hero { margin-top: 48px; border-radius: 26px; overflow: clip; aspect-ratio: 16 / 9; background: var(--bg-2); }
.case__hero img { width: 100%; height: 100%; object-fit: cover; }
.case__stats { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.case__stats li { padding: 22px; border-radius: 20px; background: var(--bg-2); display: grid; gap: 8px; }
.case__stats b { font-size: clamp(2rem, 1rem + 2.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variation-settings: "opsz" 96, "wdth" 80; }
.case__stats span { font-size: var(--s-small); color: var(--mut); line-height: 1.35; }
.case__copy { margin: 72px 0 0 auto; max-width: 62ch; display: grid; gap: 20px; font-size: 1.2rem; line-height: 1.55; }
.case__gallery { margin-top: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case__gallery img { width: 100%; border-radius: 20px; aspect-ratio: 16 / 10; object-fit: cover; }
.case__links { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px; }
.case__next { margin-top: 16vh; width: 100%; text-align: left; display: grid; gap: 6px; padding-bottom: 6vh; }
.case__next span { color: var(--mut); font-weight: 700; }
.case__next b { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase; font-size: clamp(3.4rem, 1rem + 9vw, 10rem); line-height: .82; letter-spacing: -0.03em; transition: color .3s, transform .6s var(--ease); }
.case__next:hover b { color: var(--sig); transform: translateX(2vw); }

/* ---------- the AI twin ---------- */
#sphere-wrapper { position: fixed; left: 0; top: 0; width: 90px; height: 90px; z-index: 36; pointer-events: none; border-radius: 50%; transition: background-color .4s; }
#sphere-wrapper.is-floating { background: var(--bg-2); }
#sphere-wrapper canvas { pointer-events: auto; cursor: pointer; display: block; width: 100%; height: 100%; }
#sphere-popup { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 6px); white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: var(--s-small); font-weight: 700; opacity: 0; transition: opacity .25s, transform .25s var(--ease); pointer-events: none; }
#sphere-wrapper.is-floating #sphere-popup { left: auto; right: 0; transform: translate(0, 6px); }
#sphere-popup .cursor { display: none; }
#sphere-popup.show { opacity: 1; transform: translate(-50%, 0); }
#sphere-wrapper.is-floating #sphere-popup.show { transform: translate(0, 0); }
#sphere-wrapper.is-hero #sphere-popup { bottom: auto; top: 6%; }
.twin-dock { position: fixed; z-index: 35; right: 24px; bottom: 24px; width: 400px; height: min(78svh, 680px); display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: var(--bg-2); color: var(--ink); visibility: hidden; opacity: 0; transform: translateY(20px) scale(.97); }
.twin-dock.on { visibility: visible; opacity: 1; transform: none; transition: opacity .35s var(--ease), transform .45s var(--ease); }
.twin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 20px; font-size: var(--s-small); font-weight: 600; }
.twin-id { display: flex; align-items: center; gap: 10px; }
.twin-id .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.twin-dock.offline .twin-id .dot { background: var(--mut); }
#twinMode { color: var(--mut); font-weight: 400; }
.twin-tools { display: flex; gap: 6px; }
.twin-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg); transition: transform .25s var(--ease); }
.twin-icon:hover { transform: scale(1.08); }
.twin-icon svg { width: 16px; height: 16px; }
.twin-icon[aria-pressed="false"] .on-icon, .twin-icon[aria-pressed="true"] .off-icon { display: none; }
.twin-stage { position: relative; flex: none; height: 200px; display: grid; place-items: center; background: var(--bg); }
.twin-slot { width: 168px; height: 168px; margin-top: -16px; }
.twin-state { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: var(--s-small); font-weight: 700; color: var(--mut); }
.twin-bars { display: inline-flex; align-items: end; gap: 2px; height: 11px; }
.twin-bars i { width: 3px; height: 3px; background: var(--sig); border-radius: 1px; }
.twin-dock[data-state="speaking"] .twin-bars i, .twin-dock[data-state="listening"] .twin-bars i { animation: bar .7s ease-in-out infinite; }
.twin-dock[data-state="thinking"] .twin-bars i { animation: bar 1.2s ease-in-out infinite; }
.twin-bars i:nth-child(2) { animation-delay: -.15s !important; } .twin-bars i:nth-child(3) { animation-delay: -.3s !important; } .twin-bars i:nth-child(4) { animation-delay: -.45s !important; }
@keyframes bar { 50% { height: 11px; } }
.twin-log { flex: 1; overflow-y: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.twin-msg.ai { font-size: 1.2rem; line-height: 1.28; letter-spacing: -0.015em; font-weight: 500; }
.twin-msg.ai .w { opacity: .25; transition: opacity .18s ease; }
.twin-msg.ai .w.lit { opacity: 1; }
.twin-msg.me { align-self: flex-end; max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--sig); color: var(--sig-ink); line-height: 1.35; font-weight: 600; }
.twin-act { align-self: flex-start; margin-top: -6px; padding: 8px 14px; border-radius: 999px; background: var(--bg); font-size: var(--s-small); font-weight: 700; transition: transform .2s var(--ease); }
.twin-act:hover { transform: translateY(-2px); }
.twin-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 20px 12px; scrollbar-width: none; flex: none; }
.twin-chips::-webkit-scrollbar { display: none; }
.twin-chips button { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--bg); font-size: var(--s-small); white-space: nowrap; font-weight: 600; transition: transform .2s var(--ease), background-color .2s; }
.twin-chips button:hover { transform: translateY(-2px); background: var(--veil); }
.twin-input { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px; background: var(--bg); }
.twin-input input { flex: 1; min-width: 0; padding: 12px 6px; background: transparent; border: 0; outline: none; color: var(--ink); font: inherit; }
.twin-input input::placeholder { color: var(--mut); }
.twin-mic, .twin-send { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bg-2); transition: transform .2s var(--ease), background-color .2s; }
.twin-mic.live { background: var(--sig); color: var(--sig-ink); }
.twin-send { background: var(--sig); color: var(--sig-ink); }
.twin-send:hover, .twin-mic:hover { transform: scale(1.06); }
.twin-send:disabled { opacity: .5; transform: none; }
.twin-mic svg, .twin-send svg { width: 18px; height: 18px; }
.twin-note { flex: none; margin: 0; padding: 10px 20px 14px; background: var(--bg); font-size: 12.5px; color: var(--mut); }
.twin-static { position: fixed; z-index: 30; left: 24px; bottom: 24px; display: none; min-height: 52px; padding: 0 22px; border-radius: 999px; background: var(--sig); color: var(--sig-ink); font-weight: 700; }
.twin-static.show { display: inline-flex; align-items: center; }

/* ---------- reveal defaults (content always visible without JS) ---------- */
.js [data-fade] { opacity: 0; transform: translateY(28px); }
.reduce [data-fade], .no-js [data-fade] { opacity: 1 !important; transform: none !important; }

/* ---------- tablet and phone ---------- */
@media (max-width: 1080px) {
  .gate__head, .about__top, .about__records { grid-template-columns: 1fr; gap: 28px; }
  .gate__body { grid-template-columns: 1fr; }
  .attacks { position: static; grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .proof__grid { grid-template-columns: 1fr 1fr; }
  .case__stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  :root { --s-mega: 31vw; }
  .bar { grid-template-columns: 1fr auto auto auto; gap: 8px; }
  #soundLabel { display: none; }
  .bar__role, .bar__time { display: none; }
  .hero__line--a { top: 92px; }
  .hero__face { left: 50%; right: auto; top: calc(92px + 31vw * .9); width: 56vw; margin-left: -28vw; }
  .hero__hint { display: none; }
  .hero__meta { display: none; }
  .hero__copy { width: auto; right: var(--m); bottom: calc(31vw + var(--m) + 14px); }
  .hero__lead { font-size: 1.15rem; }
  .hero__cta .btn { min-height: 50px; padding: 0 20px; font-size: .95rem; }
  .hero__scroll { display: none; }
  .intro { padding: 18vh var(--m); }
  .attacks { grid-template-columns: 1fr; }
  .attack { padding: 14px 16px; }
  .machine { padding: 16px; border-radius: 22px; }
  .phase { grid-template-columns: 1fr; gap: 6px; }
  .phase__name { padding-top: 0; }
  .rule { font-size: 11.5px; padding: 8px 10px; }
  .tally { grid-template-columns: 1fr 1fr; }
  .tally div:last-child { grid-column: span 2; }
  .own__row { flex-direction: column; }
  .work__pin { height: auto; display: block; padding: 12vh var(--m); }
  .ring-wrap { perspective: none; margin-top: 40px; }
  .ring { position: static; width: auto; height: auto; display: grid; gap: 16px; transform: none !important; }
  .card { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 0; transform: none !important; opacity: 1 !important; }
  .card__img img { filter: none; transform: none; }
  .card__label { display: block; }
  .work__now { display: none; }
  .proof__grid { grid-template-columns: 1fr; gap: 40px; }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 0; gap: 24px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .records li { font-size: 1rem; }
  .tool { flex-direction: column; gap: 6px; }
  .tools__float { display: none; }
  .contact__title { font-size: 25vw; }
  .contact__mail { font-size: 7vw; }
  .twin-dock { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(84svh, 640px); }
  .twin-stage { height: 150px; }
  .twin-slot { width: 124px; height: 124px; }
  #sphere-popup { display: none; }
  .case__gallery { grid-template-columns: 1fr; }
  .case__copy { font-size: 1.05rem; }
}
.card__label { display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(10, 18, 14, .85)); }
.card__label b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.card__label span { font-size: var(--s-small); color: var(--sig); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scroll svg, .pulse { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* sound toggle */
.bar__sound { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px; font-weight: 600; opacity: .8; }
.bar__wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.bar__wave i { width: 2px; height: 3px; border-radius: 1px; background: currentColor; transition: height .3s; }
.bar__sound[aria-pressed="true"] .bar__wave i { animation: wave 1s ease-in-out infinite; }
.bar__wave i:nth-child(2) { animation-delay: -.2s !important; } .bar__wave i:nth-child(3) { animation-delay: -.45s !important; } .bar__wave i:nth-child(4) { animation-delay: -.7s !important; }
@keyframes wave { 50% { height: 14px; } }
body.menu-open { --bar-ink: var(--sig-ink); --bar-btn: var(--sig-ink); --bar-btn-ink: var(--sig); }

/* caveats switch */
.proof__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin: -32px 0 56px; }
.switch { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--bg-2); font-weight: 700; }
.switch__knob { position: relative; width: 52px; height: 36px; border-radius: 999px; background: var(--sig); transition: background-color .3s; }
.switch__knob::after { content: ""; position: absolute; top: 4px; left: 20px; width: 28px; height: 28px; border-radius: 50%; background: var(--sig-ink); transition: left .45s var(--ease); }
.switch[aria-checked="false"] .switch__knob { background: #33423a; }
.switch[aria-checked="false"] .switch__knob::after { left: 4px; background: var(--mut); }
.proof__warn { color: var(--sig); font-weight: 700; max-width: 44ch; }
.caveat { display: block; font-size: var(--s-small); line-height: 1.4; color: var(--ink); max-width: 34ch; padding-left: 14px; box-shadow: inset 3px 0 var(--sig); overflow: clip; }
.no-caveats .caveat { display: none; }

@media (max-width: 760px) { .card__label { display: block; } }
.bar { transition: color .6s var(--ease), transform .6s var(--ease), background-color .6s var(--ease); }
.bar.is-solid { background: var(--bar-bg, var(--bg)); }
body.theme-paper { --bar-bg: var(--paper); }
body.theme-sig { --bar-bg: var(--sig); }
body.menu-open { --bar-bg: transparent; }
.bar.is-hidden { transform: translateY(-110%); }

@media (max-height: 760px) { .hero__hint { display: none; } }

/* reduced motion: the ring becomes a plain grid */
.reduce .work__pin { height: auto; display: block; padding: 14vh var(--m); }
.reduce .ring-wrap { perspective: none; margin-top: 48px; }
.reduce .ring { position: static; width: auto; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; transform: none; }
.reduce .card { position: relative; width: 100%; height: auto; aspect-ratio: 16 / 10; margin: 0; }
.reduce .card__img img { filter: none; transform: none; }
.reduce .card__label { display: block; }
.reduce .work__now { display: none; }
.noscript-work { display: grid; gap: 10px; margin-top: 40px; font-size: 1.4rem; font-weight: 700; }
.no-js #sphere-wrapper, .no-js .cursor { display: none; }

/* ===================== v4: WebGL hero and gallery ===================== */
.hero__gl { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.gl-hero .hero__line { color: transparent !important; }
.gl-hero .hero__line .char { color: transparent !important; }
.hero__face, .hero__copy, .hero__meta, .hero__hint, .hero__scroll { z-index: 1; }
.work__gl { position: absolute; inset: 0; z-index: 1; touch-action: pan-y; cursor: grab; }
.gl-work .ring { visibility: hidden; }
.is-dragging, .is-dragging * { user-select: none; cursor: grabbing !important; }

/* ===================== money path ===================== */
.path { position: relative; }
.path__pin { position: relative; height: 100svh; display: grid; grid-template-columns: minmax(280px, .8fr) 1.6fr; grid-template-rows: 1fr auto; gap: 24px 48px; align-items: center; padding: 96px var(--m) var(--m); overflow: clip; }
.path__steps { position: relative; align-self: center; height: 12em; font-size: clamp(1.8rem, 1rem + 2.4vw, 3.4rem); }
.path__step { position: absolute; inset: 0; display: grid; gap: 14px; align-content: start; opacity: 0; transform: translateY(30px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.path__step.is-on { opacity: 1; transform: none; }
.path__step b { font-size: 1rem; color: var(--sig); font-variant-numeric: tabular-nums; }
.path__step p { font-weight: 700; line-height: .98; letter-spacing: -0.04em; font-variation-settings: "opsz" 96, "wdth" 85; max-width: 13ch; }
.path__svg { width: 100%; height: auto; max-height: 72svh; color: var(--mut); overflow: visible; }
.path__svg .pn rect { fill: var(--bg-2); stroke: var(--veil); stroke-width: 2; transition: fill .4s, stroke .4s; }
.path__svg text { fill: var(--ink); font: 700 22px var(--display); letter-spacing: -0.01em; }
.path__svg text.sm { font-size: 15px; font-weight: 500; fill: var(--mut); }
.path__svg text.mono { font-family: var(--mono); fill: var(--sig); }
.path__svg text.bad, .path__svg .lbl.bad { fill: #ff8f6b; }
.path__svg .pn--model rect { stroke-dasharray: 6 6; stroke: var(--mut); }
.path__svg .pn--gate rect { fill: rgba(60,44,16,.8); stroke: var(--sig); }
.path__svg .pn--pay.is-lit rect { fill: #1f2a20; stroke: #a3d977; }
.path__svg .pn--pay.is-hit rect { fill: rgba(120,40,20,.6); stroke: #ec5b32; }
.path__svg .pl { fill: none; stroke-width: 4; stroke-linecap: round; }
.path__svg .pl--you { stroke: var(--ink); color: var(--ink); }
.path__svg .pl--bad { stroke: #ff8f6b; color: #ff8f6b; }
.path__svg .pl--good { stroke: #a3d977; color: #a3d977; }
.path__svg .lbl { font: 600 17px var(--mono); }
.path__svg .lbl--gone { fill: var(--mut); opacity: 0; }
.path__svg .cut circle { fill: var(--sig); }
.path__svg .cut path { stroke: var(--bg); stroke-width: 5; stroke-linecap: round; }
.path__svg .chip-sku rect { fill: rgba(70,110,52,.55); }
.path__svg .chip-sku text { font: 600 14px var(--mono); fill: #a3d977; }
.path__svg .dot--bad { fill: #ff8f6b; }
.path__svg .dot--good { fill: #a3d977; }
.path__stat { grid-column: 1 / -1; font-size: var(--s-lead); color: var(--mut); }
.path__stat b { color: var(--sig); }
.reduce .path__pin, .no-js .path__pin { height: auto; }
.reduce .path__step, .no-js .path__step { position: static; opacity: 1; transform: none; }
.reduce .path__steps, .no-js .path__steps { height: auto; display: grid; gap: 18px; font-size: 1.6rem; }

/* ===================== stack playground ===================== */
.stack__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.stack__head .stack__title { margin: 0; }
.stack__hint { display: flex; align-items: center; gap: 16px; color: var(--mut); font-weight: 600; }
.play { position: relative; height: min(76svh, 720px); border-radius: 32px; background: var(--bg-2); overflow: hidden; touch-action: pan-y; display: none; }
.has-play .play { display: block; }
.has-play .tools { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chip { position: absolute; left: 0; top: 0; display: inline-flex; flex-direction: column; justify-content: center; padding: 14px 26px; border-radius: 999px; background: var(--bg); color: var(--ink); white-space: nowrap; cursor: grab; touch-action: none; user-select: none; will-change: transform; transition: background-color .25s, color .25s; }
.chip b { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.chip span { font-size: .78rem; color: var(--mut); font-weight: 600; }
.chip--big { padding: 18px 34px; background: var(--ink); color: var(--bg); }
.chip--big b { font-size: clamp(1.3rem, 1rem + 1vw, 2rem); font-weight: 800; letter-spacing: -0.03em; font-variation-settings: "opsz" 96, "wdth" 85; }
.chip--big span { color: #3d4a40; }
.chip:hover, .chip.is-held { background: var(--sig); color: var(--sig-ink); }
.chip:hover span, .chip.is-held span { color: var(--sig-ink); }
.chip.is-held { cursor: grabbing; }

/* ===================== command palette ===================== */
.bar__k { height: 44px; padding: 0 8px; opacity: .8; }
.bar__k kbd { display: inline-grid; place-items: center; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--veil); font: 600 13px var(--mono); color: inherit; }
.pal[hidden] { display: none !important; }
.pal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: 14vh; background: rgba(10, 18, 14, .55); opacity: 0; transition: opacity .2s; }
.pal.on { opacity: 1; }
.pal__box { width: min(640px, calc(100% - 24px)); border-radius: 24px; background: var(--bg-2); color: var(--ink); overflow: hidden; transform: translateY(12px) scale(.98); transition: transform .35s var(--ease); }
.pal.on .pal__box { transform: none; }
.pal__in { width: 100%; height: 64px; padding: 0 24px; border: 0; background: transparent; color: var(--ink); font: 600 1.15rem var(--display); outline: none; }
.pal__in::placeholder { color: var(--mut); }
.pal__list { max-height: 50vh; overflow: auto; padding: 6px; }
.pal__list li { display: flex; gap: 14px; align-items: baseline; padding: 12px 18px; border-radius: 14px; cursor: pointer; font-weight: 600; }
.pal__list li span { min-width: 54px; font: 600 12px var(--mono); color: var(--mut); text-transform: uppercase; }
.pal__list li[aria-selected="true"] { background: var(--sig); color: var(--sig-ink); }
.pal__list li[aria-selected="true"] span { color: var(--sig-ink); }
.pal__none { color: var(--mut); cursor: default !important; }
.pal__foot { display: flex; gap: 18px; padding: 12px 24px; background: var(--bg); color: var(--mut); font-size: 12.5px; font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 85; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; transform: translate(-50%, 140%); transition: transform .5s var(--ease); pointer-events: none; }
.toast.on { transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .path__pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding-top: 88px; gap: 12px; }
  .path__steps { height: 5.2em; font-size: 1.7rem; }
  .bar__k { display: none; }
  .play { height: 70svh; }
  .chip { padding: 10px 18px; } .chip--big { padding: 12px 22px; }
}
.gl-contact .contact__title, .gl-contact .contact__title .char { color: transparent !important; }
.contact { position: relative; }
.contact > *:not(.hero__gl) { position: relative; z-index: 1; }
.live { margin-top: 12vh; }
.live__title { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.live__list { display: grid; }
.live__list a { display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; align-items: baseline; padding: 14px 0; text-decoration: none; box-shadow: inset 0 -1px rgba(10, 18, 14, .14); transition: padding .4s var(--ease), color .3s; }
.live__list a:hover { padding-left: 12px; color: var(--sig); }
.live__repo { font: 600 13px var(--mono); }
.live__msg { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live__t { font-size: var(--s-small); opacity: .6; white-space: nowrap; }
@media (max-width: 760px) { .live__list a { grid-template-columns: 1fr auto; } .live__msg { grid-column: 1 / -1; grid-row: 2; white-space: normal; } }
@media (max-width: 760px) {
  .path__svg { max-height: none; margin: 0 -8px; width: calc(100% + 16px); }
  .path__svg text { font-size: 30px; }
  .path__svg text.sm, .path__svg .lbl--gone { display: none; }
  .path__svg .lbl { font-size: 24px; }
  .path__svg .chip-sku text { font-size: 15px; }
}
/* cursor ink sits behind the content and shows through the transparent sections */
.fluid { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ===================== case study, v4 ===================== */
.case__progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3; }
.case__progress i { display: block; height: 100%; background: var(--sig); transform-origin: 0 50%; transform: scaleX(0); }
.case__head { display: grid; gap: 4px; }
.case__title { font-size: clamp(4.5rem, 1rem + 15vw, 17rem); }
.case__hero { aspect-ratio: 16 / 8.5; margin-left: calc(var(--m) * -1); margin-right: calc(var(--m) * -1); border-radius: 0; }
.case__hero img { transform: scale(1.06); transform-origin: 50% 0%; will-change: transform; }
.case__stats { grid-template-columns: repeat(4, 1fr); margin-top: 0; gap: 0; border-radius: 0 0 26px 26px; overflow: hidden; }
.case__stats li { border-radius: 0; background: var(--bg-2); padding: 28px 24px; box-shadow: inset -1px 0 var(--veil); }
.case__stats b { color: var(--sig); }
.case__body { display: grid; grid-template-columns: minmax(160px, .4fr) 1fr; gap: 48px; margin-top: 96px; }
.case__label { position: sticky; top: 100px; align-self: start; font-weight: 800; color: var(--mut); }
.case__copy { margin: 0; max-width: 64ch; }
.case__copy p:first-child { font-size: clamp(1.35rem, 1rem + 1vw, 1.9rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 600; }
.case__copy p:last-child { color: var(--mut); }
.case__gallery { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; margin: 96px calc(var(--m) * -1) 0; padding: 0 var(--m) 8px; scrollbar-width: none; cursor: grab; }
.case__gallery::-webkit-scrollbar { display: none; }
.case__gallery.is-drag { cursor: grabbing; scroll-snap-type: none; }
.case__gallery img { flex: none; width: min(78vw, 1040px); aspect-ratio: 16 / 10; object-fit: cover; border-radius: 22px; scroll-snap-align: center; pointer-events: none; user-select: none; }
.case__gallery:empty { display: none; }
.case__next { position: relative; overflow: visible; }
.case__peek { position: absolute; left: 0; top: 0; width: 320px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: -1; }
.case__next:hover .case__peek { opacity: 1; }
@media (max-width: 760px) {
  .case__body { grid-template-columns: 1fr; gap: 16px; margin-top: 56px; }
  .case__label { position: static; }
  .case__stats { grid-template-columns: 1fr 1fr; }
  .case__peek { display: none; }
}
/* gate: run-all and the rubber stamp */
.attacks-wrap { position: sticky; top: 96px; display: grid; gap: 14px; align-content: start; }
.attacks-wrap .attacks { position: static; }
.attacks__all { justify-self: start; }
.attacks__all:disabled { opacity: .5; pointer-events: none; }
.stamp { position: absolute; z-index: 6; right: 44px; top: 36%; display: grid; justify-items: center; padding: 14px 26px 12px; border: 6px solid var(--poppy); border-radius: 18px; color: var(--poppy); transform: rotate(-9deg); opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.stamp span { font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 75, "opsz" 96; text-transform: uppercase; font-size: clamp(3rem, 2rem + 3vw, 5.4rem); line-height: .85; letter-spacing: -0.02em; }
.stamp small { font: 700 15px var(--mono); }
@media (max-width: 1080px) { .attacks-wrap { position: static; } }

/* ===================== v5: the page as overlays on one 3D world ===================== */
.world-gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
html.world { background: #101b15; }
html.world body, html.world body.theme-paper, html.world body.theme-sig { background: transparent; }
html.world .grain { opacity: .05; }
/* panels that carry dense text become glass over the world */
html.world .machine { background: rgba(16, 27, 21, .72); -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25); box-shadow: inset 0 0 0 1px rgba(246, 239, 223, .07); }
html.world .proposal, html.world .rule, html.world .tally div, html.world .ledger li { background: rgba(10, 18, 14, .62); }
html.world .rule.is-pass { background: rgba(70, 110, 52, .62); }
html.world .rule.is-fire { background: var(--sig); }
html.world .attack { background: rgba(16, 27, 21, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
html.world .attack[aria-pressed="true"] { background: var(--sig); }
html.world .switch, html.world .own input { background: rgba(16, 27, 21, .66); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
html.world .play { background: rgba(16, 27, 21, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(246, 239, 223, .07); }
html.world .path__svg .pn rect { fill: rgba(16, 27, 21, .78); }
html.world .path__svg .pn--gate rect { fill: rgba(60, 44, 16, .72); }
html.world .principle { background: rgba(10, 18, 14, .05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
html.world .principle:hover { background: var(--paper-ink); }
/* the work stage is the world itself: the CSS ring steps aside */
html.world .ring-wrap { cursor: grab; touch-action: pan-y; }
html.world .work__now { position: relative; z-index: 2; }
@media (max-width: 760px) {
  /* phones keep the list of cards, glassed over the places */
  html.world.gl-work .ring { visibility: visible; }
  html.world .card { background: rgba(16, 27, 21, .6); }
  html.world .machine, html.world .attack, html.world .play, html.world .principle { -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.world .machine { background: rgba(16, 27, 21, .9); }
  html.world .attack { background: rgba(16, 27, 21, .86); }
}
/* numbers stand on glass over the field of attacks */
html.world .proof__grid li { padding: 26px 26px 28px; border-radius: 26px; background: rgba(10, 18, 14, .6); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: inset 0 0 0 1px rgba(246, 239, 223, .06); }
html.world .proof__grid { gap: 14px; }
html.world .proof__grid span { color: #d9d3c1; }
@media (max-width: 760px) { html.world .proof__grid li { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 18, 14, .82); } }

/* ===================== v6: interludes and explore mode ===================== */
.interlude { display: none; }
html.world .interlude { display: flex; height: 150vh; align-items: flex-end; padding: 0 var(--m) 16vh; pointer-events: none; }
.interlude__cap { position: sticky; bottom: 12vh; max-width: 17ch; font-size: clamp(1.9rem, 1rem + 2.6vw, 3.8rem); font-weight: 700; line-height: .98; letter-spacing: -.04em; font-variation-settings: "opsz" 96, "wdth" 85; text-shadow: 0 2px 30px rgba(10, 18, 14, .6); }
.interlude__cap small { display: block; margin-bottom: 16px; font: 700 1rem/1 var(--display); color: var(--sig); letter-spacing: 0; text-shadow: none; font-variant-numeric: tabular-nums; }
.bar__explore { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--veil); font-weight: 700; color: inherit; transition: background-color .3s, color .3s; }
.bar__explore[hidden] { display: none; }
.bar__explore:hover { background: var(--sig); color: var(--sig-ink); }
.bar__explore-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--sig); transform: rotate(45deg); }
.bar__explore:hover .bar__explore-dot { background: var(--sig-ink); }
.btn--explore[hidden] { display: none; }
html.world main, html.world .bar, html.world .progress, html.world .twin-static { transition: opacity .6s var(--ease), transform .6s var(--ease); }
html.exploring main, html.exploring .bar, html.exploring .progress, html.exploring .twin-static { opacity: 0 !important; pointer-events: none !important; }
.explore { position: fixed; inset: 0; z-index: 34; opacity: 0; transition: opacity .5s var(--ease); }
.explore.on { opacity: 1; }
.explore[hidden] { display: none; }
.explore__pad { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.explore__pad.is-drag { cursor: grabbing; }
.has-cursor .explore__pad { cursor: none; }
.explore__labels { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
.poi { position: absolute; left: 0; top: 0; pointer-events: auto; transform-origin: 50% 100%; display: grid; gap: 3px; padding: 9px 14px 10px; border-radius: 14px; background: rgba(10, 18, 14, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); text-align: left; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(246, 239, 223, .1); transition: background-color .25s, color .25s; }
.poi b { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.poi span { font-size: 12.5px; font-weight: 600; color: var(--mut); }
.poi::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 18px; background: rgba(246, 239, 223, .4); }
.poi.is-near { background: var(--sig); color: var(--sig-ink); }
.poi.is-near span { color: var(--sig-ink); }
.poi:hover { background: var(--ink); color: var(--bg); }
.poi:hover span { color: #3d4a40; }
.explore__top { position: absolute; left: var(--m); right: var(--m); top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; pointer-events: none; }
.explore__top > * { pointer-events: auto; }
.explore__hint { padding: 12px 18px; border-radius: 999px; background: rgba(10, 18, 14, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); font-weight: 600; font-size: var(--s-small); }
.explore__exit { min-height: 48px; }
.explore__joy { position: absolute; left: 24px; bottom: 24px; width: 128px; height: 128px; border-radius: 50%; background: rgba(246, 239, 223, .1); box-shadow: inset 0 0 0 1px rgba(246, 239, 223, .2); display: none; touch-action: none; }
.explore__joy i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: var(--sig); transition: transform .08s; }
@media (hover: none) { .explore__joy { display: block; } }
@media (max-width: 760px) {
  .bar__explore { padding: 0 12px; height: 40px; }
  .bar__explore [data-roll] { font-size: .9rem; }
  .explore__top { flex-direction: column; align-items: stretch; }
  .explore__hint { text-align: center; }
  html.world .interlude { height: 120vh; }
}

/* ===================== v7: the meadow. Glass over a living sky, cream type with a soft shade ===================== */
html.world { --text-shade: 0 1px 2px rgba(8, 16, 11, .35), 0 4px 34px rgba(8, 16, 11, .38); }
html.world body.theme-paper, html.world body.theme-sig { color: var(--ink); --bar-ink: var(--ink); --bar-btn: var(--ink); --bar-btn-ink: var(--paper-ink); --bar-bg: transparent; }
html.world .bar.is-solid { background: linear-gradient(rgba(10, 18, 13, .5), rgba(10, 18, 13, 0)); }
html.world .bar { text-shadow: 0 1px 12px rgba(8, 16, 11, .5); }
html.world .bar__menu { text-shadow: none; }
html.world h2, html.world .intro__text, html.world .hero__lead, html.world .gate__sub, html.world .path__step p, html.world .path__stat,
html.world .work__name, html.world .work__fact, html.world .work__count, html.world .contact__title, html.world .contact__ask, html.world .contact__mail,
html.world .about__text, html.world .stack__hint, html.world .hero__meta, html.world .interlude__cap, html.world .live__title, html.world .foot { text-shadow: var(--text-shade); }
html.world .intro__text .word { opacity: .28; }
html.world .machine, html.world .attack, html.world .proof__grid li, html.world .principle, html.world .play, html.world .switch, html.world .own input, html.world .poi, html.world .explore__hint, html.world .explore__time {
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.35); backdrop-filter: blur(16px) saturate(1.35); box-shadow: inset 0 0 0 1px var(--edge);
}
html.world .proposal, html.world .rule, html.world .tally div, html.world .ledger li { background: var(--glass-2); }
html.world .rule.is-pass { background: rgba(70, 110, 52, .62); }
html.world .rule.is-fire { background: var(--poppy); }
html.world .attack[aria-pressed="true"] { background: var(--sig); color: var(--sig-ink); }
html.world .path__svg .pn rect { fill: rgba(12, 22, 16, .62); stroke: rgba(246, 239, 223, .18); }
html.world .proof__grid span, html.world .principle p { color: #d9d3c1; }
html.world .principle:hover { background: var(--paper); color: var(--paper-ink); }
html.world .principle:hover p { color: var(--paper-ink); }
html.world .records li, html.world .live__list a { box-shadow: inset 0 -1px rgba(246, 239, 223, .16); }
html.world .marquee { background: var(--sig); color: var(--sig-ink); }
html.world .marquee--alt { background: var(--paper); color: var(--paper-ink); }
html.world .tool::before { background: var(--sig); }
html.world .card { background: var(--glass); }
html.world .chip { background: var(--glass-2); }
html.world .chip--big { background: var(--paper); color: var(--paper-ink); }
.btn--ghost { background: var(--veil); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px var(--edge); }
.btn--sig:hover { background: var(--paper); color: var(--paper-ink); }
.poi.is-near { background: var(--sig); color: var(--sig-ink); }
.explore__time { position: absolute; right: var(--m); bottom: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: min(420px, calc(100% - 2 * var(--m))); padding: 12px 18px; border-radius: 999px; color: var(--ink); font-weight: 700; font-size: var(--s-small); }
.explore__time input { width: 100%; accent-color: var(--sig); }
.explore__clock { font-variant-numeric: tabular-nums; font-family: var(--mono); font-weight: 700; }
@media (hover: none) { .explore__time { left: auto; right: 12px; bottom: 168px; width: min(320px, calc(100% - 24px)); } }
@media (max-width: 760px) { html.world .machine, html.world .attack, html.world .proof__grid li, html.world .principle, html.world .play { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 24, 18, .82); } }
html.world .path__svg .pn--gate rect { fill: rgba(60, 44, 16, .72); stroke: var(--sig); }
html.exploring #sphere-wrapper, html.exploring .twin-static { opacity: 0 !important; pointer-events: none !important; }
html.world .hero__meta { color: rgba(246, 239, 223, .88); }
html.world .hero__hint { color: rgba(246, 239, 223, .8); text-shadow: var(--text-shade); }
.gl-contact .contact__title, .gl-hero .hero__line { text-shadow: none !important; }
