@import url("tokens.css");

/* Building Teams with Erich — site styles.
   Every component below is a direct translation of a component in the design system project
   (the .jsx files under components). Keep them in step: if a component changes there, change
   it here too. */

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

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

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-heading);
  margin: 0;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

a:hover { text-decoration-color: var(--ink); }

img { max-width: 100%; }

::selection { background: var(--marker-wash); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-utility);
  font-size: var(--t-small);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus { top: var(--s-3); }

/* ------------------------------------------------------- SectionBand */

.band {
  padding-block: var(--band-y, var(--s-10));
  padding-inline: var(--s-4);
}

.band__inner {
  max-width: var(--measure-max);
  margin-inline: auto;
  padding-inline: 48px;
}

.band--ink { background: var(--ink); color: var(--paper); }
.band--paper { background: var(--paper); color: var(--slate); }
.band--card { background: var(--card); color: var(--slate); }

.band--hero { --band-y: var(--s-10); }
.band--section { --band-y: var(--s-9); }
.band--page { --band-y: var(--s-8); }
.band--continues { padding-top: 0; }
.band--flush { --band-y: 0; }

/* --------------------------------------------------------- MarkerHeadline */

.headline {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
  /* Deliberately `pretty`, not `balance`. Balancing can pull a single word of a marked phrase
     up onto the previous line, which renders as a stray gold bar under one word. */
  text-wrap: pretty;
}

.headline--hero {
  font-size: var(--t-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--tr-hero);
  font-weight: var(--w-bold);
  --bar: var(--underline-hero);
}

.headline--h1 {
  font-size: var(--t-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--tr-h1);
  font-weight: var(--w-bold);
  --bar: var(--underline-hero);
}

.headline--h2 {
  font-size: var(--t-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--tr-h2);
  font-weight: var(--w-semibold);
  --bar: var(--underline-h2);
}

.headline--h3 {
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--tr-h3);
  font-weight: var(--w-semibold);
  --bar: var(--underline-h3);
}

.headline--h4 {
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
  letter-spacing: var(--tr-h4);
  font-weight: var(--w-semibold);
  --bar: var(--underline-h3);
}

.headline--on-dark { color: var(--paper); }

/* Per-line-box bar, so a mark that wraps gets a bar under each line. */
.mark {
  background-image: linear-gradient(var(--marker), var(--marker));
  background-repeat: no-repeat;
  background-size: 100% var(--bar, 6px);
  background-position: 0 100%;
  padding: 0 4px 2px;
  margin: 0 -4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ------------------------------------------------------------- Eyebrow */

.eyebrow {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  line-height: var(--lh-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: var(--w-medium);
  color: var(--slate-light);
  margin: 0;
}

.eyebrow--accent { color: var(--marker-deep); }
.eyebrow--ink { color: var(--ink); }

/* -------------------------------------------------------------- Button */

.btn {
  font-family: var(--font-display);
  font-size: var(--t-ui);
  line-height: var(--lh-ui);
  font-weight: var(--w-medium);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.btn--sm { padding: 9px 18px; font-size: var(--t-small); }
.btn--lg { padding: 18px 34px; }
.btn--block { display: block; width: 100%; }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--ink-soft); color: var(--paper); text-decoration: none; }

.btn--primary-dark { background: var(--marker); color: var(--ink); }
.btn--primary-dark:hover { background: #EFC64B; color: var(--ink); text-decoration: none; }

.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { color: var(--ink-soft); text-decoration: none; }

.btn--secondary-dark { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn--secondary-dark:hover { color: var(--marker); border-color: var(--marker); text-decoration: none; }

.btn--quiet {
  background: transparent;
  color: var(--ink);
  padding: var(--btn-pad-y) var(--s-1);
  text-decoration: none;
}

.btn--quiet:hover {
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.btn[disabled],
.btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------------------- Card */

.card {
  background: var(--card);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: var(--card-pad);
}

.card--featured { border-top: 4px solid var(--marker); }
.card--tight { padding: var(--s-4); }
.card--roomy { padding: var(--s-6); }

/* ------------------------------------------------------------- Callout */

.callout {
  background: var(--marker-wash);
  border-left: 4px solid var(--marker);
  padding: var(--s-4) var(--s-5);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
}

.callout--quote {
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
}

/* ------------------------------------------------------------- Divider */

.divider {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.divider--on-dark { background: rgba(244, 245, 243, 0.16); }

/* ------------------------------------------------------------ PillarTag */

.pillar-tag {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: var(--w-medium);
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--slate);
  white-space: nowrap;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.pillar-tag:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }

.pillar-tag.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: transparent;
}

/* ------------------------------------------------------------ VideoCard */

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: var(--s-4);
}

.video-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card__thumb-text {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-transform: uppercase;
  max-width: 78%;
}

.video-card__play {
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  display: flex;
  align-items: center;
  color: var(--paper);
  opacity: 0.55;
  transition: opacity var(--dur-fast) var(--ease);
}

/* The play mark sits over a photographic thumbnail, so it needs its own ground. */
.video-card__thumb--photo .video-card__play {
  background: var(--ink);
  padding: var(--s-2);
  border-radius: var(--radius);
}

.video-card__play svg { width: 16px; height: 16px; display: block; }

.video-card:hover .video-card__play { opacity: 1; }

.video-card__pillar {
  margin-top: var(--s-3);
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--slate-light);
}

.video-card__title {
  margin-top: var(--s-2);
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease);
}

