/* ==========================================================================
   ELEMENTS — resets, base typography, background treatment, generic layout
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

/* the contour/topographic backdrop is intentionally very faint and sits
   behind all content, fixed so it never scrolls out of place */
.contour-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--color-bg);
  background-image:
    repeating-radial-gradient(circle at 18% 12%, transparent 0 46px, var(--color-line) 47px 48px, transparent 49px 94px),
    repeating-radial-gradient(circle at 86% 78%, transparent 0 60px, var(--color-line) 61px 62px, transparent 63px 122px);
  opacity: 0.55;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-lg);
}

h4 {
  font-size: var(--fs-md);
}

p {
  margin: 0 0 var(--sp-4);
  max-width: 68ch;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* generic inline text link, per LINKS: animated underline that slides in on hover */
.text-link {
  position: relative;
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 1px;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent);
  transition: right var(--dur-base) var(--ease-standard);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  right: 0;
}

.text-link--onprimary {
  color: var(--color-cream, #f6f3eb);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* layout primitives */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.container--mid {
  max-width: var(--container-mid);
}

.container--narrow {
  max-width: var(--container-narrow);
}

main {
  display: block;
}

.section {
  padding-block: var(--sp-9);
}

.section--tight {
  padding-block: var(--sp-7);
}

.section--alt {
  background: var(--color-surface-alt);
}

.section-head {
  max-width: var(--container-mid);
  margin-bottom: var(--sp-6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--sp-3);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  display: inline-block;
}

.lede {
  font-size: var(--fs-md);
  color: var(--color-ink-soft);
  max-width: 62ch;
}

/* DETAIL: dotted rule used as a small signature mark under headings and
   between adjacent facts inside a component */
.dotted-rule {
  border: none;
  border-top: 3px dotted var(--color-accent);
  width: 56px;
  margin: var(--sp-3) 0 0;
}

/* DIVIDERS: dashed rules recur as the main section-to-section seam */
.dash-divider {
  border: none;
  border-top: 1px dashed var(--color-line-strong);
  margin: 0;
}

.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: var(--sp-4);
  top: -60px;
  background: var(--color-primary);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  z-index: 500;
  transition: top var(--dur-base) var(--ease-standard);
}

.skip-link:focus {
  top: var(--sp-4);
}
