/*
  base.css — reset, ground, typography, layout primitives.
  Loads after tokens.css. No component-specific classes here (see components.css).
*/

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

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

body {
  margin: 0;
  background: var(--attic);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--candle);
  text-decoration-color: rgba(187, 139, 95, 0.55);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-color: currentColor;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--attic);
  padding: 10px 16px;
  z-index: 10;
}

.skip-link:focus {
  left: var(--sp-2);
  top: var(--sp-2);
}

/* Visible keyboard focus everywhere — never remove without replacing. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--candle);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-variation-settings: var(--fraunces-axes);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 var(--sp-2);
  color: var(--paper);
}

h1 {
  font-size: var(--text-display);
}

h2 {
  font-size: var(--text-h2);
}

p {
  margin: 0 0 var(--sp-2);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

/* Content column — every top-level section shares this rhythm. */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

@media (max-width: 520px) {
  .wrap {
    padding-inline: var(--pad-x-narrow);
  }
}

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

.section:first-of-type {
  padding-top: var(--sp-4);
}

@media (max-width: 520px) {
  .section {
    padding-block: var(--sp-4);
  }
}

.lede {
  font-size: var(--text-lede);
  color: var(--paper);
  max-width: 56ch;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
