/* AashCo — brand v2 (heritage palette). Source of truth: AashCo Positioning v2,
   section 9 "Visual brand". Ink / Olive / Stone / Shared Red, Flow Green accent.
   Fonts are self-hosted (CSP font-src 'self'); both are SIL OFL, see public/fonts/. */

:root {
  --bg: #F5F1EA;            /* Stone */
  --surface: #FFFFFF;
  --text: #16181D;          /* Ink */
  --text-secondary: #5A5E66;/* Slate */
  --action: #C8322F;        /* Shared Red: calls to action only */
  --action-text: #FFFFFF;
  --section-bg: #ECE6DB;    /* Stone, one step deeper */
  --border: #E2DCD1;
  --accent: #4CAF74;        /* Flow Green: decorative / on dark only */
  --link: #2E6B4A;          /* Olive */
  --dark: #16181D;
  --dark-panel: #23262D;
  --dark-border: #353941;
  --on-dark: #FFFFFF;
  --on-dark-muted: #D6D2CA;
  --friction: #8E9096;
  --radius: 8px;
  --max-width: 1120px;
  --prose-width: 680px;
  --form-width: 680px;
  --gutter: 24px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

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

a { color: var(--link); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--action);
  color: var(--action-text);
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

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

.prose { max-width: var(--prose-width); }
.form-wrap { max-width: var(--form-width); }

/* Header */
header.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo-a { fill: currentColor; }
.logo-bar { stroke: var(--accent); }
.wordmark--footer { font-size: 18px; margin-bottom: 8px; display: flex; }
.wordmark--footer .logo-mark { width: 26px; height: 26px; }

nav.primary-nav { display: none; }
nav.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
nav.primary-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
nav.primary-nav a:hover { color: var(--link); }
nav.primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--action);
  color: var(--action-text);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  white-space: nowrap;
}
.nav-cta:hover { background: #A92825; }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.mobile-menu[data-open="true"] { display: flex; }
.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 4px;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu a[aria-current="page"] { text-decoration: underline; }
.mobile-menu .nav-cta { justify-content: center; margin-top: 8px; }

@media (min-width: 860px) {
  nav.primary-nav { display: block; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* Sections */
main { display: block; }
section, .section {
  padding: 56px 0;
}
.section--light { background: var(--section-bg); }
@media (min-width: 860px) {
  section, .section { padding: 96px 0; }
}

.hero {
  padding: 64px 0 56px;
}
@media (min-width: 860px) {
  .hero { padding: 96px 0 80px; }
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
h1 {
  font-size: 38px;
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 800;
  max-width: 18ch;
}
@media (min-width: 860px) {
  h1 { font-size: 56px; }
}

h2 {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 16px;
  max-width: 22ch;
}
@media (min-width: 860px) {
  h2 { font-size: 34px; }
}

h3 { font-size: 22px; margin: 0 0 10px; }

p { margin: 0 0 16px; }
p.lede { font-size: 20px; color: var(--text-secondary); max-width: 60ch; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  font-family: var(--font-display);
  background: var(--action);
  color: var(--action-text);
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { background: #A92825; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.text-link {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }

/* How We Work steps */
ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  max-width: var(--prose-width);
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 40px 56px;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}
ol.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: -21px;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--action);
  color: var(--action-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; max-width: var(--prose-width); }
.faq-item h3 { margin-bottom: 8px; }

/* Form */
.field { margin: 0 0 24px; }
.field label, .field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.field .required { color: var(--text-secondary); font-weight: 400; font-size: 14px; }
.field .help {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 4px 0 8px;
}
.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  width: 100%;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #B9B2A6;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  min-height: 44px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field .char-count { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.field-error {
  color: #9A1B1B;
  font-size: 15px;
  margin-top: 6px;
}
.field.has-error input,
.field.has-error textarea,
.field.has-error select {
  border-color: #9A1B1B;
}

.field--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  cursor: pointer;
}
.field--checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  accent-color: var(--action);
  cursor: pointer;
}
.field--checkbox.has-error label {
  color: #9A1B1B;
}

.error-summary {
  border: 2px solid #9A1B1B;
  background: #FBEAEA;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 28px;
}
.error-summary h2 { font-size: 18px; margin: 0 0 10px; color: #9A1B1B; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: #9A1B1B; font-weight: 600; }

.notice-box {
  background: var(--section-bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
  max-width: var(--prose-width);
}

details.optional-context {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin: 0 0 28px;
}
details.optional-context summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
details.optional-context .field:last-child { margin-bottom: 20px; }

.privacy-note { color: var(--text-secondary); font-size: 15px; max-width: var(--prose-width); }

.js-disabled-note {
  display: none;
}
.no-js .js-disabled-note { display: block; }
.no-js .js-only { display: none; }

.success-panel {
  max-width: var(--prose-width);
}
.success-panel .reference { color: var(--text-secondary); }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  color: var(--text-secondary);
}
footer.site-footer .footer-tagline { margin-bottom: 20px; }
footer.site-footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  margin: 0 0 20px;
}
footer.site-footer nav a { color: var(--text-secondary); text-decoration: none; }
footer.site-footer nav a:hover { color: var(--link); text-decoration: underline; }
footer.site-footer .footer-meta { font-size: 15px; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}


/* ---------- Brand v2 components ---------- */

/* Dark header + hero (home) */
.site-header--dark { background: var(--dark); border-bottom-color: var(--dark-border); }
.site-header--dark .wordmark,
.site-header--dark nav.primary-nav a:not(.nav-cta),
.site-header--dark .mobile-menu a:not(.nav-cta) { color: var(--on-dark); }
.site-header--dark nav.primary-nav a:not(.nav-cta):hover { color: var(--accent); }
.site-header--dark .menu-toggle { color: var(--on-dark); border-color: var(--dark-border); }
.site-header--dark .mobile-menu { border-top-color: var(--dark-border); }

.hero--dark { background: var(--dark); color: var(--on-dark); padding-bottom: 24px; }
.hero--dark .lede { color: var(--on-dark-muted); }
.hero--dark .text-link { color: var(--on-dark); }
.hero--dark .cta-note { color: var(--on-dark-muted); }
h1.display { max-width: 12ch; }
.display .accent { color: var(--accent); }
@media (min-width: 860px) {
  h1.display { font-size: 84px; line-height: 1.0; letter-spacing: -0.03em; }
}

.cta-row { align-items: flex-start; }
.cta-row .text-link { min-height: 52px; display: inline-flex; align-items: center; }
.cta-stack { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cta-note { margin: 0; font-size: 15px; color: var(--text-secondary); }

/* Signature flow line */
.flow-line { margin-top: 40px; }
.flow-line svg { width: 100%; height: auto; overflow: visible; }
.flow-friction { fill: none; stroke: var(--friction); stroke-width: 3; stroke-linecap: round; }
.flow-smooth { fill: none; stroke: var(--accent); stroke-width: 3; }
.flow-node { fill: var(--accent); }
.flow-label { fill: var(--on-dark); font-family: var(--font-body); font-size: 17px; font-weight: 600; }
.flow-caption { fill: var(--friction); font-family: var(--font-body); font-size: 15px; }
@media (max-width: 859px) {
  .flow-label { font-size: 26px; }
  .flow-caption { font-size: 22px; }
}

/* Cards */
.card-grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 860px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.card p { color: var(--text-secondary); margin: 0; }
.card-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); margin-bottom: 14px; }

