/* WEĦDA — wehda.llc
   A calm, gallery-like page built around one object: the ١ stroke,
   standing on the horizon. Everything else is drawn in 1px plan lines. */

@font-face {
  font-family: "Commissioner";
  src: url("../fonts/commissioner-wehda.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/amiri-wehda.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* Only the glyphs shipped in the subset: ة ح د و ١ (see README). */
  unicode-range: U+0629, U+062D, U+062F, U+0648, U+0661;
}

/* Palette --------------------------------------------------------------
   Chalk      #EDF0EE  the wall, the page
   Limestone  #DCE2DF  the floor, quiet bands
   Basalt     #1B2327  ink, plan lines, the plinth the page ends on
   Slate      #4A565D  secondary text
   Lapis      #2A3D9A  the mark and the one action (ultramarine, the
                       pigment of illuminated manuscripts)
   Lapis pale #A9B8F2  lapis on basalt
   --------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  --bg: #EDF0EE;
  --wall-top: #E6EBE9;
  --spot: #F8F9F8;
  --floor: #DCE2DF;
  --floor-end: #E2E7E5;
  --surface: #DCE2DF;
  --ink: #1B2327;
  --ink-soft: #2C373B;
  --muted: #4A565D;
  --faint: #6C787E;
  --line: rgb(27 35 39 / 0.18);
  --shadow: 27 35 39;
  --mark: #2A3D9A;
  --focus: #2A3D9A;
  --plate-bg: var(--bg);

  --plinth: #1B2327;
  --plinth-ink: #EDF0EE;
  --plinth-muted: #C2CBC9;
  --plinth-line: rgb(237 240 238 / 0.14);
  --plinth-accent: #A9B8F2;
  --button-bg: #2A3D9A;
  --button-ink: #FFFFFF;
  --button-edge: rgb(169 184 242 / 0.45);
  --button-hover-bg: #EDF0EE;
  --button-hover-ink: #1B2327;

  --font: "Commissioner", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", "Arabic Typesetting", serif;

  /* Type scale: 18 / 22 / 28 / 36 / ~52 / ~76 */
  --t-0: 1.125rem;
  --t-1: 1.375rem;
  --t-2: clamp(1.5rem, 1.3rem + 0.6vw, 1.75rem);
  --t-2b: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  --t-3: clamp(2rem, 1.35rem + 2.3vw, 3.25rem);
  --t-4: clamp(2.125rem, 1.05rem + 4.1vw, 4.75rem);

  --gutter: clamp(20px, 5vw, 56px);
  --side: max(var(--gutter), calc((100% - 1240px) / 2));
  --section: clamp(96px, 11vw, 168px);
  --header-h: 5.5rem;  /* 88px; in rem so it grows with enlarged text */
  --floor-h: 236px;
}

/* Night: the same room with the lights lowered. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D2629;
    --wall-top: #182023;
    --spot: #263136;
    --floor: #141B1D;
    --floor-end: #171E21;
    --surface: #222C30;
    --ink: #E6EBE9;
    --ink-soft: #D3DAD8;
    --muted: #A9B4B8;
    --faint: #7F8C91;
    --line: rgb(230 235 233 / 0.16);
    --shadow: 0 0 0;
    --mark: #546DD8;
    --focus: #A9B8F2;

    --plinth: #12181A;
    --plinth-muted: #B5BFBD;
    --button-bg: #3D54BE;
    --button-ink: #FFFFFF;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-0);
  font-weight: 400;
  font-variation-settings: "FLAR" 24;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }

h1, h2, h3, dt {
  font-weight: 300;
  font-variation-settings: "FLAR" 100;
  text-wrap: balance;
}

p, li, dd, figcaption { text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: text-decoration-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  border-radius: 2px;
}
main:focus { outline: none; }

[lang="ar"] {
  font-family: var(--font-arabic);
  font-variation-settings: normal;
}

.nw { white-space: nowrap; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.wrap {
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--plinth);
  color: var(--plinth-ink);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Header -------------------------------------------------------------- */

