/* ==========================================================================
   10pow6 — site.css
   Direction: "dossier from a working lab."
   One typographic system: Archivo (display/body) + IBM Plex Mono (data).
   Grey ground, hairline rules, tables over cards, accent = interaction only.
   ========================================================================== */

/* ---- fonts (self-hosted, latin subsets) --------------------------------- */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-var-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-mono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-mono-500-latin.woff2") format("woff2");
}

/* ---- tokens -------------------------------------------------------------- */

:root {
  --ground: #17191c;
  --panel: #1d2024;
  --panel-2: #22262b;
  --ink: #e8eaed;
  --muted: #969ca6;
  --faint: #6b7078;
  --hairline: #2b2f36;
  --accent: #339dea;
  --accent-ink: #0d1117;
  --ok: #79b48d;
  --wip: #c0a468;
  --err: #d08770;
  --light-frame: #e9eaec;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", "SFMono-Regular", Consolas, monospace;

  --w-disp: "wdth" 118;

  --wrap: 1160px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --r: 2px;
}

/* ---- reset / base -------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r);
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

[id] {
  scroll-margin-top: 5.5rem;
}

/* ---- utilities ----------------------------------------------------------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.6rem 1rem;
}

.skip-link:focus {
  left: 0;
}

/* ---- links ---------------------------------------------------------------- */

.tlink {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.15rem;
  transition: color 0.15s, border-color 0.15s;
}

.tlink:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.prose a,
.plink {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.prose a:hover,
.plink:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.85rem 1.4rem;
  border-radius: var(--r);
  border: 1px solid var(--accent);
  transition: filter 0.15s;
}

.btn:hover {
  filter: brightness(1.12);
}

.btn--quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}

.btn--quiet:hover {
  filter: none;
  border-color: var(--muted);
}

/* ---- header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ground);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
}

.brand img {
  width: 26px;
  height: 22px;
  object-fit: contain;
}

.brand-word {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.brand-word sup {
  color: var(--accent);
  font-size: 0.65em;
}

.env-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--wip);
  border: 1px solid var(--wip);
  border-radius: var(--r);
  padding: 0.2rem 0.45rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current] {
  color: var(--ink);
}

.nav-account {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nav-account:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ink);
}

@media (max-width: 840px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .nav-links a {
    display: block;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--hairline);
  }
  .nav-account {
    padding-top: 1rem;
  }
}

/* ---- hero (index) -------------------------------------------------------- */

.hero {
  padding-block: clamp(5rem, 13vh, 8.5rem) clamp(4rem, 9vh, 6rem);
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.hero-mark {
  font-variation-settings: "wdth" 125;
  font-weight: 780;
  font-size: clamp(5rem, 17vw, 12.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
}

.hero-mark sup {
  font-size: 0.42em;
  vertical-align: 1.05em;
  line-height: 0;
  color: var(--accent);
  margin-left: 0.04em;
}

.hero-statement {
  max-width: 36ch;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-variation-settings: "wdth" 106;
  font-weight: 480;
  line-height: 1.45;
  text-wrap: balance;
  margin-top: 2rem;
}

.hero-sub {
  max-width: 58ch;
  color: var(--muted);
  margin-top: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.4rem;
}

/* orchestrated load: hero lines rise once, then the page stays calm */
.js .hero .wrap > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.65s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

.js .hero .wrap > *:nth-child(2) {
  animation-delay: 0.1s;
}
.js .hero .wrap > *:nth-child(3) {
  animation-delay: 0.2s;
}
.js .hero .wrap > *:nth-child(4) {
  animation-delay: 0.3s;
}
.js .hero .wrap > *:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .hero .wrap > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .tlink,
  .row,
  .row-arr,
  .btn,
  .cs-entry,
  .filter-btn {
    transition: none;
  }
}

/* ---- section pattern: side label + body ---------------------------------- */

.sec {
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.sec > .wrap {
  display: grid;
  grid-template-columns: minmax(150px, 3fr) 9fr;
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.sec-label {
  position: sticky;
  top: 5.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.35rem;
}

.sec-label .n {
  color: var(--faint);
  display: block;
  margin-top: 0.35rem;
}

.sec-body > h2 {
  font-variation-settings: var(--w-disp);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 24ch;
}

.sec-body > .sec-intro {
  color: var(--muted);
  max-width: 62ch;
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .sec > .wrap {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .sec-label {
    position: static;
    padding-top: 0;
  }
}

/* ---- about: copy + specimen + systems trio -------------------------------- */

.about-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 230px);
  gap: 2.5rem clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 1.4rem;
}

.about-copy {
  max-width: 60ch;
  color: var(--muted);
}

.about-copy p + p {
  margin-top: 1rem;
}

.about-copy strong {
  color: var(--ink);
  font-weight: 600;
}

.specimen {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--panel);
  padding: 1rem;
}

.specimen figcaption {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.8rem;
}

@media (max-width: 620px) {
  .about-flow {
    grid-template-columns: 1fr;
  }
  .specimen {
    max-width: 240px;
  }
}

.sys-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.sys h3 {
  font-size: 1.05rem;
  font-weight: 650;
  font-variation-settings: "wdth" 108;
}

.sys p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
  max-width: 34ch;
}

