/* Cobra Developers. Hand-written, no framework, no preprocessor. */

@font-face {
  font-family: 'Anybody';
  src: url('/fonts/anybody-1.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-1.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-2.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jbmono-1.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@property --wdth {
  syntax: '<number>';
  inherits: true;
  initial-value: 100;
}
@property --reveal {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}

@view-transition {
  navigation: auto;
}

:root {
  color-scheme: light dark;
  --paper: light-dark(#ebe7dc, #12120e);
  --paper-2: light-dark(#e1dccf, #1b1b15);
  --ink: light-dark(#15140f, #ebe7dc);
  --ink-2: light-dark(#4d4a40, #a9a595);
  --rule: light-dark(rgb(21 20 15 / 0.16), rgb(235 231 220 / 0.16));
  --venom: #d2ee3a;
  --venom-ink: #15140f;
  --rust: light-dark(#b8391a, #ff7a52);
  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --text: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --max: 86rem;
}
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.06rem, 0.98rem + 0.35vw, 1.28rem);
  line-height: 1.5;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--rust); }
::selection { background: var(--venom); color: var(--venom-ink); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 0.95;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--venom); color: var(--venom-ink); padding: 0.5rem 0.8rem; z-index: 99; }

/* page-progress hairline, driven by scroll with no JavaScript */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--rust); transform-origin: 0 50%; transform: scaleX(0);
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
}

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 3.6rem; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 800; font-stretch: 70%;
  font-size: 1.22rem; text-decoration: none; letter-spacing: 0.005em;
  view-transition-name: brand;
}
.brand svg { width: 2rem; height: 2rem; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 2rem); font-size: 1rem; }
.nav a { text-decoration: none; position: relative; padding-block: 0.3rem; }
.nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav a:hover::after, .nav a[aria-current='page']::after { transform: scaleX(1); }
.term-open {
  font-family: var(--mono); font-size: 0.8rem; line-height: 1;
  background: var(--ink); color: var(--paper); border: 0; border-radius: 3px;
  padding: 0.5rem 0.65rem; cursor: pointer; display: inline-flex; gap: 0.5rem; align-items: center;
}
.term-open kbd { font: inherit; background: var(--venom); color: var(--venom-ink); padding: 0.05rem 0.3rem; border-radius: 2px; }
.term-open:hover { background: var(--rust); color: #fff; }
@media (max-width: 640px) {
  .nav { gap: 0.9rem; font-size: 0.95rem; }
  .term-open span { display: none; }
  .brand span { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 60rem); display: grid; align-content: end; overflow: clip; isolation: isolate; }
.hero canvas, .hero .scales-fallback { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.scales-fallback {
  --s: 40px;
  background:
    radial-gradient(circle at 50% 0, transparent calc(var(--s) * 0.5 - 1.5px), var(--rule) calc(var(--s) * 0.5 - 1px), var(--rule) calc(var(--s) * 0.5), transparent calc(var(--s) * 0.5 + 0.5px)) 0 0 / var(--s) calc(var(--s) * 0.5),
    radial-gradient(circle at 50% 0, transparent calc(var(--s) * 0.5 - 1.5px), var(--rule) calc(var(--s) * 0.5 - 1px), var(--rule) calc(var(--s) * 0.5), transparent calc(var(--s) * 0.5 + 0.5px)) calc(var(--s) * 0.5) calc(var(--s) * 0.25) / var(--s) calc(var(--s) * 0.5);
}
.hero .wrap { width: 100%; container-type: inline-size; padding-block: clamp(6rem, 16vh, 11rem) clamp(1.5rem, 4vh, 3rem); }
.wordmark {
  font-size: min(15.9cqw, 31svh);
  font-weight: 900;
  font-variation-settings: 'wdth' var(--wdth);
  line-height: 0.82;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 0 -0.04em;
  user-select: none;
}
.wordmark span { display: block; }
.wordmark .b { color: transparent; -webkit-text-stroke: 1.5px var(--ink); font-weight: 700; }
@media (max-width: 640px) { .wordmark .b { -webkit-text-stroke-width: 1px; } }
.hero-foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: end; margin-top: clamp(1.4rem, 4vh, 3rem); }
.hero-foot p.lede { font-size: clamp(1.3rem, 1rem + 1.3vw, 2.05rem); line-height: 1.22; max-width: 24em; margin: 0; }
.hero-foot p.lede mark { background: var(--venom); color: var(--venom-ink); padding: 0 0.18em; }
.gpu-note { font-family: var(--mono); font-size: 0.76rem; line-height: 1.55; color: var(--ink-2); justify-self: end; text-align: right; max-width: 30em; margin: 0; }
.gpu-note b { color: var(--ink); font-weight: 600; }
@media (max-width: 800px) { .hero-foot { grid-template-columns: 1fr; } .gpu-note { justify-self: start; text-align: left; } }

/* load-in for the wordmark: width axis opens up */
@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: open 1.4s cubic-bezier(0.16, 0.8, 0.2, 1) backwards; }
  @keyframes open { from { --wdth: 50; opacity: 0; } 30% { opacity: 1; } to { --wdth: 100; } }
  .hero-foot > * { animation: rise 0.9s 0.5s cubic-bezier(0.16, 0.8, 0.2, 1) both; }
  .hero-foot > *:nth-child(2) { animation-delay: 0.7s; }
  @keyframes rise { from { opacity: 0; transform: translateY(1.2rem); } }
}

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 9vw, 8rem); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.sec-head h2 { font-size: clamp(2.3rem, 6.2vw, 5.6rem); }
.sec-head p { color: var(--ink-2); margin: 0; max-width: 30em; }
@media (max-width: 800px) { .sec-head { grid-template-columns: 1fr; gap: 1rem; } }
.ruled { border-top: 1px solid var(--ink); }

