/* Ozark Data Works — site styles
   Colors come from the logo. Every text/background pair below is checked
   for WCAG 2.2 AA contrast by `npm run check` (scripts/check.mjs). If you
   change a token, run the check again. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand (from logo) */
  --brand-mist: #f3f5f2;
  --brand-forest: #1f3a32;
  --brand-sage: #4c7a68;
  --brand-river: #5fb3c4;
  --brand-teal: #2e7d8c;
  --brand-amber: #d98e2b;

  /* Light theme tokens: neutral backgrounds, green used as an accent */
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-alt: #f0f1ee;
  --text: #1f2426;
  --heading: #1f3a32;
  --text-muted: #52595c;
  --link: #24707d;
  --border: #d3d7d4;
  --focus: #1f3a32;
  --accent-line: #5fb3c4;
  --button-bg: #d98e2b;
  --button-bg-hover: #e6a24b;
  --button-text: #1f3a32;
  --band-bg: #1f3a32;
  --band-text: #f3f5f2;
  --band-muted: #c3d1ca;
  --band-link: #8fd0dc;
  --band-focus: #f0b45c;
  --footer-bg: #1b1f21;
  --footer-text: #f3f5f2;
  --footer-muted: #c4c9cb;
  --footer-link: #8fd0dc;
  --error: #a3261b;
  --error-bg: #fbeceb;
  --success: #1f5c3f;
  --success-bg: #e3f1e8;

  --radius: 0.5rem;
  --container: 72rem;
  --gutter: 1rem;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151819;
    --surface: #23282a;
    --surface-alt: #1c2022;
    --text: #eef0ef;
    --heading: #f3f5f2;
    --text-muted: #b5bcbe;
    --link: #8fd0dc;
    --border: #3a4245;
    --focus: #f0b45c;
    --accent-line: #5fb3c4;
    --footer-bg: #0f1112;
    --error: #ffb4a8;
    --error-bg: #4a1f1a;
    --success: #a8e0bf;
    --success-bg: #1d4733;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

h1,
h2,
h3 {
  font-stretch: 112%;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  color: var(--heading);
}

h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover { text-decoration-thickness: 0.16em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

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

@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--brand-forest);
  color: var(--brand-mist);
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
  outline-color: var(--band-focus);
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  width: 3.25rem;
  height: auto;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.02em;
  color: var(--heading);
}

.brand-sub {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.42em;
  color: var(--brand-teal);
}

@media (prefers-color-scheme: dark) {
  .brand-sub { color: var(--brand-river); }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.site-nav a:hover {
  background: var(--surface-alt);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.4em;
}

.site-nav .nav-cta {
  background: var(--button-bg);
  color: var(--button-text);
}

.site-nav .nav-cta:hover {
  background: var(--button-bg-hover);
}

@media (max-width: 47.99rem) {
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; }
  .site-nav a { padding-inline: 0.6rem; }
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--button-bg);
  color: var(--button-text);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--button-bg-hover);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: currentColor;
}

.button-secondary:hover {
  background: var(--surface-alt);
}

.button[disabled],
.button[aria-disabled="true"] {
  opacity: 0.7;
  cursor: progress;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3rem, 2rem + 4vw, 5.5rem);
}

.section-alt {
  background: var(--surface-alt);
}

.section-intro {
  max-width: 44rem;
  margin-bottom: 2.25rem;
}

.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3rem);
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem);
}

.hero .container {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-art {
  justify-self: center;
  width: min(20rem, 70%);
}

@media (min-width: 56rem) {
  .hero .container {
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
  }

  .hero-art {
    width: 100%;
    max-width: 26rem;
  }
}

.hero h1 {
  max-width: 18ch;
}

.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  background: var(--surface-alt);
  border-bottom: 4px solid var(--accent-line);
}

.page-hero p {
  max-width: 44rem;
}