.video-card:hover .video-card__title {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.video-card__runtime {
  margin-top: var(--s-2);
  font-family: var(--font-utility);
  font-size: var(--t-small);
  color: var(--slate-light);
}

/* --------------------------------------------------- Wordmark & Monogram */

.wordmark {
  display: inline-block;
  min-width: 140px;
  text-decoration: none;
  --wm-size: 22px;
  --wm-bar: max(3px, calc(var(--wm-size) * 0.1));
}

.wordmark:hover { text-decoration: none; }

.wordmark__main {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  font-size: var(--wm-size);
  line-height: 1.02;
  color: var(--ink);
}

.wordmark__main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--wm-bar));
  height: var(--wm-bar);
  background: var(--marker);
}

.wordmark__sub {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--w-medium);
  font-size: calc(var(--wm-size) * 0.45);
  line-height: 1.3;
  color: var(--ink);
  margin-top: calc(var(--wm-size) * 0.22);
}

.wordmark--on-dark .wordmark__main,
.wordmark--on-dark .wordmark__sub { color: var(--paper); }

.monogram {
  --mg-size: 32px;
  width: var(--mg-size);
  height: var(--mg-size);
  background: var(--ink);
  border-radius: 3px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.monogram span {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  font-size: calc(var(--mg-size) * 0.44);
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-top: calc(var(--mg-size) * -0.05);
}

.monogram::after {
  content: "";
  position: absolute;
  left: calc(var(--mg-size) * 0.22);
  right: calc(var(--mg-size) * 0.22);
  bottom: calc(var(--mg-size) * 0.2);
  height: max(2px, calc(var(--mg-size) * 0.0625));
  background: var(--marker);
}

/* ------------------------------------------------------- header & footer */

.site-header {
  background: var(--paper);
  border-bottom: var(--hairline);
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header__inner {
  max-width: var(--measure-max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.site-nav {
  display: flex;
  gap: var(--s-5);
  align-items: center;
}

.site-nav a {
  font-family: var(--font-display);
  font-size: var(--t-ui);
  font-weight: var(--w-medium);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: var(--s-1);
  display: block;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.site-nav a[aria-current="page"] { text-decoration: none; }

.site-nav__bar {
  height: 2px;
  background: var(--marker);
  margin-top: var(--s-1);
}

.nav-toggle { display: none; }
.nav-toggle svg { width: 22px; height: 22px; display: block; }

.site-footer {
  background: var(--ink);
  padding: var(--s-7) 0 var(--s-6);
}

.site-footer__inner {
  max-width: var(--measure-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
  align-items: flex-start;
}

.site-footer__links {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
}

.site-footer__links a {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-top: var(--s-4);
}

.site-footer__bottom span {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--slate-light);
}

/* ------------------------------------------------------------- layout */

.stack { display: flex; flex-direction: column; }
.stack-2 { gap: var(--s-2); }
.stack-3 { gap: var(--s-3); }
.stack-4 { gap: var(--s-4); }
.stack-5 { gap: var(--s-5); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}

.lead {
  font-family: var(--font-body);
  font-size: var(--t-lead);
  line-height: var(--lh-lead);
  margin: 0;
}

/* Hero copy takes the full content width. Display type at 61px reads fine over a long measure,
   and capping it narrower only forces avoidable line breaks. */
.hero-copy { max-width: 100%; }

/* The tagline is body copy, so it stays near the 62-72 character measure the system asks for. */
.hero-tagline { max-width: 720px; }

.lead--on-dark { color: var(--slate-light); }

.meta {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--slate-light);
}

.mono-link {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.mono-link--accent { color: var(--marker-deep); text-decoration-color: var(--rule); }

.pillar-mark {
  width: 6px;
  height: 6px;
  background: var(--marker);
  display: block;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding-bottom: var(--s-4);
  border-bottom: var(--hairline);
}

.filter-bar__count { margin-left: auto; }

.empty-state {
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  padding: var(--s-6);
  text-align: center;
  color: var(--slate);
  font-family: var(--font-body);
}

.needs-copy {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--marker-deep);
  border: 1px dashed var(--marker-deep);
  background: var(--marker-wash);
  border-radius: var(--radius);
  padding: 3px 6px;
  display: inline-block;
}

/* -------------------------------------------------------- article cards */

.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.article-card:hover { text-decoration: none; }

/* Sits flush to the card edge rather than inset, matching the video card's thumbnail.
   The negative margin cancels the card padding on three sides. */
.article-card__image {
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--s-1);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper);
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card__top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  align-items: baseline;
}

.article-card__title {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
  font-weight: var(--w-semibold);
  color: var(--ink);
  margin: 0;
  transition: color var(--dur-fast) var(--ease);
}

.article-card:hover .article-card__title {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--marker);
  text-underline-offset: 4px;
}

.article-card__standfirst {
  font-family: var(--font-body);
  font-size: var(--t-ui);
  line-height: var(--lh-body);
  color: var(--slate);
  margin: 0;
}

.article-card__foot {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: var(--s-2);
}

.has-video {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------------------------------------------- article */

.article-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, var(--measure-body));
  gap: 64px;
}

