/* CAMHN — camhn.org
   One stylesheet for every page. Tokens first, then base type, then
   page-building blocks in the order they appear top-to-bottom on a page. */

/* ---------- tokens ---------- */
:root {
  --olive: #34412f;         /* brand dark: hero, buttons, headings */
  --olive-deep: #232d20;    /* footer, hover on dark buttons */
  --oat: #f6f1e8;           /* page background */
  --oat-deep: #ebe3d6;      /* tinted sections */
  --sage: #dfe3d2;          /* soft accent band */
  --ink: #26201c;           /* body text */
  --ink-soft: #5c524a;      /* secondary text */
  --terracotta: #c4613a;    /* the one warm accent: link underlines, step numerals, focus rings */
  --terracotta-deep: #a84e2b;
  --apricot: #e9a97a;       /* primary CTA on the dark background (dark text on it) */
  --apricot-deep: #dc9460;
  --line: rgba(38, 32, 28, 0.16);
  --line-on-dark: rgba(246, 241, 232, 0.22);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
  --radius: 4px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--terracotta); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; }
::selection { background: var(--apricot); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-weight: 400;
  color: var(--olive);
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.375rem; line-height: 1.25; font-variation-settings: "opsz" 36, "SOFT" 30; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); max-width: 36em; }
.theme-olive .lede { color: rgba(246, 241, 232, 0.84); }
.muted { color: var(--ink-soft); }
.text-sm { font-size: 0.9375rem; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.container-prose { max-width: 42em; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--olive); color: var(--oat);
  padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- top chrome / navbar ---------- */
.top-chrome {
  position: sticky; top: 0; z-index: 50;
  background: var(--oat);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top-chrome.scrolled { border-bottom-color: var(--line); }
.navbar { padding: 0.85rem 0; }
/* Same width as .container so the wordmark lines up with the hero headline. */
.nav-inner {
  width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.nav-logo {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1;
  font-weight: 500; font-size: 1.6rem; letter-spacing: 0.02em;
  color: var(--olive); text-decoration: none; line-height: 1;
}
.nav-logo small {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: 0.7rem; letter-spacing: 0.01em; color: var(--ink-soft); margin-top: 0.3rem;
}
/* Events list: a date line above each workshop title, Register button below. */
.event-when { font-family: var(--font-display); font-style: italic; font-variation-settings: "opsz" 36, "SOFT" 60; color: var(--terracotta-deep); margin-bottom: 0.35rem; }
.event-list .btn { margin-top: 0.9rem; }

/* Forms (the resource-suggestion form). Posts to Formspree via site.js. */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.4rem; }
.form-group input, .form-group textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--oat);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.85rem;
}
.form-group input:focus, .form-group textarea:focus { outline: 3px solid var(--terracotta); outline-offset: 2px; border-color: var(--olive); }
.form-group textarea { resize: vertical; min-height: 7rem; }
.form-note { font-size: 0.875rem; color: var(--ink-soft); margin-top: 0.5rem; }
.form .btn { margin-top: 0.5rem; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { padding: 1.5rem; background: var(--oat); border: 1px solid var(--line); border-radius: var(--radius); }
.form-success h3 { margin-bottom: 0.4rem; }
.form-success p { color: var(--ink-soft); }

/* Wordmark (nav + footer): "CAMHN" in Fraunces with a warm first letter. */
.mark-upper { font-weight: 600; letter-spacing: 0.04em; font-variation-settings: "opsz" 72, "SOFT" 0; }
.mark-accent { color: var(--terracotta); }
.footer-brand .mark-accent { color: var(--apricot); }
.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-link { text-decoration: none; font-weight: 500; color: var(--ink); padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.nav-link:hover, .nav-link.active { border-bottom-color: var(--terracotta); }
.nav-cta {
  text-decoration: none; font-weight: 600; color: var(--olive);
  border: 1.5px solid var(--olive); border-radius: var(--radius);
  padding: 0.5rem 1rem;
}
.nav-cta:hover { background: var(--olive); color: var(--oat); }
.nav-toggle {
  display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer;
  width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 6px;
}
.nav-toggle span { display: block; height: 2px; background: var(--olive); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--oat); border-bottom: 1px solid var(--line); padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .nav-link.active { border-bottom-color: var(--line); color: var(--olive); }
  .nav-cta { margin-top: 1rem; text-align: center; }
}

/* ---------- sections ---------- */
section { padding: var(--section-y) 0; }
.theme-oat { background: var(--oat); }
.theme-oat-deep { background: var(--oat-deep); }
.theme-sage { background: var(--sage); }
.theme-olive { background: var(--olive); color: var(--oat); }
.theme-olive h1, .theme-olive h2, .theme-olive h3 { color: var(--oat); }
.theme-olive .muted { color: rgba(246, 241, 232, 0.72); }
.theme-olive a { text-decoration-color: var(--apricot); }

/* The hero: one big statement, left-aligned, nothing else competing. */
.hero { padding: clamp(4rem, 10vw, 8.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }
.hero-facts {
  display: grid; gap: 1.5rem 2.5rem; margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2rem; border-top: 1px solid var(--line-on-dark);
}
.hero-facts > div { max-width: 28em; }
.hero-facts dt { font-weight: 600; margin-bottom: 0.3rem; }
.hero-facts dd { margin: 0; color: rgba(246, 241, 232, 0.8); }
@media (min-width: 760px) { .hero-facts { grid-template-columns: repeat(3, 1fr); } }

/* Editorial split: heading column on the left stays put while the content scrolls. */
.split { display: grid; gap: 2rem; }
@media (min-width: 880px) {
  .split { grid-template-columns: 4fr 7fr; gap: 3rem 5rem; }
  .split > :first-child { position: sticky; top: 6rem; align-self: start; }
}
.split .lede { margin-top: 1rem; }

/* Definition-style list: three things the network does. */
.offer-list { list-style: none; display: grid; gap: 2.25rem; }
.offer-list li { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.offer-list li:first-child { border-top: 0; padding-top: 0; }
.offer-list h3 { margin-bottom: 0.5rem; }
.offer-list p { color: var(--ink-soft); max-width: 36em; }

/* Steps: the real sequence of joining, so numerals earn their place. */
.steps { list-style: none; counter-reset: step; display: grid; gap: 2rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; align-items: start; }
.steps li::before {
  content: counter(step);
  font-family: var(--font-display); font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: 2.75rem; line-height: 1; color: var(--terracotta);
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--ink-soft); max-width: 34em; }
.theme-olive .steps p { color: rgba(246, 241, 232, 0.8); }

/* Two-up "who belongs" blocks. */
.who { display: grid; gap: 2rem; }
@media (min-width: 760px) { .who { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.who h3 { margin-bottom: 0.5rem; }
.who p { color: var(--ink-soft); }
.who ul { list-style: disc; padding-left: 1.2em; color: var(--ink-soft); margin-top: 0.75rem; }
.who li + li { margin-top: 0.3rem; }

/* Centered section heading used above a full-width grid (the three cards). */
.section-head { max-width: 40em; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .lede { margin-top: 0.75rem; }

/* Cards: the three kinds of gatherings. */
.cards { list-style: none; display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards li { background: var(--oat); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 2.5vw, 2.25rem); }
.cards h3 { margin-bottom: 0.35rem; }
.cards p { color: var(--ink-soft); }
.card-audience { font-family: var(--font-display); font-style: italic; font-variation-settings: "opsz" 36, "SOFT" 60; color: var(--olive); margin-bottom: 0.9rem; }

/* Closing band: sign in / looking for care. */
.band { display: grid; gap: 2.5rem; }
@media (min-width: 880px) { .band { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.band h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin-bottom: 0.75rem; }
.band p { max-width: 32em; }
.band .btn { margin-top: 1.25rem; }

/* Light page top (about/join/404) */
.page-top { padding-top: clamp(3rem, 7vw, 5.5rem); }
.page-top h1 { max-width: 18ch; }
.page-top .lede { margin-top: 1.5rem; }

/* Prose pages */
.prose h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); margin: 2.5rem 0 0.75rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1em; }
.prose li + li { margin-top: 0.35rem; }

/* FAQ */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-family: var(--font-display); font-variation-settings: "opsz" 36, "SOFT" 30;
  font-size: 1.25rem; color: var(--olive);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-body); font-weight: 400; font-size: 1.5rem; color: var(--terracotta-deep);
}
.faq details[open] summary::after { content: "–"; }
.faq .faq-body { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 40em; }

/* Placeholder marker — for copy Amy still needs to confirm. Search the HTML for
   class="todo" to find them all; delete the class once the text is real. */
.todo { background: rgba(233, 169, 122, 0.4); border-radius: 2px; padding: 0 0.2em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.4rem; border-radius: var(--radius); border: 1.5px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-apricot { background: var(--apricot); color: var(--ink); border-color: var(--apricot); }
.btn-apricot:hover { background: var(--apricot-deep); border-color: var(--apricot-deep); }
.btn-olive { background: var(--olive); color: var(--oat); border-color: var(--olive); }
.btn-olive:hover { background: var(--olive-deep); border-color: var(--olive-deep); }
.btn-outline { background: transparent; color: var(--olive); border-color: var(--olive); }
.btn-outline:hover { background: var(--olive); color: var(--oat); }
.theme-olive .btn-outline { color: var(--oat); border-color: rgba(246, 241, 232, 0.6); }
.theme-olive .btn-outline:hover { background: var(--oat); color: var(--olive); border-color: var(--oat); }

/* ---------- footer ---------- */
footer { background: var(--olive-deep); color: rgba(246, 241, 232, 0.84); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; } }
.footer-brand {
  font-family: var(--font-display); font-variation-settings: "opsz" 48, "SOFT" 100, "WONK" 1;
  font-weight: 500; font-size: 1.6rem; letter-spacing: 0.02em; color: var(--oat); text-decoration: none;
}
.footer-grid p { max-width: 30em; margin-top: 0.9rem; }
footer h2 { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 600; color: var(--oat); margin-bottom: 0.9rem; }
footer ul { list-style: none; }
.footer-nav ul { list-style: none; }
footer li + li { margin-top: 0.45rem; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-on-dark);
  font-size: 0.9375rem; color: rgba(246, 241, 232, 0.64);
}
.footer-bottom.bare { margin-top: 0; padding-top: 0; border-top: 0; }

/* 404 */
.not-found h1 { max-width: 14ch; }
.not-found .hero-actions { margin-top: 2rem; }
