/* ------------------------------------------------------------------
   Physare style.css
   Black / acid yellow / white. Helvetica Neue. Hairlines. No cards.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeue-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeue-Roman.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Helvetica Neue";
  src: url("/fonts/HelveticaNeue-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, 0.62);
  --fg-3: rgba(255, 255, 255, 0.38);
  --rule: rgba(255, 255, 255, 0.16);
  --acid: #f0f870;
  --acid-dim: rgba(240, 248, 112, 0.55);

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --label-col: 180px;
  --nav-h: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  scrollbar-color: rgba(255, 255, 255, 0.28) #000;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--acid); color: #000; }

a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 300; }
em, cite { font-style: normal; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: rgba(240, 248, 112, 0.2); }

/* ---------- type scale ---------- */

.display {
  font-weight: 300;
  font-size: clamp(2.6rem, 7.2vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.display span { display: block; }
.display-small {
  font-size: clamp(2.2rem, 5.2vw, 4.75rem);
  letter-spacing: -0.025em;
}

.statement {
  font-weight: 300;
  font-size: clamp(1.8rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 20ch;
  text-wrap: balance;
}
.statement em { color: var(--acid); }

.lede {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.45;
  color: var(--fg-2);
  max-width: 44ch;
}

/* running text never ends on a single stranded word */
.lede, .step-text, .module-text, .sc-note-t, .inquiry-title, .inquiry-status { text-wrap: pretty; }

.eyebrow,
.section-label,
.row-index,
.step-meta,
.hud,
.footer-meta,
.button,
.empty-label {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.prose p {
  color: var(--fg-2);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 44ch;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px 48px;
}

.footnote {
  color: var(--fg-3);
  font-size: 0.8rem;
  line-height: 1.5;
  max-width: 60ch;
}
.footnote em { color: var(--fg-2); }

/* ---------- links & buttons ---------- */

.arrow { display: inline-block; transition: transform 0.25s var(--ease); }

.textlink {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4em;
  font-size: 0.95rem;
  color: var(--fg);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.textlink:hover { border-color: var(--acid); }
.textlink:hover .arrow { transform: translateX(3px); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  padding: 0.95em 1.4em;
  border: 1px solid var(--acid);
  color: var(--acid);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.button:hover { background: var(--acid); color: #000; }
.button:hover .arrow { transform: translateX(3px); }
.button-small { padding: 0.7em 1em; }
.button-large { padding: 1.15em 1.8em; font-size: 0.8rem; }

:focus-visible {
  outline: 1px solid var(--acid);
  outline-offset: 3px;
}

/* first stop for the keyboard: hidden until focused */
.skip-link {
  position: absolute;
  top: 8px;
  left: var(--gutter);
  z-index: 20;
  padding: 10px 14px;
  background: var(--acid);
  color: #000;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav > .button { justify-self: end; }

.wordmark {
  font-weight: 300;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  font-size: 0.88rem;
  color: var(--fg-2);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="true"] { color: var(--fg); }
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }

@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
}

/* phones: a plain details element, so the menu also works on pages with no script */
.nav-menu { display: none; }
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto auto; column-gap: 14px; }
  .nav-menu { display: block; }
}
.nav-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { color: var(--acid); }
.nav-menu-links {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0 var(--gutter);
  background: #000;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.nav-menu-links a {
  display: block;
  padding: 13px 0;
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
  border-top: 1px solid var(--rule);
  transition: color 0.2s;
}
.nav-menu-links a:first-child { border-top: 0; }
.nav-menu-links a:hover { color: var(--acid); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  padding: clamp(96px, 14vh, 160px) var(--gutter) clamp(56px, 8vh, 96px);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-canvas.is-live { opacity: 1; }
/* no WebGL2: a still of the same organism. Anchored left bottom so the clear patch
   in the image stays under the copy at every crop, as the live organism's does */
.no-gl .hero { background: #000 url("/assets/physarum-still.webp") left bottom / cover no-repeat; }
/* 1.3x on wide screens: at plain cover the patch is too small for the copy on short laptops */
@media (min-width: 761px) {
  .no-gl .hero { background-size: max(100%, calc((100svh - var(--nav-h)) * 2.46)) auto; }
}
.no-gl .hero-canvas, .no-gl .hero-hud { display: none; }
@media (prefers-reduced-motion: reduce) { .hero-canvas { transition: none; } }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,.4) 0%, rgba(0,0,0,0) 26%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 900px;
  display: grid;
  gap: 28px;
}
.hero-copy > * { width: fit-content; max-width: 100%; }
.hero-copy .lede { margin-top: 4px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px min(32px, 9vw);   /* narrows under 356px so the note link holds the row at 320 */
  margin-top: 8px;
}

/* readouts: real values from the simulation, never decoration */
.hero-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hud {
  position: absolute;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  /* black slips, so a readout stays legible when a vein grows under it */
  background: #000;
  padding: 3px 7px;
  margin: -3px -7px;
}
.hud-tl { top: 24px; left: var(--gutter); }
.hud-tr { top: 24px; right: var(--gutter); }
.hud-br {
  right: var(--gutter);
  bottom: clamp(56px, 8vh, 96px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(240, 248, 112, 0.8);
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--acid);
}
@media (max-width: 760px) {
  .hero-hud { display: none; }
  /* the copy is tall here, so it starts low enough to leave the organism a clear band */
  .hero { padding-top: max(96px, 40svh); }
}

/* ---------- sections ---------- */

/* The label is a ruled header row, not a sticky gutter, so content gets the full
   width. Inside, .section-body is a 12-column grid: everything spans it by default,
   and a few sections pair their statement with supporting text (below). */
.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vh, 44px);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vh, 88px) var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg-2);
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.section-label .index { color: var(--acid); order: 2; }

.section-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(28px, 4vh, 48px) clamp(20px, 3vw, 48px);
  align-content: start;
}
.section-body > * { grid-column: 1 / -1; }

