/* How it looks: type, color, and the few components a page needs. One
   stylesheet for all five layouts of the style system (ADR 0085): it reads
   only the shared tokens, so any Mood and any Type laid over any layout is
   drawn by the same rules. Every value comes from tokens.css; do not add a raw
   color or size here. */

html {
  color-scheme: var(--color-scheme);
}

body {
  background-color: var(--color-page);
  background-image: var(--page-texture);
  background-size: var(--page-texture-size);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The Type's voice: its face, its weight, capitals or not, and its spacing.
   A face that is already black (Impact) is never thickened by the browser. */
h1,
h2,
h3,
.brand,
.statement-line {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  line-height: var(--heading-leading);
  text-transform: var(--heading-case);
  font-synthesis: none;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-3);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--step-5);
}

h2 {
  font-size: var(--step-4);
}

h3 {
  font-size: var(--step-1);
  line-height: 1.2;
}

p {
  margin: 0 0 var(--space-3);
}

p:last-child {
  margin-block-end: 0;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.18em;
}

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

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

.surface {
  background: var(--color-surface);
}

/* ---- the decoration the site's seed picked (tokens.css, ADR 0077) ---- */

.surface {
  background-image: var(--motif-texture);
  background-size: var(--motif-texture-size);
}

main > section + section {
  border-block-start: var(--motif-divider);
}

.section-head h2::before,
.split h2::before {
  content: '';
  display: var(--motif-bar);
  width: 2.5rem;
  height: 0.25rem;
  margin-block-end: var(--space-3);
  border-radius: var(--radius);
  background: var(--color-accent);
}

.skip-link {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-radius: var(--radius);
}

/* A short line above a heading, naming the section without shouting. */
.eyebrow {
  color: var(--color-accent);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 var(--space-3);
  text-transform: uppercase;
}

/* The mark the design puts before it, if any: decoration only. */
.eyebrow::before {
  content: var(--heading-mark);
}

/* The one paragraph that carries the page: larger, and allowed to breathe. */
.lede {
  color: var(--color-muted);
  font-size: var(--step-1);
  line-height: 1.5;
}

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

.site-header {
  background: var(--color-surface);
  border-block-end: var(--space-1) solid var(--color-accent);
}

.site-header a {
  color: inherit;
  text-decoration: none;
}

.brand {
  font-size: var(--step-1);
  line-height: 1.15;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-mark {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
}

.icon-button {
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: inherit;
  cursor: pointer;
}

.site-nav a {
  display: block;
  padding: var(--space-2) 0;
}

.site-nav::backdrop {
  background: var(--color-scrim);
}

@media (max-width: 47.99rem) {
  .site-nav[popover] {
    background: var(--color-surface);
    color: var(--color-ink);
  }

  .site-nav a {
    font-family: var(--font-heading);
    font-size: var(--step-2);
    font-weight: var(--heading-weight);
    text-transform: var(--heading-case);
    font-synthesis: none;
  }

  .site-nav a[aria-current='page'] {
    color: var(--color-accent);
  }
}

@media (min-width: 48rem) {
  .site-nav[popover] {
    background: none;
    color: inherit;
  }

  .site-nav a {
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 160ms ease;
  }

  .site-nav a:hover,
  .site-nav a[aria-current='page'] {
    color: var(--color-accent);
  }
}

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

.button,
.site-header .button {
  border: var(--button-border-width) solid var(--color-accent);
  border-radius: var(--button-radius);
  box-shadow: var(--button-shadow);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: filter 160ms ease;
}

.button:hover {
  filter: brightness(1.08);
}

.button--quiet {
  background: transparent;
  color: var(--color-accent);
}

.button--quiet:hover {
  background: var(--color-accent-soft);
  filter: none;
}

address {
  font-style: normal;
  font-weight: 700;
}

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

.site-footer {
  background: var(--color-surface);
  border-block-start: var(--space-1) solid var(--color-accent);
  font-size: var(--step--1);
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.site-footer .brand {
  margin-block-end: var(--space-2);
}

.site-footer a {
  color: inherit;
}

.colophon {
  border-block-start: 1px solid var(--color-border);
}

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

  .site-nav a,
  .button {
    transition: none;
  }
}
