@import url('./tokens.css');

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

/* GLOBAL */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-body);
  line-height: var(--line-body);
  color: var(--stone);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: var(--fw-display);
  line-height: var(--line-display);
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.125rem; }

h1 em, h2 em, h3 em { font-style: italic; color: var(--clay); font-weight: inherit; }

p { font-size: var(--fs-body); }
p + p { margin-top: var(--s-2); }

strong { font-weight: var(--fw-body-med); color: var(--ink); }

/* CONTAINER */
.container        { max-width: var(--container);        margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--gutter); }

/* SECTION RHYTHM — fluid via clamp() so mobile is tighter than desktop */
.section { padding-block: var(--section-pad); scroll-margin-top: var(--header-h); }
.section--tight { padding-block: var(--section-pad-tight); }
.section--bone   { background: var(--bone);  color: var(--stone); }
.section--linen  { background: var(--linen); color: var(--stone); }
.section--ink    { background: var(--ink);   color: var(--bone); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--bone); }
.section--ink h2 em, .section--ink h3 em { color: var(--taupe); }

/* DARK SECTION RULE — bible: headlines Bone on dark, body Bone on dark */
.section--ink p { color: rgba(247, 243, 236, 0.8); }

/* UTILITIES */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-family: var(--sans);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-body-med);
  letter-spacing: var(--tracking-uppercase);
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: var(--s-2);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
}
.section--ink .eyebrow { color: var(--clay); }

.divider {
  height: 1px;
  background: var(--mist);
  border: 0;
  margin-block: var(--s-4);
}

.last-updated {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--tracking-uppercase);
  text-transform: uppercase;
  color: var(--taupe);
}

/* FOCUS — accessibility */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
