/* ==========================================================================
   base.css — element level defaults
   ========================================================================== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-display);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-display);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
}

h4 {
  font-size: var(--fs-h4);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h5 {
  font-size: 18px;
  line-height: 1.3;
}

h6 {
  font-size: 16px;
  line-height: 1.3;
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-s);
}

a {
  color: var(--color-accent-dark);
  text-decoration-color: rgba(36, 91, 70, 0.3);
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-out),
    text-decoration-color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--color-accent);
  text-decoration-color: currentColor;
}

strong,
b {
  font-weight: 650;
}

small {
  font-size: var(--fs-small);
}

code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--color-surface-alt);
  border-radius: var(--radius-xs);
  padding: 0.15em 0.4em;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

::selection {
  background: var(--color-highlight);
  color: var(--color-accent-dark);
}

::-moz-selection {
  background: var(--color-highlight);
  color: var(--color-accent-dark);
}

/* Utilities -------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: var(--space-m);
  z-index: 999;
  background: var(--color-accent-dark);
  color: var(--color-ink-invert);
  padding: 12px 20px;
  border-radius: var(--radius-s);
  font-weight: 600;
  transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-s);
  color: var(--color-ink-invert);
}

.text-secondary {
  color: var(--color-secondary);
}

.text-accent {
  color: var(--color-accent);
}

.text-center {
  text-align: center;
}

.no-wrap {
  white-space: nowrap;
}

.measure {
  max-width: 68ch;
}

.measure-wide {
  max-width: 82ch;
}
