/* ==========================================================================
   KNEST Base — modern reset, typography, accessibility primitives
   ========================================================================== */

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

* { margin: 0; }

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

/* Respect users who don't want motion — global kill switch */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  line-height: var(--lh-base);
  font-weight: var(--fw-regular);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Prevent horizontal overflow at the root WITHOUT trapping vertical scroll.
   `clip` (unlike `hidden`) doesn't create a scroll container, so mobile
   vertical scrolling keeps working. */
html { overflow-x: clip; }

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

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

button { cursor: pointer; background: none; border: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

/* --- Headings --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: var(--fs-800); }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); line-height: var(--lh-snug); font-weight: 700; }
h4 { font-size: var(--fs-500); line-height: var(--lh-snug); font-weight: 700; }

/* Civic-bold display: the playbook's "mobilizing" campaign voice.
   Condensed, heavy, uppercase, with the signature −6° skew on hero banners. */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
}
.display--skew { transform: skewY(-6deg); transform-origin: left; }
.display em { font-style: normal; color: var(--brand-accent); }
.section--brand .display em, .hero .display em { color: var(--orange-300); }

p { text-wrap: pretty; }

/* ==========================================================================
   Accessibility primitives
   ========================================================================== */

/* Visible focus for keyboard users only */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}
/* Remove the default outline only where focus-visible is supported */
:focus:not(:focus-visible) { outline: none; }

/* Skip link — first focusable element on the page */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: var(--z-skiplink);
  background: var(--brand);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* Screen-reader-only text */
.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;
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--brand { background: var(--brand); color: #fff; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }

.stack > * + * { margin-top: var(--flow, var(--sp-4)); }

/* Eyebrow / kicker label above headings */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-300);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: var(--sp-3);
}
.section--brand .eyebrow { color: var(--orange-300); }

.lead {
  font-size: var(--fs-500);
  color: var(--text-muted);
  line-height: var(--lh-base);
  max-width: 60ch;
}
.section--brand .lead { color: rgba(255,255,255,0.85); }
