/* Atkinson Hyperlegible Next: designed by the Braille Institute for low-vision readers */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Palette borrowed from public wayfinding signs: navy, signal blue, sign yellow */
:root {
  --navy: #102a4c;
  --blue: #1d5bb5;
  --yellow: #f5c518;
  --paper: #ffffff;
  --tint: #edf2f7;
  --muted: #4a5568;
  --rule: #c9d3df;
  --critical: #a50e0e;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #e8eef6;
    --blue: #8ab4f8;
    --paper: #0f1a2b;
    --tint: #18263b;
    --muted: #b3c0d1;
    --rule: #2c3d56;
    --critical: #ff8a80;
  }
}

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

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

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--paper);
}

a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

/* One focus style everywhere: navy ring on a sign-yellow halo, visible on any background */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--yellow);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--yellow);
  color: #102a4c;
  padding: 8px 16px;
  font-weight: 700;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
}
.wordmark svg { width: 32px; height: 32px; flex: none; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a { color: var(--navy); font-weight: 700; text-decoration: none; padding: 6px 0; }
.site-nav a:hover { text-decoration: underline; }

/* Hero */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 96px);
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero .lede { font-size: 1.25rem; max-width: 34ch; margin: 0 0 32px; color: var(--muted); }

.button {
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 6px;
  text-decoration: none;
}
.button:hover { background: var(--blue); text-decoration: none; }
.hero .contact-line { margin: 16px 0 0; color: var(--muted); font-size: 1rem; }

/* The one featured element: an excerpt of a real report layout, marked as a sample */
.sample {
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.sample-tab {
  background: var(--yellow);
  color: #102a4c;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 20px;
  border-bottom: 2px solid var(--navy);
}
.sample-body { padding: 20px 24px 24px; }
.sample-title { font-size: 1.3rem; font-weight: 700; line-height: 1.25; margin: 0 0 10px; }
.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--critical);
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 1px 12px;
  margin: 0 0 14px;
}
.sample-body dl { margin: 0; }
.sample-body dt { font-weight: 700; margin-top: 12px; }
.sample-body dd { margin: 2px 0 0; }
.sample-body ol { margin: 4px 0 0; padding-left: 1.3em; }
.sample figcaption {
  font-size: 0.95rem;
  color: var(--muted);
  padding: 12px 24px;
  border-top: 1px solid var(--rule);
  background: var(--tint);
}

/* Content sections: plain text on a narrow measure, separated by rules */
.section { border-top: 1px solid var(--rule); }
.section .wrap { padding-block: clamp(48px, 7vw, 80px); }
.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 20px;
}
/* Limit line length per element, so prose shares the left edge of the hero and steps */
.prose > * { max-width: var(--measure); }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }

/* How it works is a true sequence, so it gets numbers */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: #102a4c;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.2rem; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--muted); }

.limits { background: var(--tint); }

/* Other work: a simple list, not cards */
.prose .work { list-style: none; margin: 8px 0 0; padding: 0; }
.work li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.work li:first-child { border-top: 1px solid var(--rule); }
.prose h3 { font-size: 1.25rem; margin: 32px 0 8px; }
.work h4 { font-size: 1.15rem; margin: 0 0 4px; }
.work p { margin: 0; color: var(--muted); }

.contact .email { font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 1rem; }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 28px;
}
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }

/* Simple inner pages */
.page .wrap { padding-block: clamp(40px, 6vw, 72px); }
.page h1 { font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 24px; }
.page h2 { font-size: 1.35rem; margin: 32px 0 10px; }
.updated { color: var(--muted); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
