/* ==========================================================================
   Street Mental Health Coalition — main stylesheet
   Design language: cartographic/wayfinding, drawn from the SMHC logo
   (a brain rendered as a city street map: ink navy, river teal,
   parkland green, waypoint clay, street gray, map paper).
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F5F1;      /* map paper — page background */
  --card: #FFFFFF;
  --ink: #1B2A3A;        /* ink navy — headings, footer */
  --body-color: #2E3E49;
  --muted: #55656E;
  --line: #DCE0DA;
  --line-strong: #C4CBC2;
  --teal: #2A6F7F;       /* river teal — accents */
  --teal-ink: #235E6B;   /* links (AA on paper/white) */
  --teal-wash: #E7F0F1;
  --green: #5B7F57;      /* parkland — decorative */
  --green-ink: #42603E;
  --green-wash: #EAF0E8;
  --clay: #B04A22;       /* waypoint — primary CTA (AA w/ white) */
  --clay-dark: #933C1A;
  --clay-wash: #F7EBE4;
  --band-text: #E8EEF0;
  --band-muted: #9FB4BC;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(27, 42, 58, .05), 0 4px 16px rgba(27, 42, 58, .06);
  --container: 71rem;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body-color);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .6em; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(2.15rem, 1.2rem + 3.4vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.25rem); }