.article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
}

.article-toc ol {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
  display: grid;
  gap: 10px;
}

.article-toc a {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: 0.06em;
  color: var(--slate-light);
  text-decoration: none;
  display: block;
}

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

/* The article's own header image. Shown at its natural ratio rather than cropped — it is the
   author's chosen crop already. */
.article-lead-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: var(--hairline);
  margin-bottom: var(--s-6);
}

.pairing {
  border: var(--hairline);
  border-top: 4px solid var(--marker);
  border-radius: var(--radius);
  background: var(--card);
  padding: var(--s-4);
  margin-bottom: var(--s-6);
}

.pairing__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.pairing__frame {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
}

.pairing__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.pairing__note {
  font-family: var(--font-body);
  font-size: var(--t-ui);
  line-height: 1.6;
  color: var(--slate);
  margin: var(--s-3) 0 0;
}

.article-foot {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  flex-wrap: wrap;
}

.article-foot__spacer { margin-left: auto; }

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

.prose {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--slate);
  max-width: var(--measure-body);
}

.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }

.prose p { margin: 0 0 var(--s-4); }

.prose h2 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--tr-h3);
  font-weight: var(--w-semibold);
  color: var(--ink);
  margin: var(--s-7) 0 var(--s-3);
  scroll-margin-top: 120px;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
  font-weight: var(--w-semibold);
  color: var(--ink);
  margin: var(--s-6) 0 var(--s-3);
  scroll-margin-top: 120px;
}

.prose ul,
.prose ol { margin: 0 0 var(--s-4); padding-left: var(--s-4); }

.prose ul { list-style: none; padding-left: var(--s-4); }

.prose ul li {
  position: relative;
  margin-bottom: var(--s-2);
}

/* The system uses a gold square as a bullet rather than an icon. */
.prose ul li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--s-4));
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--marker);
}

.prose ol li { margin-bottom: var(--s-2); }

.prose blockquote {
  margin: var(--s-6) 0;
  background: var(--marker-wash);
  border-left: 4px solid var(--marker);
  padding: var(--s-4) var(--s-5);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  font-size: var(--t-h4);
  line-height: var(--lh-h4);
}

.prose blockquote p { margin: 0; }

.prose img {
  display: block;
  border-radius: var(--radius);
  border: var(--hairline);
  margin: var(--s-5) 0;
}

.prose hr {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: var(--s-7) 0;
}