/* statement on the left, its supporting text beside it */
@media (min-width: 1000px) {
  .section-book .section-body > .display { grid-column: 1 / 8; grid-row: 1; }
  .section-book .section-body > .lede { grid-column: 8 / -1; grid-row: 1; align-self: end; }
  .section-book .section-body > .button { grid-column: 8 / -1; grid-row: 2; }
  .section-book .section-body > .book-note { grid-column: 8 / -1; grid-row: 3; }
}

@media (max-width: 760px) {
  .section { gap: 24px; }
  .section-body { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- rows (what I do): three columns ---------- */

.rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
}
.row {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.row-index { color: var(--acid); }
.row-title {
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.row-text {
  color: var(--fg-2);
  line-height: 1.6;
  max-width: 44ch;
}
@media (max-width: 899.98px) {
  .rows { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.pull {
  font-weight: 300;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 34ch;
  padding-left: 20px;
  border-left: 1px solid var(--acid);
}

/* ---------- process: four steps side by side ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px clamp(20px, 2.5vw, 40px);
}
.step {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.step:first-child { border-top-color: var(--acid); }
.step-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.step-num {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--acid);
}
.step-meta { color: rgba(255, 255, 255, 0.55); }
.step-name {
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.step-text { color: var(--fg-2); line-height: 1.6; }
/* four columns from 1200px; at 1100 they were 232px wide, about 25 characters a line */
@media (max-width: 1199.98px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599.98px)  { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- module lists on the case and module pages ---------- */

.modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 96px);
  margin-top: -1px;
}
.module {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.module-index {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--acid);
  padding-top: 0.4em;
}
.module-name {
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.module-text {
  grid-column: 2;
  color: var(--fg-2);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 40ch;
}
/* narrower screens: the list becomes a vertical vein with a diamond node per module.
   899.98px, not 899px, so zoomed or scaled windows between 899 and 900 still match */
@media (max-width: 899.98px) {
  .modules { grid-template-columns: 1fr; margin-top: 8px; }
  .module {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 0 18px 30px;
    border-bottom: 0;
  }
  .module-index { display: none; }
  .module-text { grid-column: 1; }
  .module::before {
    content: "";
    position: absolute;
    left: 4px; top: 32px; bottom: -20px;
    width: 1px;
    background: rgba(240, 248, 112, 0.4);
  }
  .module:last-child::before { display: none; }
  .module::after {
    content: "";
    position: absolute;
    left: 0; top: 22px;
    width: 8px; height: 8px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.95);
    transform: rotate(45deg);
  }
}

/* ---------- work: a contact sheet of real screens ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.work { border-bottom: 1px solid var(--rule); }
.work-head {
  display: grid;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vh, 88px) var(--gutter) clamp(20px, 3vh, 32px);
}
.work-head .statement { max-width: 16ch; }
/* 1180px, not 1000px: narrower than this the chips no longer fit one row beside the statement,
   once a classic scrollbar has taken its share of the window */
@media (min-width: 1180px) {
  .work-head { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: baseline; column-gap: clamp(20px, 3vw, 48px); }
  .work-filter { justify-content: flex-end; }
}
.work-filter { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.work-chip {
  min-height: 44px;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.work-chip-n { color: rgba(255, 255, 255, 0.55); font-variant-numeric: tabular-nums; margin-left: 2px; }
.work-chip:hover { color: var(--fg); }
.work-chip[aria-pressed="true"] { color: var(--acid); border-bottom-color: var(--acid); }
.work-chip[aria-pressed="true"] .work-chip-n { color: inherit; }

.wall {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  /* rows follow the column width, so a tile with equal spans is 16:10 like the screens, at any width */
  grid-auto-rows: calc(5.208vw - 1.7px);
  grid-auto-flow: dense;
  gap: 2px;
}
.tile {
  position: relative;
  display: block;
  grid-column: span var(--c, 6);
  grid-row: span var(--r, 4);
  overflow: hidden;
  background: #101010;
}
.tile[hidden] { display: none; }
.wall.is-filtered .tile { grid-column: span 6; grid-row: span 6; }
.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, left top);
  transition: transform 0.7s var(--ease);
}
a.tile:hover img { transform: scale(1.018); }
@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
  a.tile:hover img { transform: none; }
}
/* the same black slip as the hero's readouts */
.tile-slip {
  position: absolute;
  left: 0; bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  max-width: 100%;
  padding: 8px 12px 7px;
  background: #000;
  transition: background 0.2s, color 0.2s;
}
.tile-name { font-size: 0.95rem; letter-spacing: -0.005em; line-height: 1.25; }
.tile-for {
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.25;
  transition: color 0.2s;
}
a.tile:hover .tile-slip,
a.tile:focus-visible .tile-slip { background: var(--acid); color: #000; }
a.tile:hover .tile-for,
a.tile:focus-visible .tile-for { color: rgba(0, 0, 0, 0.72); }
a.tile:focus-visible { outline-offset: -3px; }
@media (max-width: 759.98px) {
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .tile, .wall.is-filtered .tile { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 10; }
}
/* large phones and small tablets: two to a row, so the wall does not run for pages */
@media (min-width: 560px) and (max-width: 759.98px) {
  .tile, .wall.is-filtered .tile { grid-column: span 1; }
}

.work-note {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gutter) 16px;
  color: var(--fg-2);
  font-size: 0.9rem;
}

/* ---------- book ---------- */

.section-book .section-body { gap: 28px; }
.section-book .button-large { justify-self: start; margin-top: 12px; }
.section-book .book-note { justify-self: start; }

.book-split { display: grid; gap: clamp(40px, 6vh, 56px); }
.book-demo { display: grid; gap: 28px; align-content: start; justify-items: start; }
@media (min-width: 1000px) {
  .book-split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 48px); }
  .book-demo { grid-column: 1 / 7; }
  .inquiry { grid-column: 8 / -1; }
}

.inquiry { display: grid; gap: 22px; align-content: start; justify-items: start; scroll-margin-top: 24px; }
.inquiry-title {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.inquiry-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  width: 100%;
}
.inquiry-fields[hidden], .inquiry .button[hidden] { display: none; }
.field { display: grid; gap: 4px; }
.field > span {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--fg-2);
  transition: color 0.2s;
}
.field:focus-within > span { color: var(--acid); }
.field-wide { grid-column: 1 / -1; }
.field input,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--fg);
  caret-color: var(--acid);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.field:hover input,