.sys .tlink {
  display: inline-block;
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .sys-list {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 0.5rem;
  }
  .sys {
    padding-block: 1.4rem;
  }
  .sys + .sys {
    border-top: 1px solid var(--hairline);
  }
}

/* ---- ecosystem band -------------------------------------------------------- */

.band {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  padding-block: clamp(3rem, 7vw, 4.5rem);
}

.band h2 {
  font-variation-settings: var(--w-disp);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.015em;
  max-width: 28ch;
  text-wrap: balance;
}

.band-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
}

.fact .label {
  display: block;
}

.fact p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36ch;
}

@media (max-width: 700px) {
  .band-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ---- plus-list -------------------------------------------------------------- */

.plus-list {
  list-style: none;
  padding: 0;
  margin-top: 1.6rem;
  max-width: 52ch;
}

.plus-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.8rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted);
}

.plus-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  color: var(--accent);
}

/* ---- team rows ---------------------------------------------------------------- */

.team-rows {
  margin-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

.member-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--hairline);
}

.member-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--hairline);
}

.member-row h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

.member-row .role {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 0.2rem;
}

/* ---- dossier table (index releases) -------------------------------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 1.6rem;
}

.filter-btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--accent);
}

.dossier {
  margin-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 9rem 6.5rem 2.5rem;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.15s;
}

.row:hover {
  background: var(--panel);
}

.row-idx {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* Stack name over description (they're spans); min-width lets long text
   wrap inside the grid column instead of overflowing it. */
.row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.row-name {
  font-size: 1.08rem;
  font-weight: 650;
  font-variation-settings: "wdth" 108;
  line-height: 1.3;
}

.row-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.row-cat {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip {
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 0.22rem 0.5rem;
  color: var(--muted);
  white-space: nowrap;
}

.chip--live {
  color: var(--ok);
  border-color: #3d5747;
}

.chip--dev {
  color: var(--wip);
  border-color: #55492f;
}

.row-arr {
  font-family: var(--mono);
  color: var(--faint);
  justify-self: end;
  transition: transform 0.15s, color 0.15s;
}

.row:hover .row-arr,
.cs-entry:hover .row-arr {
  color: var(--accent);
  transform: translateX(4px);
}

.dossier[data-filter="released"] .row[data-category="future"],
.dossier[data-filter="experiment"] .row:not([data-category="experiment"]),
.dossier[data-filter="app"] .row:not([data-category="app"]),
.dossier[data-filter="game"] .row:not([data-category="game"]),
.dossier[data-filter="future"] .row:not([data-category="future"]) {
  display: none;
}

@media (max-width: 720px) {
  .row {
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "idx name chip"
      "idx meta chip";
    row-gap: 0.2rem;
  }
  .row-idx {
    grid-area: idx;
  }
  .row-main {
    grid-area: name;
  }
  .row-cat {
    grid-area: meta;
  }
  .chip {
    grid-area: chip;
    justify-self: end;
  }
  .row-arr {
    display: none;
  }
}

/* ---- case-study entries (index) --------------------------------------------------- */

.cs-list {
  margin-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

.cs-entry {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 2.5rem;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  padding: 1.5rem 0.5rem;
  border-bottom: 1px solid var(--hairline);
  transition: background-color 0.15s;
}

.cs-entry:hover {
  background: var(--panel);
}

/* Block frame + width/height 100% + object-fit — NOT grid + max-height:100%.
   A grid auto row makes the area height indefinite, so percentage max-height
   is ignored and tall logos clip against overflow:hidden. */
.cs-logo {
  aspect-ratio: 16 / 9;
  background: var(--light-frame);
  border-radius: var(--r);
  border: 1px solid var(--hairline);
  overflow: hidden;
  display: block;
  padding: 0.9rem;
}

.cs-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cs-entry h3 {
  font-size: 1.2rem;
  font-weight: 650;
  font-variation-settings: "wdth" 108;
}

.cs-entry .cs-sub {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.3rem;
  max-width: 52ch;
}

.cs-entry .label {
  display: block;
  margin-bottom: 0.45rem;
}

@media (max-width: 640px) {
  .cs-entry {
    grid-template-columns: 1fr;
  }
  .cs-logo {
    max-width: 260px;
  }
  .cs-entry .row-arr {
    display: none;
  }
}

/* ---- subpage head -------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(3.5rem, 9vh, 5.5rem) clamp(2.5rem, 6vh, 3.5rem);
}

.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--hairline);
}

.crumbs a {
  color: var(--muted);
}

.crumbs a:hover {
  color: var(--accent);
}

.page-head h1 {
  font-variation-settings: var(--w-disp);
  font-weight: 750;
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-top: 1.6rem;
  max-width: 18ch;
}

.page-head .lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 58ch;
  margin-top: 1.2rem;
}

.page-head .hero-actions {
  margin-top: 2rem;
}

/* ---- release dossier layout -------------------------------------------------------------- */

/* Two columns above the fold: what it is (left) + spec table (right).
   Prose comes first in source so mobile stacks it first. */
.release-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(280px, 4fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

@media (max-width: 860px) {
  .release-grid {
    grid-template-columns: 1fr;
  }
}

.spec {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--panel);
  padding: 1.4rem 1.4rem 1.6rem;
  position: sticky;
  top: 5.5rem;
}

.spec h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.spec dl {
  margin-top: 0.6rem;
}

.spec .srow {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--hairline);
}

.spec dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.15rem;
}