/* scroll-driven reveal, CSS only */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rv { animation: rv linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes rv { from { opacity: 0; transform: translateY(2.2rem); } }
    .shot img { animation: shot linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    @keyframes shot { from { clip-path: inset(0 0 100% 0); transform: scale(1.12); } to { clip-path: inset(0); transform: none; } }
    .h-stretch { animation: stretch linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; font-variation-settings: 'wdth' var(--wdth); }
    @keyframes stretch { from { --wdth: 50; } to { --wdth: 105; } }
  }
}

/* ---------- featured work ---------- */
.feature { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); align-items: center; padding-block: clamp(2rem, 5vw, 4.5rem); border-top: 1px solid var(--rule); }
.feature .shot { grid-column: 1 / span 7; }
.feature .txt { grid-column: 8 / -1; }
.feature:nth-of-type(even) .shot { grid-column: 6 / -1; order: 2; }
.feature:nth-of-type(even) .txt { grid-column: 1 / span 5; }
.feature h3 { font-size: clamp(2rem, 4.4vw, 4rem); margin-bottom: 0.35em; }
.feature h3 a { text-decoration: none; background: linear-gradient(var(--venom), var(--venom)) 0 100% / 0 0.42em no-repeat; transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.feature h3 a:hover { background-size: 100% 0.42em; }
.feature .sector { color: var(--rust); font-style: italic; margin-bottom: 0.4rem; }
.feature .go { display: inline-block; margin-top: 0.4rem; font-family: var(--display); font-weight: 700; font-stretch: 85%; }
@media (max-width: 800px) {
  .feature .shot, .feature .txt, .feature:nth-of-type(even) .shot, .feature:nth-of-type(even) .txt { grid-column: 1 / -1; order: 0; }
}
.shot { display: block; overflow: clip; border: 1px solid var(--ink); border-radius: 4px; background: var(--paper-2); box-shadow: 0.55rem 0.55rem 0 var(--ink); transition: box-shadow 0.25s, translate 0.25s; }
a.shot:hover { box-shadow: 0.2rem 0.2rem 0 var(--rust); translate: 0.35rem 0.35rem; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

/* ---------- ledger ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.filters button {
  background: none; border: 1px solid var(--ink); border-radius: 3px; padding: 0.4rem 0.8rem; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-stretch: 88%; font-size: 0.98rem;
}
.filters button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.filters button:hover:not([aria-pressed='true']) { background: var(--venom); color: var(--venom-ink); }
.filters .count { margin-left: auto; align-self: center; color: var(--ink-2); font-style: italic; }
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger li { border-bottom: 1px solid var(--rule); }
.ledger li[hidden] { display: none; }
.ledger a {
  display: grid; grid-template-columns: minmax(9rem, 1.1fr) minmax(0, 2.4fr) minmax(0, 0.9fr) 3.4rem 5.2rem;
  gap: 1.2rem; align-items: baseline; padding: 0.95rem 0.5rem; text-decoration: none; position: relative;
  transition: padding 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ledger a::before { content: ''; position: absolute; inset: 0; background: var(--venom); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1); z-index: -1; }
.ledger a:hover, .ledger a:focus-visible { color: var(--venom-ink); padding-left: 1.2rem; }
.ledger a:hover::before, .ledger a:focus-visible::before { transform: scaleY(1); }
.ledger .n { font-family: var(--display); font-weight: 800; font-stretch: 78%; font-size: clamp(1.25rem, 1rem + 1vw, 1.8rem); line-height: 1; }
.ledger .l { color: var(--ink-2); font-size: 0.98rem; line-height: 1.35; }
.ledger a:hover .l, .ledger a:hover .s, .ledger a:hover .y { color: inherit; }
.ledger .s { font-style: italic; color: var(--ink-2); font-size: 0.95rem; }
.ledger .y { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.95rem; }
.ledger .st { font-size: 0.86rem; font-family: var(--display); font-weight: 600; font-stretch: 88%; text-align: right; }
.st[data-st='live']::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: #2a9d4b; margin-right: 0.4em; }
.st[data-st='build']::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--rust); margin-right: 0.4em; }
.st[data-st='internal']::before { content: ''; display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; border: 1px solid currentColor; margin-right: 0.4em; }
@media (max-width: 800px) {
  .ledger a { grid-template-columns: 1fr auto; gap: 0.25rem 1rem; }
  .ledger .l { grid-column: 1 / -1; order: 3; }
  .ledger .s, .ledger .y { display: none; }
}
.peek {
  position: fixed; left: 0; top: 0; width: 21rem; aspect-ratio: 16 / 10; z-index: 40; pointer-events: none;
  border: 1px solid var(--ink); border-radius: 4px; overflow: clip; background: var(--paper-2);
  box-shadow: 0.4rem 0.4rem 0 var(--ink); opacity: 0; scale: 0.9; rotate: -2deg;
  transition: opacity 0.18s, scale 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.peek.on { opacity: 1; scale: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: none), (max-width: 800px) { .peek { display: none; } }

/* ---------- capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.cap { padding: clamp(1.4rem, 3vw, 2.6rem) clamp(0rem, 2vw, 2rem) clamp(1.4rem, 3vw, 2.6rem) 0; border-bottom: 1px solid var(--rule); }
.cap:nth-child(odd) { border-right: 1px solid var(--rule); }
.cap:nth-child(even) { padding-left: clamp(1rem, 3vw, 2.6rem); }
.cap h3 { font-size: clamp(1.6rem, 3vw, 2.5rem); margin-bottom: 0.5em; }
.cap p { color: var(--ink-2); max-width: 32em; }
.cap .eg { font-size: 0.95rem; font-style: italic; color: var(--ink); margin: 0; }
@media (max-width: 800px) { .caps { grid-template-columns: 1fr; } .cap, .cap:nth-child(even) { padding-inline: 0; border-right: 0; } .cap:nth-child(odd) { border-right: 0; } }

/* ---------- stack wall ---------- */
.stackwall { display: flex; flex-wrap: wrap; gap: 0.45rem 0.5rem; }
.chip {
  font-family: var(--mono); font-size: 0.82rem; line-height: 1; padding: 0.5rem 0.6rem;
  border: 1px solid var(--ink); border-radius: 3px; background: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, translate 0.15s;
}
.chip:hover, .chip.is-open { background: var(--ink); color: var(--paper); translate: 0 -2px; }
.chip sup { font-size: 0.7em; margin-left: 0.35em; color: var(--rust); }
.chip:hover sup, .chip.is-open sup { color: var(--venom); }
.also {
  border: 1px solid var(--ink); border-radius: 4px; background: var(--paper); color: var(--ink); padding: 0.9rem 1rem; margin: 0;
  width: max-content; max-width: min(22rem, 90vw); box-shadow: 0.35rem 0.35rem 0 var(--ink); font-size: 0.95rem;
  inset: auto; position: fixed; left: 50%; top: 50%; translate: -50% -50%;
}
@supports (position-anchor: --a) {
  .also { position-anchor: --chip; left: anchor(left); top: calc(anchor(bottom) + 0.5rem); translate: none; position-try-fallbacks: flip-block, flip-inline; }
}
.also:popover-open { opacity: 1; transform: none; }
.also { opacity: 0; transform: translateY(-0.4rem); transition: opacity 0.18s, transform 0.18s, overlay 0.18s allow-discrete, display 0.18s allow-discrete; }
@starting-style { .also:popover-open { opacity: 0; transform: translateY(-0.4rem); } }
.also h4 { font-family: var(--display); font-stretch: 85%; margin: 0 0 0.4rem; font-size: 1rem; }
.also ul { list-style: none; margin: 0; padding: 0; }
.also li + li { margin-top: 0.15rem; }

/* ---------- how we work ---------- */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 3rem); }
.how h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-bottom: 0.5em; }
.how p { color: var(--ink-2); }
@media (max-width: 800px) { .how { grid-template-columns: 1fr; } }