.field:hover textarea { border-bottom-color: var(--fg); }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--acid); }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--fg);
  box-shadow: inset 0 0 0 100px #000;
}
/* the field people never see: a form that fills it is not a person */
.inquiry-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* no fill while sending, and none left behind by a tap: this button stays on the page */
.inquiry .button:disabled { background: none; color: var(--acid); opacity: 0.55; cursor: default; }
.inquiry .button:disabled .arrow { transform: none; }
@media (hover: none) {
  .inquiry .button:hover { background: none; color: var(--acid); }
  .inquiry .button:hover .arrow { transform: none; }
}
.inquiry-status { color: var(--fg-2); scroll-margin-bottom: 20px; }
.inquiry-status.is-alert { color: var(--fg); }
.inquiry-title:focus { outline: none; }
/* out of the flow, not display: none, so a screen reader already knows the live region */
.inquiry-status:empty { position: absolute; }
@media (max-width: 760px) {
  .field input { min-height: 44px; }
}
@media (max-width: 559.98px) {
  .inquiry-fields { grid-template-columns: minmax(0, 1fr); }
}
/* the title needs two lines here: this width breaks it between its two sentences */
@media (max-width: 374.98px) {
  .inquiry-title { max-width: 11em; }
}

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

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--rule);
}
.footer-meta { color: rgba(255, 255, 255, 0.55); }