/* ---------- Cards & grids ---------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent-line);
  border-radius: var(--radius);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--brand-sage);
}

@media (prefers-color-scheme: dark) {
  .card-icon { color: var(--brand-river); }
}

.checklist {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-inline-start: 1.6rem;
  margin-bottom: 0.4rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.2rem;
  top: 0.6em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--brand-amber);
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.steps li {
  counter-increment: step;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border: 4px solid var(--brand-river);
  border-radius: 50%;
  font-weight: 800;
}

.steps h3 { margin-bottom: 0.4rem; }
.steps p { margin: 0; }

/* ---------- Dark band (CTA) ---------- */

.band {
  --focus: var(--band-focus);
  --link: var(--band-link);
  --heading: var(--band-text);
  background: var(--band-bg);
  color: var(--band-text);
}

.band .lead { color: var(--band-muted); }

.band .button-secondary { color: var(--band-text); }
.band .button-secondary:hover { background: rgba(255, 255, 255, 0.08); }

.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.band-inner > div { max-width: 40rem; }
.band-inner h2 { margin-bottom: 0.5rem; }
.band-inner p { margin: 0; }

/* ---------- Prose pages ---------- */

.prose {
  max-width: 46rem;
}

.prose h2 { margin-top: 2.5rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul { padding-inline-start: 1.25rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.4rem; }

.two-col {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.mission {
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border-inline-start: 6px solid var(--brand-amber);
  border-radius: var(--radius);
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.45;
}

/* ---------- Contact form ---------- */

.contact-layout {
  display: grid;
  gap: 3rem;
}

@media (min-width: 60rem) {
  .contact-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

.form-card {
  align-self: start;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

fieldset {
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 0.75rem;
  padding: 0;
  font-size: 1.15rem;
  font-weight: 800;
  font-stretch: 112%;
}

.topic-options {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 36rem) {
  .topic-options { grid-template-columns: 1fr 1fr; }
}

.topic-option {
  position: relative;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
}

.topic-option:hover {
  border-color: var(--brand-sage);
}

.topic-option:has(input:checked) {
  border-color: var(--brand-river);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--brand-river);
}

.topic-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.topic-option input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  accent-color: var(--brand-teal);
}

.topic-option input:focus-visible {
  outline: none;
}

.topic-title {
  display: block;
  font-weight: 700;
  line-height: 1.3;
}

.topic-desc {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.field {
  margin-bottom: 1.25rem;
}

.field-row {
  display: grid;
  gap: 0 1rem;
}

@media (min-width: 36rem) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.field .hint {
  display: block;
  margin: -0.15rem 0 0.4rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.optional {
  color: var(--text-muted);
  font-weight: 500;
}

input[type="text"],
input[type="email"],
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  border: 2px solid var(--text-muted);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: var(--error);
  font-weight: 600;
}

.field-error:empty { display: none; }

.honeypot {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.turnstile-wrap {
  min-height: 70px;
  margin-bottom: 1.25rem;
}

.alert {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-inline-start: 6px solid currentColor;
}

.alert:empty { display: none; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-error a { color: inherit; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert h2, .alert h3 { color: inherit; font-size: 1.25rem; }

.noscript-note {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
}

.direct-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.direct-list li {
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.direct-list li:first-child { padding-top: 0; }

.direct-list strong { display: block; }

.direct-list span {
  display: block;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */

.site-footer {
  --focus: var(--band-focus);
  --link: var(--footer-link);
  --heading: var(--footer-text);
  padding-block: 3rem 2rem;
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}

.site-footer h2 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li { margin-bottom: 0.35rem; }

.site-footer a {
  display: inline-block;
  padding-block: 0.3rem;
}

.site-footer .muted {
  color: var(--footer-muted);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(243, 245, 242, 0.2);
  color: var(--footer-muted);
  font-size: 0.95rem;
}

/* ---------- Motion & print ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button, .site-nav a, .topic-option { transition: background-color 0.15s ease, border-color 0.15s ease; }
}

@media (forced-colors: active) {
  .card, .steps li, .topic-option, .form-card { border: 1px solid CanvasText; }
  .button { border: 2px solid ButtonText; }
  .checklist li::before { background: CanvasText; }
}

@media print {
  .site-nav, .skip-link, .band, .button-row { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