/* ---------- big call to action ---------- */
.cta { background: var(--ink); color: var(--paper); }
.cta h2 { font-size: clamp(2.6rem, 9vw, 9rem); }
.cta h2 a { text-decoration: none; background: linear-gradient(var(--venom), var(--venom)) 0 88% / 100% 0.1em no-repeat; transition: background-size 0.3s, color 0.3s; }
.cta h2 a:hover { background-size: 100% 100%; background-position: 0 100%; color: var(--venom-ink); }
.cta p { max-width: 30em; margin-top: 1.5rem; color: color-mix(in srgb, var(--paper) 75%, transparent); }

/* ---------- page heads ---------- */
.phead { padding-block: clamp(3rem, 9vw, 7rem) clamp(1.5rem, 4vw, 3rem); }
.phead h1 { font-size: clamp(3rem, 11vw, 10.5rem); font-weight: 900; text-transform: uppercase; line-height: 0.84; margin-left: -0.03em; }
.phead .lede { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.85rem); line-height: 1.25; max-width: 30em; margin-top: 1.5rem; }

/* ---------- case page ---------- */
.case-head { padding-block: clamp(2.5rem, 7vw, 6rem) 0; }
.crumb { color: var(--ink-2); font-style: italic; margin-bottom: 1.2rem; display: block; width: max-content; }
.case-head h1 { font-size: clamp(2.8rem, 10vw, 9.5rem); font-weight: 900; line-height: 0.86; margin-left: -0.03em; }
.case-head .lede { font-size: clamp(1.3rem, 1rem + 1.3vw, 2.1rem); line-height: 1.2; max-width: 26em; margin: 1.6rem 0 0; }
.case-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 2.2rem; margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid var(--ink); font-size: 1rem; }
.case-meta dt { color: var(--ink-2); font-style: italic; font-size: 0.9rem; }
.case-meta dd { margin: 0; font-family: var(--display); font-weight: 700; font-stretch: 85%; }
.case-meta div { min-width: 6rem; }
.case-shot { margin-block: clamp(2rem, 5vw, 4rem); }
.case-shot .shot img { aspect-ratio: 16 / 10; }
.case-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem); }
.case-body .prose p:first-child::first-letter { font-family: var(--display); font-weight: 900; font-size: 3.6em; float: left; line-height: 0.78; padding: 0.08em 0.1em 0 0; }
.case-body .prose { font-size: 1.12em; }
.case-body aside h2 { font-size: 1.25rem; font-stretch: 88%; margin: 0 0 0.8rem; }
.case-body aside section { padding: 0 0 2rem; }
.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; text-align: right; font-family: var(--display); font-weight: 700; font-stretch: 85%; }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; border: 1px solid var(--ink); border-radius: 3px;
  padding: 0.75rem 1.1rem; font-family: var(--display); font-weight: 700; font-stretch: 88%; cursor: pointer;
  box-shadow: 0.3rem 0.3rem 0 var(--venom); transition: translate 0.15s, box-shadow 0.15s;
}
.btn:hover { translate: 0.3rem 0.3rem; box-shadow: 0 0 0 var(--venom); }
@media (max-width: 800px) { .case-body { grid-template-columns: 1fr; } }
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.pager a { padding: clamp(1.5rem, 4vw, 3rem) 0; text-decoration: none; }
.pager a + a { text-align: right; border-left: 1px solid var(--rule); }
.pager small { display: block; color: var(--ink-2); font-style: italic; font-size: 0.95rem; }
.pager b { font-family: var(--display); font-weight: 800; font-stretch: 78%; font-size: clamp(1.4rem, 3.5vw, 2.8rem); line-height: 1; }
.pager a:hover b { background: var(--venom); color: var(--venom-ink); }