.spec dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.spec .chip {
  display: inline-block;
}

@media (max-width: 860px) {
  .spec {
    position: static;
  }
}

/* ---- figures / galleries -------------------------------------------------------------------- */

.fig-frame {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--panel);
}

.fig-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Same fix as .cs-logo: block + 100% box + contain (grid auto rows make
   percentage max-height indefinite and clip the image). */
.fig-frame--contain {
  display: block;
  padding: 1.2rem;
}

.fig-frame--contain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fig-frame--light {
  background: var(--light-frame);
}

a.fig-frame {
  transition: border-color 0.15s;
}

a.fig-frame:hover {
  border-color: var(--muted);
}

.fig figcaption {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 0.7rem;
  line-height: 1.7;
}

.fig figcaption .cap-note {
  display: block;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin-top: 0.15rem;
}

.gallery {
  display: grid;
  gap: 1.75rem;
}

.gallery--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Compact screenshot grid below the release two-column block. */
.shots {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

.shots-n {
  color: var(--faint);
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.shot-grid .fig figcaption {
  font-size: 0.6rem;
  margin-top: 0.5rem;
}

/* ---- prose ------------------------------------------------------------------------------------ */

/* Legal / doc pages: one centered reading column. The heading, TOC and prose
   all share a single text-measure container so there is no empty band beside
   the ~65ch content (which otherwise reads as a broken second column). */
main.legal-doc {
  --wrap: 70ch;
}

.prose {
  max-width: 65ch;
}

.prose h2 {
  font-variation-settings: var(--w-disp);
  font-weight: 680;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose p {
  color: var(--muted);
  margin-top: 1rem;
}

.prose > p:first-of-type {
  color: var(--ink);
}

.prose ul,
.prose ol {
  color: var(--muted);
  margin-top: 1rem;
  padding-left: 1.3rem;
}

.prose li {
  margin-top: 0.35rem;
}

.prose li::marker {
  color: var(--faint);
}

.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.4rem;
  margin-top: 1.4rem;
  font-variation-settings: "wdth" 106;
  font-size: 1.15rem;
  color: var(--ink);
}

.prose blockquote p {
  color: inherit;
  margin: 0;
}

/* ---- tags --------------------------------------------------------------------------------------- */

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  padding: 0.3rem 0.6rem;
}

/* ---- numbered steps (a real sequence) -------------------------------------------------------------- */

.steps {
  list-style: none;
  padding: 0;
  margin-top: 1.6rem;
  border-top: 1px solid var(--hairline);
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.steps h3 {
  font-size: 1.1rem;
  font-weight: 650;
}

.steps p {
  color: var(--muted);
  margin-top: 0.4rem;
  max-width: 60ch;
}

/* ---- definition rows (capabilities / services) -------------------------------------------------------- */

.def-rows {
  margin-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

.def-row {
  display: grid;
  grid-template-columns: minmax(150px, 16rem) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--hairline);
}

.def-row h3 {
  font-size: 1.05rem;
  font-weight: 650;
  font-variation-settings: "wdth" 108;
}

.def-row p {
  color: var(--muted);
  max-width: 58ch;
}

@media (max-width: 640px) {
  .def-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ---- table of contents ------------------------------------------------------------------------------------ */

.toc {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--panel);
  padding: 1.3rem 1.5rem;
  margin-bottom: 2.5rem;
  max-width: 65ch;
}

.toc h2 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2.5rem;
  font-size: 0.9rem;
}

.toc li {
  margin-top: 0.3rem;
  break-inside: avoid;
}

.toc li::marker {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.toc a {
  color: var(--muted);
}

.toc a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
}

/* ---- forms ---------------------------------------------------------------------------------------------------- */

.form-panel {
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  background: var(--panel);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 720px;
}

.form-panel fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.form-row {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.form-row:first-child {
  margin-top: 0;
}

.form-row--2 {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 560px) {
  .form-row--2 {
    grid-template-columns: 1fr;
  }
}

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background: var(--ground);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s;
}

.form-control::placeholder {
  color: var(--faint);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

.form-actions {
  margin-top: 1.5rem;
}

.form-status {
  font-family: var(--mono);
  font-size: 0.8rem;
  margin-top: 1rem;
  color: var(--muted);
  min-height: 1.2em;
}

.form-status[data-state="ok"] {
  color: var(--ok);
}

.form-status[data-state="error"] {
  color: var(--err);
}

.contact-alt {
  color: var(--muted);
  margin-top: 1.75rem;
}

/* ---- footer ------------------------------------------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 2.5rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34ch;
  margin-top: 0.9rem;
}

.footer-col h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
}

.footer-col li {
  margin-top: 0.45rem;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--hairline);
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--muted);
}

.footer-social a:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