h3 { font-family: var(--sans); font-weight: 650; font-size: 1.22rem; line-height: 1.3; }
h4 { font-family: var(--sans); font-weight: 650; font-size: 1.02rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
strong { color: var(--ink); font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
:target { scroll-margin-top: 6rem; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }

.eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: .9rem;
}
.band .eyebrow, footer .eyebrow { color: var(--band-muted); }

.lede { font-size: clamp(1.1rem, 1rem + .5vw, 1.28rem); color: var(--muted); max-width: 62ch; }

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  padding: .78rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--clay); color: #fff; border-color: var(--clay); }
.btn-primary:hover { background: var(--clay-dark); border-color: var(--clay-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.band .btn-outline, footer .btn-outline { color: var(--band-text); border-color: var(--band-muted); }
.band .btn-outline:hover, footer .btn-outline:hover { background: var(--band-text); color: var(--ink); border-color: var(--band-text); }
.btn-group { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " \2192"; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 245, 241, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  padding-block: .5rem;
}
.brand img { width: 44px; height: 44px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 550;
  font-size: 1.13rem;
  line-height: 1.15;
  max-width: 13ch;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: .55rem .6rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 2vw, 1.7rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a:not(.btn) {
  text-decoration: none;
  color: var(--body-color);
  font-weight: 550;
  font-size: .97rem;
  padding: .35rem .1rem;
}
.site-nav a:not(.btn):hover { color: var(--teal-ink); }
.site-nav a[aria-current="page"] {
  color: var(--teal-ink);
  box-shadow: 0 2px 0 0 var(--teal);
}
.site-nav .btn { padding: .55rem 1.1rem; font-size: .95rem; }
.nav-short { display: none; }

/* Between the burger breakpoint and the container's own max-width, full
   labels ("Conference 2027", "Join the Coalition") would wrap mid-word
   before there's room for them — swap to short labels here instead of
   collapsing to the burger menu this early. */
@media (min-width: 48em) and (max-width: 74.9em) {
  .site-nav .nav-full { display: none; }
  .site-nav .nav-short { display: inline; }
}

@media (max-width: 47.9em) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .6rem 1.2rem 1.2rem;
  }
  .site-nav li { margin: 0; }
  .site-nav a:not(.btn) { display: block; padding: .8rem .2rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 0 var(--teal); padding-left: .8rem; }
  .site-nav .btn { display: block; text-align: center; margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 8vw, 6rem); }
/* .section-tight's padding-block loses to .hero's above by source order
   alone when both classes land on the same element — restate it here so
   the shorter sub-page heroes (About, Conference, Resources, Contact,
   Donate) actually get the tighter spacing they're asking for. */
.hero.section-tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.hero-grid {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 56em) {
  .hero-grid { grid-template-columns: 11fr 9fr; }
}
.hero h1 { max-width: 17ch; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-photo {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}
.hero-caption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }

/* Photographic background variant (Conference page, Call for Sessions
   section) — a dark scrim over the photo guarantees legible text
   regardless of what's underneath; text colors mirror the .band
   treatment since the background is effectively dark. Named distinctly
   from .hero-photo (the <img> class used on the home page hero) to avoid
   colliding with its aspect-ratio. Position is "center top" so cover-mode
   scaling only ever crops from the bottom, never the top, of the photo. */
.hero-bg-photo {
  background-image: linear-gradient(180deg, rgba(27,42,58,.60) 0%, rgba(27,42,58,.46) 55%, rgba(27,42,58,.66) 100%), url('/assets/img/photos/la-skyline.jpg');
  background-size: cover;
  background-position: center top;
  color: var(--band-text);
}
@supports (background-image: image-set(url('/assets/img/photos/la-skyline.webp') type('image/webp'))) {
  .hero-bg-photo {
    background-image: linear-gradient(180deg, rgba(27,42,58,.60) 0%, rgba(27,42,58,.46) 55%, rgba(27,42,58,.66) 100%), image-set(url('/assets/img/photos/la-skyline.webp') type('image/webp'), url('/assets/img/photos/la-skyline.jpg') type('image/jpeg'));
  }
}
.hero-bg-photo .eyebrow { color: var(--band-muted); }
.hero-bg-photo h1, .hero-bg-photo h2 { color: #fff; }
.hero-bg-photo .lede { color: var(--band-text); margin-bottom: 1.1rem; }
.hero-bg-photo p { color: var(--band-text); }
.hero-bg-photo strong { color: #fff; }
.hero-bg-photo a:not(.btn) { color: #A9D3DC; }
.hero-bg-photo a:not(.btn):hover { color: #fff; }
.hero-bg-photo .btn-outline { color: var(--band-text); border-color: var(--band-muted); }
.hero-bg-photo .btn-outline:hover { background: var(--band-text); color: var(--ink); border-color: var(--band-text); }
.hero-bg-photo .fact { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(3px); }
.hero-bg-photo .fact-label { color: var(--band-muted); }
.hero-bg-photo .fact-value { color: #fff; }
.hero-bg-photo .fact-value small { color: var(--band-text); }
/* .notice is an opaque light card — reset its own contents back to normal
   dark-on-light colors regardless of the ancestor's light-text rules above. */
.hero-bg-photo .notice, .hero-bg-photo .notice p, .hero-bg-photo .notice strong { color: var(--body-color); }
.hero-bg-photo .notice strong { color: var(--ink); }
.hero-bg-photo .notice a:not(.btn) { color: var(--teal-ink); }
.hero-bg-photo .notice a:not(.btn):hover { color: var(--ink); }

/* ---------- Navy band ---------- */
.band {
  background: var(--ink);
  color: var(--band-text);
  position: relative;
  overflow: hidden;
}
.band h2, .band h3 { color: #fff; }
.band p, .band li { color: var(--band-text); }
.band strong { color: #fff; }
.band .muted, .band small { color: var(--band-muted); }
.band a:not(.btn) { color: #A9D3DC; }
.band a:not(.btn):hover { color: #fff; }
.band .container { position: relative; }
.band-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ---------- Cards & grids ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: .2rem; }
.card-grid { display: grid; gap: 1.3rem; }
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62em) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card .waypoint {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.waypoint-teal { background: var(--teal-wash); color: var(--teal-ink); }
.waypoint-green { background: var(--green-wash); color: var(--green-ink); }
.waypoint-clay { background: var(--clay-wash); color: var(--clay-dark); }

.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 56em) {
  .split { grid-template-columns: 1fr 1fr; }
  .split > .order-first { order: -1; }
}
.split img { border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.stat { border-left: 3px solid var(--teal); padding-left: 1.1rem; }
.stat-number { font-family: var(--serif); font-weight: 550; font-size: 2.4rem; color: var(--ink); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .95rem; }
.band .stat-number { color: #fff; }
.band .stat-label { color: var(--band-muted); }
.band .stat { border-left-color: #4A93A5; }

/* ---------- People ---------- */
.people-grid {
  display: grid;
  gap: 1.6rem 1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}
@media (min-width: 40em) { .people-grid { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); } }
.person { text-align: left; }
.person img, .person .avatar-fallback {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--card);
  margin-bottom: .7rem;
}
.person .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2.2rem;
  color: var(--teal-ink);
  background: var(--teal-wash);
}
.person-name { font-weight: 650; color: var(--ink); font-size: 1rem; line-height: 1.3; margin-bottom: .15rem; }
.person-role { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.person-role span { display: block; margin-bottom: .25rem; }

/* ---------- Partner logos ---------- */
.logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  min-height: 6.5rem;
}
.logo-chip img { max-height: 4.5rem; width: auto; }
.logo-chip-full {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.logo-chip-full img { width: 100%; height: auto; display: block; }

/* ---------- Notices & tags ---------- */
.notice {
  background: var(--teal-wash);
  border: 1px solid #BFD8DC;
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem;
  margin-block: 1.5rem;
}
.notice p:last-child { margin-bottom: 0; }
.tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .04em;
  padding: .22rem .7rem;
  border-radius: 99px;
  background: var(--green-wash);
  color: var(--green-ink);
  margin-bottom: .8rem;
}
.tag-teal { background: var(--teal-wash); color: var(--teal-ink); }
.tag-clay { background: var(--clay-wash); color: var(--clay-dark); }

.placeholder-flag {
  background: #FBF3D8;
  border: 1px dashed #C9A93C;
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  font-size: .93rem;
  color: #5C4A0E;
}

/* ---------- Resources ---------- */
.resource-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.1rem; }
.resource {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}
.resource h3 { font-family: var(--serif); font-weight: 550; font-size: 1.3rem; margin-bottom: .3rem; }
.resource h3 a { color: var(--ink); text-decoration: none; }
.resource h3 a:hover { color: var(--teal-ink); text-decoration: underline; }
.resource-meta { font-size: .88rem; color: var(--muted); margin-bottom: .6rem; }
.resource p:last-of-type { margin-bottom: 0; }
.resource .external {
  font-size: .85rem;
  font-weight: 600;
  color: var(--teal-ink);
}

/* ---------- Schedule / definition rows ---------- */
.fact-row {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  margin-block: 2rem;
}
.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
}
.fact-label { font-size: .8rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.fact-value { font-family: var(--serif); font-weight: 550; font-size: 1.35rem; color: var(--ink); line-height: 1.25; }
.fact-value small { display: block; font-family: var(--sans); font-weight: 400; font-size: .9rem; color: var(--muted); margin-top: .2rem; }

/* ---------- Forms ---------- */
form { max-width: 40rem; }
.form-row { margin-bottom: 1.25rem; }
label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .97rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--body-color);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .7rem .9rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
textarea { min-height: 9rem; resize: vertical; }
.form-note { font-size: .9rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--band-text);
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 4px solid var(--teal);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 3.2rem 2.4rem;
}
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; } }
.site-footer h2 { color: #fff; font-family: var(--sans); font-size: .85rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer-brand img { width: 52px; height: 52px; }
.footer-brand span { font-family: var(--serif); font-size: 1.25rem; color: #fff; line-height: 1.2; max-width: 14ch; }
.footer-mission { color: var(--band-muted); font-size: .97rem; max-width: 42ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--band-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(159, 180, 188, .25);
  padding-block: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--band-muted);
}
.footer-bottom a { color: var(--band-muted); }

/* ---------- Utilities ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.mw-prose { max-width: 68ch; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.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;
}