/* ---------- company ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.two h2 { font-size: clamp(1.9rem, 4vw, 3.4rem); margin-bottom: 0.6em; }
.record { margin: 0; border-top: 1px solid var(--ink); }
.record div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.record dt { color: var(--ink-2); font-style: italic; }
.record dd { margin: 0; }
@media (max-width: 520px) { .record div { grid-template-columns: 1fr; gap: 0; } }
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--ink); }
.numbers div { padding: clamp(1.2rem, 3vw, 2.4rem) 1rem clamp(1.2rem, 3vw, 2.4rem) 0; }
.numbers div + div { border-left: 1px solid var(--rule); padding-left: clamp(0.8rem, 2vw, 1.6rem); }
.numbers b { display: block; font-family: var(--display); font-weight: 900; font-stretch: 70%; font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.numbers span { color: var(--ink-2); font-size: 0.98rem; }
@media (max-width: 800px) { .numbers { grid-template-columns: 1fr 1fr; } .numbers div:nth-child(3) { border-left: 0; padding-left: 0; } .numbers div:nth-child(n + 3) { border-top: 1px solid var(--rule); } }

/* ---------- contact ---------- */
.brief { display: grid; gap: 1.3rem; max-width: 44rem; }
.brief label { display: grid; gap: 0.35rem; font-family: var(--display); font-weight: 700; font-stretch: 88%; }
.brief input, .brief textarea, .brief select {
  font: inherit; font-family: var(--text); font-weight: 400; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 0.55rem 0; width: 100%;
}
.brief textarea { min-height: 7.5rem; resize: vertical; field-sizing: content; }
.brief input:focus, .brief textarea:focus, .brief select:focus { outline: 0; border-bottom-color: var(--rust); box-shadow: 0 1px 0 var(--rust); }
.brief select option { background: var(--paper); color: var(--ink); }
.brief .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; }
.brief .hp { position: absolute; left: -999rem; }
.brief output { font-style: italic; }
@media (max-width: 640px) { .brief .row { grid-template-columns: 1fr; } }

