/* ==========================================================================
   Serifo — Base / Reset / Shared primitives
   ========================================================================== */

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

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

/* Anchor targets land below the fixed header instead of underneath it. */
[id] { scroll-margin-top: var(--header-h); }

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

body {
  margin: 0;
  background: var(--color-bone);
  color: var(--color-black);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

p, h1, h2, h3, h4, h5, h6 { margin: 0; }

.italic-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--color-salmon);
}

/* ---- Container: caps at max-width 1200px, centered, with fluid gutters
   below that so it never touches the viewport edge on smaller screens.
   Section backgrounds stay outside this element and run full width. ---- */
.container {
  width: calc(100% - 2 * var(--container-pad));
  max-width: var(--page-max);
  margin-inline: auto;
}

.section {
  position: relative;
  width: 100%;
  overflow: clip;
}

/* ---- Typography ---- */
.display-hero {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

.h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
}

.h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
}

.h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
}

.body-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

.caption {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-caption);
  text-transform: uppercase;
}

.metric {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-metrics);
  line-height: var(--lh-metrics);
  letter-spacing: var(--ls-metrics);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  width: max-content;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-cta);
  line-height: var(--lh-cta);
  letter-spacing: var(--ls-cta);
  white-space: nowrap;
  border: none;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

/* Light (bone) surfaces get a maroon fill at 10% opacity laid on top on
   hover/press (an inset box-shadow with a huge spread reads as a flat
   color overlay filling the box, rather than replacing the background) —
   press just doubles the opacity of the same overlay. Dark (maroon)
   surfaces instead lighten via brightness, since an overlay in the same
   maroon wouldn't read as a state change against a maroon background. */
.btn--light { background: var(--color-bone); color: var(--color-maroon); }
.btn--light:hover { box-shadow: inset 0 0 0 999px rgba(85, 0, 0, 0.1); }
.btn--light:active { box-shadow: inset 0 0 0 999px rgba(85, 0, 0, 0.2); }

.btn--dark  { background: var(--color-maroon); color: var(--color-bone); }
.btn--dark:hover { filter: brightness(1.18); }
.btn--dark:active { filter: brightness(1.32); }

.btn--outline {
  background: transparent;
  color: var(--color-bone);
  border: 1px solid var(--color-bone);
}
.btn--outline:hover {
  background: rgba(248, 247, 245, 0.12);
}
.btn--outline:active {
  background: rgba(248, 247, 245, 0.22);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-cta-pad-y) var(--btn-cta-pad-x);
  width: max-content;
  background: var(--color-bone);
  color: var(--color-maroon);
  border: 1px solid #606060;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-cta);
  line-height: var(--lh-cta);
  transition: box-shadow 0.15s ease;
}
.btn-cta:hover { box-shadow: inset 0 0 0 999px rgba(85, 0, 0, 0.1); }
.btn-cta:active { box-shadow: inset 0 0 0 999px rgba(85, 0, 0, 0.2); }

/* ---- Text link with a trailing (or, with --leading, leading) arrow ---- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xxs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-cta);
  line-height: var(--lh-cta);
  text-decoration: none;
}
.text-link:hover,
.text-link:active { text-decoration: underline; }

.text-link img { width: 16px; height: auto; }

/* ---- Skip link (accessibility) ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-bone);
  color: var(--color-maroon);
  padding: 12px 24px;
  z-index: 1000;
}
.skip-link:focus { left: var(--gap-sm); top: var(--gap-sm); }