.prose code {
  font-family: var(--font-utility);
  font-size: 0.88em;
  background: var(--card);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 1px 5px;
}

.prose pre {
  font-family: var(--font-utility);
  font-size: var(--t-small);
  line-height: 1.6;
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-4);
  border-radius: var(--radius);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-ui);
  margin: var(--s-5) 0;
}

.prose th,
.prose td {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  border-bottom: var(--hairline);
}

.prose th {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--slate-light);
  font-weight: var(--w-medium);
}

.prose--on-paper { color: var(--slate); }

/* ------------------------------------------------------------ about */

.about-split {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}

.about-page {
  display: grid;
  grid-template-columns: minmax(0, var(--measure-body)) 320px;
  gap: var(--s-8);
  align-items: start;
}

.portrait {
  width: 100%;
  /* Without this, a height attribute on the img is used verbatim and stretches the photo. */
  height: auto;
  border-radius: var(--radius);
  display: block;
  border: var(--hairline);
}

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

.field { display: flex; flex-direction: column; gap: var(--s-2); }

.field__label {
  font-family: var(--font-utility);
  font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--slate);
  font-weight: var(--w-medium);
}

.input,
.textarea,
.select {
  font-family: var(--font-display);
  font-size: var(--t-ui);
  line-height: var(--lh-ui);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--dur-fast) var(--ease);
}

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--slate-light); }

.input:focus,
.textarea:focus,
.select:focus { border-color: var(--ink); }

.textarea {
  font-family: var(--font-utility);
  font-size: var(--t-small);
  line-height: 1.7;
  resize: vertical;
  min-height: 160px;
}

.field__hint {
  font-family: var(--font-utility);
  font-size: 11px;
  color: var(--slate-light);
  line-height: 1.5;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--t-ui);
  color: var(--ink);
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  margin: 0;
}

/* -------------------------------------------------------- page-load sequence */

@keyframes heroRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes markerDraw {
  from { background-size: 0% var(--bar, 6px); }
  to { background-size: 100% var(--bar, 6px); }
}

[data-hero] { animation: heroRise var(--dur-slow) var(--ease) both; }
[data-hero] .mark { animation: markerDraw var(--dur-base) var(--ease) 200ms both; }

@media (prefers-reduced-motion: reduce) {
  [data-hero],
  [data-hero] .mark { animation: none; }
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1040px) {
  .site-header__inner { padding-inline: var(--s-5); }
  .site-footer__inner { padding-inline: var(--s-5); }
  .band__inner { padding-inline: var(--s-5); }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .article-toc { position: static; }
  .about-page { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .about-page__portrait { order: -1; max-width: 320px; }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .about-split { grid-template-columns: 1fr; gap: var(--s-5); }
  .about-split img { max-width: 280px; }
}

@media (max-width: 720px) {
  :root {
    --t-hero: var(--t-hero-mobile);
    --t-h1: var(--t-h1-mobile);
    --t-h2: var(--t-h2-mobile);
    --t-h3: 25px;
    --gutter: var(--gutter-mobile);
    --card-pad: var(--s-4);
  }

  .band {
    --band-y: var(--section-y-mobile);
    padding-inline: var(--gutter-mobile);
  }

  .band--section,
  .band--page { --band-y: var(--s-7); }

  .band__inner { padding-inline: 0; }

  .site-header__inner,
  .site-footer__inner { padding-inline: var(--gutter-mobile); }

  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }

  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-3); }

  .article-toc { display: none; }

  .filter-bar { gap: var(--s-2); }
  .filter-bar__count { margin-left: 0; width: 100%; }

  /* Nav collapses behind a toggle. With scripting off the nav simply stays open. */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--ink);
    padding: var(--s-1);
    cursor: pointer;
  }

  .js .site-nav { display: none; }
  .js .site-header--nav-open .site-nav { display: flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: var(--hairline);
    padding: var(--s-2) var(--gutter-mobile) var(--s-4);
  }

  .site-nav a { padding: var(--s-3) 0; border-bottom: var(--hairline); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav__bar { display: none; }
  .site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--marker);
    text-underline-offset: 4px;
  }

  .site-header__inner { position: relative; }
}

@media (max-width: 400px) {
  .wordmark { --wm-size: 18px; min-width: 0; }
  .video-card__thumb-text { font-size: 20px; }
}