/* ---------- links into the case-study and module pages ---------- */

.module-name a,
.project-title a,
.row-title a,
.section-label a {
  color: inherit;
  transition: color 0.2s;
}
.module-name a:hover,
.project-title a:hover,
.row-title a:hover,
.section-label a:hover { color: var(--acid); }

/* back links in section labels read as links, like every other text link */
.section-label a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.section-label a:hover { border-color: var(--acid); }

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

/* ---------- case-study and module pages (generated by tools/build-pages.mjs) ---------- */

.page-head {
  padding-top: clamp(72px, 12vh, 140px);
}
.page-head .section-body { gap: 24px; align-items: end; }
.page-head .display { max-width: 18ch; }
.page-intro { display: grid; gap: 18px; justify-items: start; }
/* the title and its introduction share the row, so the page opens full width */
@media (min-width: 1000px) {
  .page-head .page-title { grid-column: 1 / 8; }
  .page-head .page-intro { grid-column: 8 / -1; }
}
.wall-case { border-bottom: 1px solid var(--rule); }
.wall-case figure { margin: 0; }
.page-logo {
  display: block;
  width: 200px;
  height: auto;
  margin-bottom: 24px;
}
/* three short points, each on the same diamond marker as the network */
.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.points li {
  position: relative;
  padding-left: 24px;
  font-size: 1.05rem;
  line-height: 1.4;
}
.points li::before {
  content: "";
  position: absolute;
  left: 1px; top: 0.45em;
  width: 7px; height: 7px;
  border: 1px solid #fff;
  background: #000;
  transform: rotate(45deg);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 8px;
}

/* ---------- GnomeWork showcase ---------- */

.sc-head { display: grid; gap: 14px; }
@media (min-width: 1000px) {
  .sc-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 48px); }
  .sc-head > .statement { grid-column: 1 / 8; }
  .sc-head > .sc-credit { grid-column: 8 / -1; align-self: end; }
}
.sc-credit { color: rgba(255, 255, 255, 0.55); font-size: 0.9rem; }
.sc-credit a { color: var(--fg); border-bottom: 1px solid var(--rule); transition: border-color 0.2s; }
.sc-credit a:hover { border-color: var(--acid); }

.sc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  border-bottom: 1px solid var(--rule);
}
.sc-tab {
  position: relative;
  padding: 0 0 14px;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s;
}
.sc-tab::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
/* invisible hit area so each tab is at least 44px tall to a thumb */
.sc-tab::before { content: ""; position: absolute; left: -4px; right: -4px; top: -13px; bottom: 0; }
.sc-tab:hover { color: var(--fg); }
.sc-tab[aria-selected="true"] { color: var(--fg); }
.sc-tab[aria-selected="true"]::after { transform: scaleX(1); }