/* Two-column split */
.split { display: grid; gap: 32px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px 14px 48px;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--accent);
}

/* Closing CTA band */
.cta-band { background: var(--dark); color: var(--on-dark); }
.cta-band-inner { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.cta-band h2 { margin: 0; color: var(--on-dark); max-width: 20ch; }
.cta-band .cta-note { color: var(--on-dark-muted); }

/* How we work */
.section--flush { padding-top: 0; }
ol.steps li::before { background: var(--dark); font-family: var(--font-display); }
ol.steps li { border-left-color: var(--accent); }
.start-steps {
  list-style: none; margin: 32px 0 0; padding: 0; counter-reset: start;
  display: grid; gap: 20px;
}
@media (min-width: 860px) { .start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.start-steps li {
  counter-increment: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
}
.start-steps li::before {
  content: counter(start);
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--dark);
  font-family: var(--font-display); font-weight: 800; margin-bottom: 14px;
}
.start-steps p { color: var(--text-secondary); margin: 0; }

/* Ask page: two ways in */
.ways { display: grid; gap: 16px; margin: 0 0 24px; }
@media (min-width: 640px) { .ways { grid-template-columns: 1fr 1fr; } }
.way { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.way h2 { font-size: 20px; margin: 0 0 6px; }
.way p { margin: 0; color: var(--text-secondary); font-size: 16px; }

/* Footer on stone */
footer.site-footer .wordmark { color: var(--text); }
footer.site-footer .footer-meta a { color: var(--text-secondary); }

/* Keep prose sections left-aligned with the rest of the grid (wide wrapper,
   narrow children) instead of a centred narrow column. */
.wrap.prose { max-width: var(--max-width); }
.wrap.prose > * { max-width: var(--prose-width); }
.wrap.prose > h1 { max-width: 18ch; }

/* Nav CTA keeps white text regardless of nav link colour rules. */
nav.primary-nav a.nav-cta,
.mobile-menu a.nav-cta { color: var(--action-text); }

/* On phones the SVG labels get too small: hide them and show one HTML line. */
.flow-labels-mobile { display: none; }
@media (max-width: 859px) {
  .flow-line text { display: none; }
  .flow-labels-mobile { display: block; margin: 12px 0 0; color: var(--on-dark-muted); font-size: 15px; font-weight: 600; }
}

/* Form controls don't inherit the page font by default. */
button, select, input, textarea { font-family: inherit; }
.nav-cta { font-family: var(--font-display); }

/* Mobile menu links sit in a real list (screen readers announce "list, 3 items"). */
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
