/* Base: reset, typography, layout primitives */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;           /* 16px minimum body */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 1.0625rem; } }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 .5em;
  color: var(--olive);
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.1rem, 6.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
em.accent, .accent { font-style: italic; color: var(--gold-deep); }

a { color: var(--olive); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 5px rgba(30, 39, 13, .35);
}

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 56px; }
@media (min-width: 1024px) { .section { padding-block: 84px; } }

.sr-only {
  position: absolute !important; 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: 12px; top: -60px; z-index: 1000;
  background: var(--olive-deep); color: var(--neon); padding: 12px 18px; border-radius: 6px;
  font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 62ch; }
@media (min-width: 768px) { .lead { font-size: 1.2rem; } }

/* Reserve space for the injected chrome so nothing shifts */
#site-header { min-height: var(--header-h); background: var(--olive-deep); }
#demo-banner { min-height: 40px; background: var(--olive-deep); }
html.banner-off #demo-banner { display: none; }

/* Room for the sticky bottom action bar on mobile */
@media (max-width: 767px) {
  body.has-bottombar { padding-bottom: calc(var(--bottombar-h) + env(safe-area-inset-bottom)); }
}

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