/* the showcase breaks out of the label column and takes the full content width */
.sc {
  grid-column: 1 / -1;
  display: grid;
  gap: 36px;
  margin-top: 8px;
}

/* the product, framed like a technical drawing */
.sc-frame {
  position: relative;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f3efe7;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.65),
    0 0 140px rgba(240, 248, 112, 0.07);
}
.sc-frame::before,
.sc-frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 0 solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.sc-frame::before { top: -9px; left: -9px; border-top-width: 1px; border-left-width: 1px; }
.sc-frame::after { bottom: -9px; right: -9px; border-bottom-width: 1px; border-right-width: 1px; }
.sc-img { display: block; width: 100%; height: auto; }

.sc-marks { position: absolute; inset: 0; pointer-events: none; }
.sc-mark {
  position: absolute;
  width: 0; height: 0;
  transition: opacity 0.25s;
}
.sc-mark::before {
  content: "";
  position: absolute;
  left: -7px; top: -7px;
  width: 14px; height: 14px;
  background: #000;
  border: 1px solid var(--acid);
  transform: rotate(45deg);
  transition: background 0.2s, transform 0.3s var(--ease);
}
.sc-mark::after {
  content: "";
  position: absolute;
  left: -16px; top: -16px;
  width: 32px; height: 32px;
  border: 1px solid rgba(240, 248, 112, 0.7);
  border-radius: 50%;
  animation: sc-ping 2.6s var(--ease) infinite;
}
/* the number sits to the left of its marker, clear of the panel it labels */
.sc-mark-n {
  position: absolute;
  right: 14px; top: -9px;
  padding: 3px 6px 2px;
  background: #000;
  color: var(--acid);
  font-weight: 500;
  font-size: 0.6875rem;   /* 11px, the type minimum */
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.sc-mark.is-on::before { background: var(--acid); transform: rotate(45deg) scale(1.3); }
.sc-mark.is-off::before { opacity: 0.45; }
.sc-mark.is-off::after,
.sc-mark.is-off .sc-mark-n { opacity: 0; }
@keyframes sc-ping {
  0%   { transform: scale(0.45); opacity: 0.9; }
  100% { transform: scale(1.6);  opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-mark::after { animation: none; opacity: 0.5; }
}

.sc-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 32px;
  border-top: 1px solid var(--rule);
}
.sc-note {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  cursor: default;
  outline: none;
}
.sc-note-n {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--acid);
  padding-top: 0.3em;
  font-variant-numeric: tabular-nums;
}
.sc-note-t { color: var(--fg-2); line-height: 1.45; transition: color 0.2s; }
.sc-note.is-on .sc-note-t,
.sc-note:focus-visible .sc-note-t { color: var(--fg); }
.sc-note:focus-visible { box-shadow: inset 0 -1px 0 var(--acid); }

@media (max-width: 1099.98px) {
  .sc-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sc-legend { grid-template-columns: minmax(0, 1fr); }
  .sc-tabs { justify-content: space-between; column-gap: 8px; }   /* 8px holds all four on one row at 360 */
  .sc-mark-n { padding: 2px 4px 1px; right: 10px; top: -9px; }
  .sc-mark::before { left: -5px; top: -5px; width: 10px; height: 10px; }
  .sc-mark::after { left: -11px; top: -11px; width: 22px; height: 22px; }
  .sc-credit, .module-text, .work-note { font-size: 1rem; }

  /* invisible hit areas so links are at least 44px to a thumb, with no visual change */
  .button, .textlink, a.wordmark, .module-name a, .work-chip, .section-label a, .row-title a { position: relative; }
  .button::before, .textlink::before, a.wordmark::before, .module-name a::before, .work-chip::before, .section-label a::before, .row-title a::before {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: max(100%, 44px); height: max(100%, 44px);
    transform: translate(-50%, -50%);
  }
}
