/* styles.css — the single shared look for every page on the site.
   Change a color or font here and it updates everywhere.
   Uses only fonts already on the visitor's device: nothing loads from outside. */

:root {
  /* Colors */
  --ink: #12213a;          /* deep navy: headings, dark bands, footer */
  --ink-soft: #2a3a55;
  --muted: #5b6170;        /* secondary text */
  --paper: #fbfaf7;        /* page background */
  --white: #ffffff;
  --sand: #f3eee4;         /* hero backgrounds */
  --line: #e3ddd0;         /* borders */
  --field-line: #7d8594;   /* form field borders (3:1+ on white) */
  --accent: #0d6b6e;       /* coastal teal: buttons and links */
  --accent-dark: #0a5558;
  --accent-tint: #e4f0ef;
  --on-dark: #d4dbe6;      /* secondary text on navy */
  --todo-bg: #fff6d6;
  --todo-line: #d9b23a;
  --todo-ink: #6b5100;

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Charter, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wide: 72rem;
  --narrow: 46rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 33, 58, 0.05), 0 6px 20px rgba(18, 33, 58, 0.06);
}

* { box-sizing: border-box; }

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

/* Leave room for the sticky header when a link jumps to a section. */
[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-dark); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }

.container {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container.narrow { max-width: var(--narrow); }

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--white);
  padding: 0.5rem 1rem;
  z-index: 20;
}

/* Hidden on screen but still read by screen readers. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.site-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  background: var(--sand);
  border-bottom: 1px solid var(--line);
  padding: 4rem 0 3.5rem;
}
.hero.compact { padding: 3rem 0 2.5rem; }
.hero h1 { max-width: 48rem; }
.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 44rem;
}
.hero-split {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

/* ---------- Home page: two cards only ---------- */
.home {
  background: var(--sand);
  padding: 4.5rem 0 5rem;
}
.audience-card {
  display: flex;
  flex-direction: column;
  padding: 2.25rem;
}
.card.audience-card h2 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.audience-card p {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.75rem;
}
.audience-card .button { align-self: flex-start; margin-top: auto; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section.white {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 1.45rem; }

/* Contractors: numbered "How it works" steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}
.steps li {
  counter-increment: step;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.steps p { margin: 0; }

/* Contractors: the five qualified-meeting conditions */
.criteria {
  list-style: none;
  counter-reset: crit;
  margin: 0 0 2rem;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.criteria li {
  counter-increment: crit;
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
}
.criteria li:first-child { border-top: 0; }
.criteria li::before {
  content: counter(crit);
  flex: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--accent);
  min-width: 1.25rem;
}

/* ---------- Dark band (contractor pilot terms) ---------- */
.band-dark {
  background: var(--ink);
  color: var(--white);
  padding: 3.5rem 0;
}
.band-dark h2 { color: var(--white); }
.band-dark p { color: var(--on-dark); }
.band-dark :focus-visible { outline-color: var(--white); }
.band-dark .todo :focus-visible { outline-color: var(--ink); }
.pilot {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}
.band-dark .pilot-text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.3;
  color: var(--white);
  margin: 0;
}
.pilot-text strong { color: #9fd6d3; }

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
/* White button for dark bands (teal on navy would be hard to see). */
.button.light { background: var(--white); border-color: var(--white); color: var(--ink); }
.button.light:hover { background: var(--sand); border-color: var(--sand); color: var(--ink); }

/* ---------- TODO markers ----------
   Yellow boxes make unapproved or placeholder items obvious.
   Delete the box once the approved item is in place. */
.todo {
  background: var(--todo-bg);
  border: 1px dashed var(--todo-line);
  border-left: 4px solid var(--todo-line);
  border-radius: 6px;
  color: var(--ink);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.todo::before {
  content: "TODO";
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--todo-ink);
  margin-bottom: 0.35rem;
}
.todo[data-label]::before { content: "TODO \00B7  " attr(data-label); }
.todo p:not([class]) { color: var(--ink); }
.todo > :last-child { margin-bottom: 0; }
.todo a:not(.button) { color: var(--accent-dark); }
.todo pre {
  background: var(--white);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ---------- Notes ---------- */
.note {
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.note > :last-child { margin-bottom: 0; }
.summary-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 50rem;
}

/* ---------- Form ---------- */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.1rem; }
.field > label,
.field > legend {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  padding: 0;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--white);
}
.field input:focus, .consent input:focus, .choice input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
fieldset.field { border: 0; margin: 0 0 1.1rem; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 0.8rem;
  cursor: pointer;
  font-size: 0.97rem;
}
.choice input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0.5rem 0 1.5rem;
}
.consent input {
  margin-top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  accent-color: var(--accent);
}
.consent label { font-weight: 400; font-size: 0.92rem; color: var(--ink-soft); }

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: #e8f3ea;
  border: 1px solid #9cc9a5;
}
.form-status[hidden] { display: none; }
.form-status > :last-child { margin-bottom: 0; }

/* ---------- Privacy page ---------- */
.policy p {
  padding: 1.25rem 0;
  margin: 0;
  border-top: 1px solid var(--line);
}
.policy p:first-child { border-top: 0; padding-top: 0; }
.policy strong { font-family: var(--serif); font-size: 1.15rem; }

/* ---------- Footer: approved disclaimer, company name and postal address ---------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark);
  font-size: 0.95rem;
  padding: 2.5rem 0;
}
.site-footer address { font-style: normal; }
.site-footer p { margin: 0; max-width: 52rem; }
.site-footer .footer-disclaimer { margin-bottom: 0.9rem; color: var(--white); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--accent-tint); }
.site-footer :focus-visible { outline-color: var(--white); }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 52rem) {
  .hero-split, .pilot { grid-template-columns: 1fr; }
}
@media (max-width: 44rem) {
  .hero, .home { padding: 2.75rem 0 2.5rem; }
  .section, .band-dark { padding: 2.75rem 0; }
  .form-panel { padding: 1.4rem; }
  .audience-card { padding: 1.6rem; }
  .site-header { position: static; }
}