.site-header { position: relative; z-index: 2; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

/* Lockup: the mark stands a little taller than the cap height and its
   foot drops below the baseline, as a written ١ does beside Latin caps. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: auto;
  height: 42px;
  aspect-ratio: 38 / 146;
  fill: var(--mark);
}
.brand-word {
  font-size: 1.0625rem;
  font-weight: 540;
  font-variation-settings: "FLAR" 100;
  letter-spacing: 0.2em;
  margin-right: -0.2em;
  line-height: 1;
}

.site-nav ul {
  display: flex;
  /* With very large text, links move to a second row rather than
     breaking inside themselves. */
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px clamp(20px, 2.6vw, 40px);
}
.site-nav a {
  white-space: nowrap;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration-color: transparent;
}
.site-nav a:hover { color: var(--ink); text-decoration-color: currentColor; }
.site-nav .nav-contact a {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: currentColor;
}

/* Hero: a wall, a floor, and one object standing on the line between --- */

.hero {
  overflow-x: clip;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  background:
    radial-gradient(40% 62% at 77% 46%, var(--spot) 0%, color-mix(in srgb, var(--spot) 0%, transparent) 100%),
    linear-gradient(180deg, var(--wall-top) 0%, var(--bg) 55%);
}

.hero-grid {
  --mark-right: clamp(0px, 9vw, 150px);
  display: grid;
  grid-template-columns:
    [full-start] var(--side)
    [text-start] minmax(0, 1fr)
    [text-end] var(--gutter)
    [mark-start] auto
    [mark-end] var(--mark-right) var(--side)
    [full-end];
  grid-template-rows: [wall] minmax(0, 1fr) [lede] auto [action] auto;
  min-height: calc(100svh - var(--header-h));
}

/* The floor: limestone from the horizon down, full bleed. */
.hero-grid::before {
  content: "";
  grid-column: full;
  grid-row: lede / span 2;
  background: linear-gradient(var(--floor), var(--floor-end));
  border-top: 1px solid var(--line);
}

.hero-title {
  grid-column: text;
  grid-row: wall;
  align-self: end;
  position: relative;
  z-index: 1;
  max-width: 12.5em;
  padding-top: clamp(24px, 4vh, 56px);
  font-size: var(--t-4);
  line-height: 1.04;
  letter-spacing: -0.018em;
  /* The last baseline sits exactly on the line where wall meets floor. */
  margin-bottom: -0.115em;
}

.lede {
  grid-column: text;
  grid-row: lede;
  position: relative;
  max-width: 38em;
  padding-top: clamp(28px, 4.5vh, 44px);
  color: var(--ink-soft);
}

.hero-action {
  grid-column: text;
  grid-row: action;
  position: relative;
  padding-block: 24px clamp(32px, 5vh, 52px);
}

.monolith {
  grid-column: mark;
  grid-row: wall;
  align-self: end;
  position: relative;
  z-index: 1;
  height: clamp(240px, calc(100svh - var(--header-h) - var(--floor-h) - 5vh), 820px);
  aspect-ratio: 38 / 146;
  /* The object stands a little forward of the wall, on the floor. */
  margin-bottom: calc(-1 * clamp(18px, 3vh, 34px));
}
.monolith-mark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--mark);
  /* The traced tip ends 2% above the viewBox edge; set it on the ground. */
  transform: translateY(2%);
}
.monolith::after {
  /* Contact shadow on the floor. */
  content: "";
  position: absolute;
  left: 51.7%;
  bottom: -7px;
  width: 190%;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgb(var(--shadow) / 0.26), rgb(var(--shadow) / 0));
}

/* The one orchestrated moment: the stroke is written, top to bottom. */
@media (prefers-reduced-motion: no-preference) {
  .monolith-mark {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 47%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 40%, transparent 47%);
    -webkit-mask-size: 100% 250%;
            mask-size: 100% 250%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: 0 0;
            mask-position: 0 0;
    animation: write-stroke 2s cubic-bezier(0.3, 0.1, 0.2, 1) 0.1s both;
  }
  .monolith::after {
    animation: settle 1.2s ease-out 1.2s both;
  }
}

/* The mask is 2.5 times the mark's height and fades out between 40% and
   47% of it. At 78.3% the fully transparent edge sits on the mark's top
   edge, so the first frame is empty and the next ones start drawing. */
@keyframes write-stroke {
  from { -webkit-mask-position: 0 78.3%; mask-position: 0 78.3%; }
  to   { -webkit-mask-position: 0 0;     mask-position: 0 0; }
}
@keyframes settle {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Buttons ------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 14px 28px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 520;
  text-decoration: none;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--button-edge);
  overflow-wrap: anywhere;
}
.button:hover { background: var(--button-hover-bg); color: var(--button-hover-ink); }