/* ---------- footer + telemetry ---------- */
.foot { border-top: 1px solid var(--ink); padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; font-size: 0.98rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: 2rem; }
.foot h2 { font-size: 1.05rem; font-stretch: 88%; margin-bottom: 0.8rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.3rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot address { font-style: normal; color: var(--ink-2); }
.tele { font-family: var(--mono); font-size: 0.76rem; line-height: 1.7; color: var(--ink-2); margin: 0; }
.tele b { color: var(--ink); font-weight: 600; }
.foot-base { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); color: var(--ink-2); }
.theme { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; color: inherit; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- terminal ---------- */
.term {
  width: min(52rem, 94vw); height: min(34rem, 80vh); padding: 0; border: 1px solid #000; border-radius: 6px;
  background: #0e0e0b; color: #dedacb; font-family: var(--mono); font-size: 0.86rem; line-height: 1.55;
  box-shadow: 0.7rem 0.7rem 0 var(--venom); overflow: hidden;
}
.term[open] { display: grid; grid-template-rows: auto 1fr auto; animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.term::backdrop { background: rgb(10 10 8 / 0.55); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(1rem) scale(0.98); } }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.8rem; background: #1a1a15; border-bottom: 1px solid #2b2b23; color: #9b978a; }
.term-bar button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.term-bar button:hover { color: var(--venom); }
.term-out { overflow-y: auto; padding: 0.8rem; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-color: #3a3a30 transparent; }
.term-out .cmd { color: #fff; }
.term-out .cmd::before { content: '$ '; color: var(--venom); }
.term-out .v { color: var(--venom); }
.term-out .d { color: #8d897c; }
.term-out .e { color: #ff7a52; }
.term-out a { color: #fff; }
.term-out canvas { display: block; margin: 0.4rem 0; border: 1px solid #2b2b23; image-rendering: pixelated; }
.term-in { display: flex; gap: 0.5rem; padding: 0.6rem 0.8rem; border-top: 1px solid #2b2b23; }
.term-in span { color: var(--venom); }
.term-in input { flex: 1; background: none; border: 0; color: #fff; font: inherit; outline: 0; caret-color: var(--venom); }

/* named groups for cross-page morphs get a slightly springier curve */
::view-transition-group(*) { animation-duration: 0.38s; animation-timing-function: cubic-bezier(0.2, 0.75, 0.2, 1); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  .hero { min-height: 82svh; }
  .scales-fallback { --s: 30px; opacity: 0.7; }
}

/* ================= showpiece sections ================= */
:root { interpolate-size: allow-keywords; }

/* ---------- reel: vertical scroll drives a horizontal track, in CSS alone ---------- */
.reel { padding-block: clamp(2rem, 5vw, 4rem); }
.reel-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: end; padding-block: clamp(1rem, 3svh, 2.2rem); }
.reel-head h2 { font-size: clamp(2rem, 5.2vw, 4.6rem); }
.reel-head p { color: var(--ink-2); margin: 0; max-width: 30em; font-size: 0.98rem; }
@media (max-width: 800px) { .reel-head { grid-template-columns: 1fr; gap: 0.5rem; } .reel-head p { display: none; } }
.reel-track { display: flex; gap: clamp(1.5rem, 5vw, 5rem); padding-inline: var(--gutter) 12vw; overflow-x: auto; scroll-snap-type: x mandatory; align-items: start; padding-bottom: 1.2rem; }
.panel { flex: none; width: min(84vw, 80svh, 62rem); scroll-snap-align: center; }
.panel .tilt { perspective: 1100px; }
.panel .shot { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s, translate 0.25s; will-change: transform; }
.panel .shot img { animation: none; }
.panel-txt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 1.6rem; align-items: baseline; margin-top: clamp(1rem, 2.5svh, 1.8rem); }
.panel-txt h3 { font-size: clamp(1.9rem, 4.6svh, 3.4rem); white-space: nowrap; }
.panel-txt h3 a { text-decoration: none; background: linear-gradient(var(--venom), var(--venom)) 0 100% / 0 0.42em no-repeat; transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.panel-txt h3 a:hover { background-size: 100% 0.42em; }
.panel-txt p { margin: 0; font-size: 1rem; line-height: 1.35; color: var(--ink-2); }
.panel-txt em { color: var(--rust); }
@media (max-width: 800px) { .panel-txt { grid-template-columns: 1fr; } }
.panel-end { width: min(70vw, 30rem); align-self: stretch; display: grid; }
.panel-end a { display: grid; align-content: center; gap: 0.6rem; text-decoration: none; background: var(--ink); color: var(--paper); padding: clamp(1.4rem, 4vw, 3rem); border-radius: 4px; box-shadow: 0.55rem 0.55rem 0 var(--venom); transition: translate 0.2s, box-shadow 0.2s; }
.panel-end a:hover { translate: 0.35rem 0.35rem; box-shadow: 0.2rem 0.2rem 0 var(--venom); }
.panel-end b { font-family: var(--display); font-weight: 900; font-stretch: 70%; font-size: clamp(5rem, 22svh, 13rem); line-height: 0.8; color: var(--venom); }
.panel-end span { font-size: clamp(1.1rem, 2.4svh, 1.5rem); line-height: 1.2; max-width: 14em; }
.reel-bar { display: none; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-height: 520px) {
    .reel { height: calc(100svh + var(--n) * 85svh); padding-block: 0; view-timeline: --reel block; }
    .reel-pin { position: sticky; top: 3.6rem; height: calc(100svh - 3.6rem); overflow: clip; display: grid; grid-template-rows: auto 1fr auto; }
    .reel-track { overflow: visible; width: max-content; align-items: center; padding-bottom: 0; animation: reel linear both; animation-timeline: --reel; animation-range: contain 0% contain 100%; will-change: transform; }
    @keyframes reel { to { transform: translateX(calc(-100% + 100vw)); } }
    .reel-bar { display: block; height: 4px; background: var(--rule); margin: 0 var(--gutter) clamp(0.8rem, 2.5svh, 1.6rem); }
    .reel-bar i { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; animation: grow linear both; animation-timeline: --reel; animation-range: contain 0% contain 100%; }
    .panel { width: min(84vw, 84svh, 62rem); }
    .panel-end { align-self: center; height: min(60svh, 30rem); }
  }
}

/* ---------- numbers that count up as they scroll in: an animated CSS counter, no JavaScript ---------- */
@property --num { syntax: '<integer>'; inherits: false; initial-value: 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .count b { counter-reset: num var(--num); animation: count linear both; animation-timeline: view(); animation-range: entry 20% cover 42%; }
    .count b i { display: none; }
    .count b::after { content: counter(num); }
    @keyframes count { from { --num: 0; } to { --num: var(--to); } }
  }
}
.numbers b i { font-style: normal; }

/* ---------- capabilities: exclusive details elements, height animated to auto ---------- */
.accs { border-top: 1px solid var(--ink); }
.acc { border-bottom: 1px solid var(--ink); }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1rem, 2.4vw, 1.8rem) 0.5rem; position: relative; isolation: isolate; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::before { content: ''; position: absolute; inset: 0; background: var(--venom); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); z-index: -1; }
.acc summary:hover::before, .acc[open] summary::before { transform: scaleX(1); }
.acc summary:hover, .acc[open] summary { color: var(--venom-ink); }
.acc summary h3 { font-size: clamp(1.7rem, 5vw, 4.4rem); font-stretch: 62%; transition: font-stretch 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), translate 0.4s; }
.acc summary:hover h3, .acc[open] summary h3 { font-stretch: 100%; translate: 0.6rem 0; }
.plus { flex: none; width: clamp(1.4rem, 3vw, 2.4rem); aspect-ratio: 1; position: relative; transition: rotate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); margin-right: 0.6rem; }
.plus::before, .plus::after { content: ''; position: absolute; background: currentColor; inset: calc(50% - 1.5px) 0; }
.plus::after { rotate: 90deg; }
.acc[open] .plus { rotate: 135deg; }
.acc::details-content { height: 0; overflow: clip; transition: height 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), content-visibility 0.5s allow-discrete; }
.acc[open]::details-content { height: auto; }
.acc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 5vw, 5rem); padding: clamp(1.2rem, 3vw, 2.4rem) 0.5rem clamp(1.6rem, 4vw, 3rem); }
.acc-body p { color: var(--ink-2); max-width: 34em; }
.acc-body p:first-child { color: var(--ink); font-size: 1.12em; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-content: start; }
.thumbs a { display: block; text-decoration: none; }
.thumbs img, .thumbs .noshot { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid var(--ink); border-radius: 3px; box-shadow: 0.3rem 0.3rem 0 var(--ink); transition: translate 0.2s, box-shadow 0.2s; }
.thumbs .noshot { display: grid; place-items: center; text-align: center; padding: 0.5rem; background: var(--paper-2); font-style: italic; color: var(--ink-2); font-size: 0.9rem; }
.thumbs a:hover img, .thumbs a:hover .noshot { translate: 0.2rem 0.2rem; box-shadow: 0.1rem 0.1rem 0 var(--rust); }
.thumbs b { display: block; margin-top: 0.7rem; font-family: var(--display); font-stretch: 85%; font-size: 0.98rem; line-height: 1.1; }
@media (max-width: 800px) { .acc-body { grid-template-columns: 1fr; } }

/* ---------- graph ---------- */
.graph { --ink-c: var(--ink); --soft-c: var(--ink-2); --paper-c: var(--paper); position: relative; height: clamp(26rem, 78svh, 46rem); border: 1px solid var(--ink); border-radius: 4px; background: var(--paper-2); overflow: clip; }
.graph canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.graph-tip { position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.7rem; margin: 0; font-size: 0.92rem; line-height: 1.3; color: var(--ink); pointer-events: none; max-width: 60em; text-shadow: 0 0 6px var(--paper-2), 0 0 6px var(--paper-2); }
.aslist { margin-top: 1.2rem; }
.aslist summary { cursor: pointer; font-style: italic; color: var(--ink-2); width: max-content; margin-bottom: 1rem; }

/* reel fixes: keep the pinned column at page width, and fit short screens */
.reel-pin { grid-template-columns: minmax(0, 1fr); }
.reel-head h2 { font-size: clamp(1.8rem, 4vw, 3.6rem); }
.reel-head { padding-block: clamp(0.8rem, 2.4svh, 1.8rem); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-height: 520px) {
    .panel { width: min(84vw, 74svh, 62rem); }
  }
}