.button--quiet {
  min-height: 48px;
  padding: 10px 22px;
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.button--quiet:hover { background: var(--ink); color: var(--bg); }

/* Sections ------------------------------------------------------------ */

.section { padding-block: var(--section); }

.section-head {
  display: grid;
  gap: 20px;
  max-width: 46rem;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head h2,
.principles h2,
.name h2,
.contact h2 {
  font-size: var(--t-3);
  line-height: 1.1;
  letter-spacing: -0.012em;
}
.section-head p {
  max-width: 36em;
  color: var(--muted);
}

/* Plan drawings: 1px lines, open nodes, basalt only ------------------- */

/* Labels are sized in rem and the drawings in px, so when the visitor
   enlarges text the labels outgrow the drawing. --label-room is 0 at the
   default text size and grows with it, insetting the drawing to leave
   room for labels at its edges. */
.plan {
  --label-room: max(0px, calc((1rem - 16px) * 2));
  position: relative;
  margin-inline: var(--label-room);
}
.plan svg { display: block; width: 100%; height: auto; overflow: visible; }

.plan-edge {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}
.plan-off,
.plan-own {
  fill: none;
  stroke: var(--faint);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.plan-off { stroke-dasharray: 3 4; }
.plan-hub,
.plan-hub rect { fill: var(--ink); }
.plan-ghost {
  fill: var(--plate-bg);
  stroke: var(--faint);
  stroke-width: 1;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}
.plan-ghost-node {
  fill: var(--plate-bg);
  stroke: var(--faint);
  stroke-width: 1.25;
  stroke-dasharray: 2.5 2.5;
  vector-effect: non-scaling-stroke;
}
.plan-node circle,
.plan-node rect,
.plan-node path {
  fill: var(--plate-bg);
  stroke: var(--ink);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.plan-node--small circle { stroke-width: 1.25; }
.plan-tip {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plan-label {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding-inline: 3px;
  background: var(--plate-bg);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
}
.plan-label--muted { color: var(--muted); }
.at-a  { transform: translate(-50%, calc(-100% - 11px)); }
.at-b  { transform: translate(-50%, 11px); text-align: center; }
.at-r  { transform: translate(12px, -50%); }
.at-l  { transform: translate(calc(-100% - 12px), -50%); }
.at-br { transform: translate(6px, 7px); }

/* Why: one plate, two states ------------------------------------------ */

.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gutter);
  align-items: start;
}
.why-head { margin-bottom: 0; }

.plate { display: grid; gap: 28px; }

/* Wide screens: the argument and its control on the left, the drawing
   filling the right-hand column. */
@media (min-width: 1024px) {
  .plate-plan .plan-label { font-size: 1rem; }
  @supports (grid-template-columns: subgrid) {
    .why-grid { grid-template-rows: auto auto minmax(0, 1fr); row-gap: 0; }
    .why-head { grid-column: 1; grid-row: 1; }
    .plate {
      grid-column: 1 / -1;
      grid-row: 1 / -1;
      grid-template-columns: subgrid;
      grid-template-rows: subgrid;
      gap: 0 var(--gutter);
      pointer-events: none;
    }
    .plate > * { pointer-events: auto; }
    .switch { grid-column: 1; grid-row: 2; margin-top: 56px; }
    .plate-caption { grid-column: 1; grid-row: 3; margin-top: 28px; }
    .plate-plan { grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: end; width: calc(100% - 2 * var(--label-room)); }
  }
}
/* Up to about 1200px the 5:7 split leaves the argument too narrow: give
   both halves the same width. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .why-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
}

.switch {
  display: inline-flex;
  justify-self: start;
  box-shadow: inset 0 0 0 1px var(--ink);
  border-radius: 2px;
}
.switch[hidden] { display: none; }
.switch button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
}
.switch button[aria-checked="true"] { background: var(--ink); color: var(--bg); }
.switch button:hover:not([aria-checked="true"]) { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.plate-plan { max-width: 720px; }

.plate-spokes,
.plate-links,
.plate-hub,
.plate-ghost,
.plate-hub-label,
.plate-ghost-label { transition: opacity 360ms ease; }
.plate[data-state="p2p"] .plate-spokes,
.plate[data-state="p2p"] .plate-hub,
.plate[data-state="p2p"] .plate-hub-label,
.plate[data-state="platform"] .plate-links,
.plate[data-state="platform"] .plate-ghost,
.plate[data-state="platform"] .plate-ghost-label { opacity: 0; }
.plate-ghost-label { color: var(--muted); line-height: 1.2; }

.plate-caption {
  display: grid;
  max-width: 34em;
  color: var(--muted);
}
/* Both captions sit in one cell, the inactive ones invisible, so the
   caption (and everything around it) keeps its height when the state
   changes. Hidden copies are not exposed to assistive technology. */
.plate-caption::before,
.plate-caption::after {
  grid-area: 1 / 1;
  visibility: hidden;
}
.plate-caption::before { content: attr(data-platform); }
.plate-caption::after { content: attr(data-p2p); }
.plate-caption-text { grid-area: 1 / 1; }

/* What we build ------------------------------------------------------- */

.build { background: var(--surface); --plate-bg: var(--surface); }

/* Drawing labels keep their size when the visitor enlarges text, so on a
   narrow screen a label beside a node at the edge can run past it. Clip
   at the screen edge rather than let the whole page scroll sideways. */
.why,
.build { overflow-x: clip; }

.audiences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(48px, 7vw, 120px);
}
.audience-plan { margin-bottom: clamp(36px, 4vw, 56px); max-width: 560px; }
.audience h3 {
  font-size: var(--t-2b);
  line-height: 1.15;
  margin-bottom: 14px;
}
.audience-lead {
  max-width: 24em;
  margin-bottom: 28px;
  font-size: var(--t-1);
  font-weight: 300;
  font-variation-settings: "FLAR" 100;
  line-height: 1.35;
}
.points { display: grid; gap: 16px; max-width: 32em; }
.points li { color: var(--muted); }
.points strong { color: var(--ink); font-weight: 500; }

/* Principles ---------------------------------------------------------- */

.principles-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gutter);
  align-items: start;
}
@media (min-width: 961px) {
  .principles h2 { position: sticky; top: 48px; }
}
.principle-list { display: grid; gap: clamp(36px, 4vw, 52px); }
.principle {
  --term-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
  display: grid;
  /* The term column is never narrower than the longest term ("Private by
     design", about 7.6em) beside its 60px glyph and 20px gap, so every
     term stays on one line; and never wider than half the row. */
  grid-template-columns: minmax(min(50%, calc(80px + 7.8 * var(--term-size))), 4fr) minmax(0, 6fr);
  gap: 10px var(--gutter);
  align-items: center;
}
.principle dt {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: var(--term-size);
  line-height: 1.2;
}
/* Beside the sticky heading the list is too narrow for two columns:
   stack each term over its description. */
@media (min-width: 961px) and (max-width: 1199px) {
  .principle { grid-template-columns: minmax(0, 1fr); }
}
.glyph {
  flex: none;
  width: 60px;
  height: 60px;
  overflow: visible;
}
.principle dd {
  color: var(--muted);
  max-width: 30em;
}

/* The name: two scripts read toward each other ------------------------ */

.name { border-top: 1px solid var(--line); }

.specimen {
  display: flex;
  /* With very large text the two words take a line each. */
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(56px, 7vw, 104px);
  line-height: 1;
}
.specimen-latin {
  font-size: clamp(2.25rem, 0.4rem + 9.4vw, 8.5rem);
  font-weight: 300;
  font-variation-settings: "FLAR" 100;
  letter-spacing: 0.06em;
}
.specimen-arabic {
  margin-left: auto;
  font-size: clamp(2.75rem, 0.5rem + 11.6vw, 10.75rem);
  line-height: 1;
}

.name-body {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gutter);
  align-items: start;
}
.name-text {
  display: grid;
  gap: 18px;
  max-width: 34em;
  line-height: 1.7;
}
/* Arabic inside a Latin line: a touch larger so it matches the Latin
   x-height, without opening up the line box. */
.name-text .ar {
  font-size: 1.16em;
  line-height: 0;
}
.inline-mark {
  display: inline-block;
  width: 0.36em;
  height: 1.38em;
  margin-inline: 0.14em 0.06em;
  vertical-align: -0.3em;
  fill: var(--mark);
}

/* Contact: the plinth the page stands on ------------------------------ */

.contact {
  background: var(--plinth);
  color: var(--plinth-ink);
  --focus: var(--plinth-accent);
}
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--gutter);
  align-items: start;
}
.contact-body { display: grid; gap: 36px; max-width: 34em; }
.contact-body p:first-child { color: var(--plinth-muted); }

.site-footer {
  background: var(--plinth);
  color: var(--plinth-muted);
  font-size: 0.9375rem;
  --focus: var(--plinth-accent);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--plinth-line);
}
/* On the not-found page the footer follows the floor directly: no rule. */
.site-footer--flush .footer-inner { border-top: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-mark { height: 22px; width: auto; aspect-ratio: 38 / 146; fill: var(--plinth-accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* Responsive ---------------------------------------------------------- */

@media (max-width: 1023px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 64px); }
  .plate-plan { max-width: 640px; }
}

@media (max-width: 960px) {
  .principles-grid,
  .name-body,
  .contact-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 760px) {
  :root { --header-h: 6.75rem; }  /* 108px */

  /* Brand and Contact on the first row, the section links on the second. */
  .header-inner {
    flex-wrap: wrap;
    align-content: center;
    gap: 0;
    padding-top: 6px;
  }
  .brand { min-height: 56px; }
  .brand-mark { height: 38px; }
  .brand-word { font-size: 1rem; }
  .site-nav { width: 100%; }
  .site-nav ul { gap: 4px 22px; justify-content: flex-start; padding-bottom: 8px; }
  .site-nav a { display: inline-block; padding-block: 6px; font-size: 0.875rem; }
  .site-nav .nav-contact {
    position: absolute;
    top: 6px;
    right: var(--gutter);
    height: 56px;
    display: flex;
    align-items: center;
  }
  .site-nav .nav-contact a { font-size: 1rem; }

  .audiences { grid-template-columns: minmax(0, 1fr); }
  .principle { grid-template-columns: minmax(0, 1fr); }
  .plan-label { font-size: 0.8125rem; }
}

@media (max-width: 599px) {
  /* Hero: the same composition as on wide screens, scaled down. The
     headline stands on the horizon beside the mark; the lede and the one
     route onward sit on the floor, across the full width. */
  .hero-grid {
    grid-template-columns:
      [full-start] var(--gutter)
      [text-start] minmax(0, 1fr)
      [text-end] 16px
      [mark-start] auto
      [mark-end] clamp(0px, 4vw, 24px) var(--gutter)
      [full-end];
    min-height: 0;
  }
  .hero-title {
    padding-top: 24px;
    font-size: clamp(1.875rem, 1.2rem + 3vw, 2.5rem);
    line-height: 1.06;
  }
  .lede {
    grid-column: text-start / mark-end;
    padding-top: 24px;
    font-size: 1rem;
    line-height: 1.55;
  }
  .hero-action {
    grid-column: text-start / mark-end;
    padding-block: 24px 32px;
  }
  .monolith {
    height: clamp(230px, 34svh, 300px);
    /* Keep the tip clear of the wrapped navigation row. */
    margin-top: 20px;
    margin-bottom: -16px;
  }

  /* The not-found page has nothing below its hero: let it fill the screen,
     with the extra height in the wall the mark stands against. */
  .hero--404 .hero-grid { min-height: calc(100svh - var(--header-h)); }
  .hero--404 .monolith { height: clamp(240px, 52svh, 460px); }
}

/* Narrow screens: the drawings run full width and shrink below their
   viewBox size, so the label offsets shrink with them. The offset is the
   largest node's half-size (8 units of the 480-unit audience drawings)
   at the drawn scale, plus 2px of air. */
@media (max-width: 533px) {
  .plan { --label-off: calc((100vw - 2 * var(--gutter)) / 60 + 2px); }
  .at-a  { transform: translate(-50%, calc(-100% - var(--label-off))); }
  .at-b  { transform: translate(-50%, var(--label-off)); }
  .at-r  { transform: translate(calc(var(--label-off) + 1px), -50%); }
  .at-l  { transform: translate(calc(-100% - var(--label-off) - 1px), -50%); }
  .at-br { transform: translate(3px, 4px); }
}

@media (max-width: 420px) {
  .plan-label { font-size: 0.75rem; }
  .specimen { gap: 12px; }
  .glyph { width: 52px; height: 52px; }
  .principle dt { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
