/* =================================================================
   Mental Health Task Force of Northwest Florida
   Shared design system
   Direction: calm, trustworthy, editorial-institutional with warmth
   ================================================================= */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ---- Tokens ---- */
:root {
  /* Brand */
  --navy:        #174067;
  --navy-deep:   #102f4c;
  --teal:        #55c3b0;
  --teal-text:   #2e8b7f; /* AA-safe teal for text on white */
  --teal-deep:   #237f72;
  --blue:        #2c73b6;
  --gold:        #e9a23b;
  --gold-deep:   #c9832a;
  --coral:       #e2725b;

  /* Neutrals */
  --paper:       #f7f5f0;
  --paper-2:     #efece4;
  --white:       #ffffff;
  --ink:         #1a2b3c;
  --ink-soft:    #44515f;
  --line:        #e3ddd1;
  --line-soft:   #ece7dc;

  /* Type */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --wrap: 1140px;
  --wrap-narrow: 820px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 14px 40px -18px rgba(16, 47, 76, .35);
  --shadow-sm: 0 6px 18px -10px rgba(16, 47, 76, .4);
  --ring: 0 0 0 3px rgba(44, 115, 182, .45);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  /* warm paper texture */
  background-image:
    radial-gradient(circle at 18% -10%, rgba(85,195,176,.10), transparent 38%),
    radial-gradient(circle at 100% 0%, rgba(44,115,182,.07), transparent 30%);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; color: var(--navy); margin: 0 0 .5em; letter-spacing: .005em; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 700; text-transform: uppercase; }
h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); font-weight: 600; }
p { margin: 0 0 1rem; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(3rem, 2rem + 5vw, 5.5rem) 0; }
.section--tint { background: var(--white); border-block: 1px solid var(--line-soft); }
.section--navy { background: var(--navy); color: #dce7f0; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.eyebrow {
  font-family: var(--body); font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .8rem; color: var(--teal-text); margin: 0 0 .6rem;
}
.section--navy .eyebrow { color: var(--teal); }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; }
.center .lead, .center .eyebrow { margin-inline: auto; }

/* ---- Skip link ---- */
.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px;
  transition: top .2s;
}
.skip:focus { top: 0; color: #fff; }

/* ---- Crisis bar ---- */
.crisisbar {
  background: var(--navy-deep); color: #eaf1f7;
  font-size: .95rem; text-align: center;
}
.crisisbar .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; align-items: center; justify-content: center; padding: .55rem 0; }
.crisisbar strong { color: #fff; }
.crisisbar a { color: var(--teal); font-weight: 700; text-decoration: none; white-space: nowrap; }
.crisisbar a:hover { color: #fff; text-decoration: underline; }
.crisisbar .sep { opacity: .4; }

/* ---- Header / nav ---- */
.masthead { position: sticky; top: 0; z-index: 100; background: rgba(247,245,240,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav-toggle {
  display: none; background: var(--navy); color: #fff; border: 0; border-radius: 8px;
  padding: .55rem .7rem; font-size: 1rem; cursor: pointer; align-items: center; gap: .5rem;
}
.nav { display: flex; }
.nav ul { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.nav a {
  display: block; font-family: var(--display); font-weight: 600; font-size: 1.18rem;
  text-transform: uppercase; letter-spacing: .03em; color: var(--navy);
  text-decoration: none; padding: .45rem .8rem; border-radius: 8px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--paper-2); color: var(--navy); }
.nav a[aria-current="page"] { color: var(--teal-deep); box-shadow: inset 0 -3px 0 var(--teal); }

/* ---- Buttons ---- */
.btn {
  --bg: var(--navy); --fg: #fff;
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 1.12rem; text-transform: uppercase; letter-spacing: .04em;
  background: var(--bg); color: var(--fg); border: 2px solid var(--bg);
  padding: .7rem 1.4rem; border-radius: 999px; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--fg); }
.btn--teal { --bg: var(--teal-deep); }
.btn--gold { --bg: var(--gold); --fg: #3a2706; border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.section--navy .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.section--navy .btn--ghost:hover { background: #fff; color: var(--navy); }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #1d4d78 0%, var(--navy) 55%, var(--navy-deep) 100%); color: #eaf2f8; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(closest-side at 85% 20%, rgba(85,195,176,.45), transparent),
    radial-gradient(closest-side at 12% 95%, rgba(44,115,182,.5), transparent);
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(3.5rem, 2rem + 8vw, 7rem) 0; max-width: 60rem; }
.hero .eyebrow { color: var(--teal); }
.hero h1 {
  color: #fff; font-size: clamp(2.6rem, 1.6rem + 5.4vw, 5rem); font-weight: 700;
  text-transform: uppercase; margin: 0 0 1rem; max-width: 18ch;
}
.hero p { font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); color: #cfe0ee; max-width: 52ch; }
.hero .cta-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card h3 { margin-top: 0; }
.card--link { display: block; text-decoration: none; color: inherit; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal); }
.card .tag {
  display: inline-block; font-family: var(--display); font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px;
  background: var(--paper-2); color: var(--navy);
}
.card .tag--stage { background: var(--teal); color: var(--navy-deep); }

/* CTA audience cards */
.cta-card { position: relative; border-top: 5px solid var(--teal); }
.cta-card:nth-child(2) { border-top-color: var(--blue); }
.cta-card:nth-child(3) { border-top-color: var(--gold); }
.cta-card .icon { font-size: 2rem; line-height: 1; margin-bottom: .6rem; }
.cta-card .go { font-family: var(--display); font-weight: 600; text-transform: uppercase; color: var(--teal-deep); letter-spacing: .03em; }

/* Project cards */
.project { display: flex; flex-direction: column; gap: .4rem; }
.project .links { margin-top: auto; padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }

/* ---- Document library ---- */
.docfilter { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 2rem; }
.docfilter input {
  flex: 1 1 240px; font: inherit; padding: .7rem 1rem; border: 1px solid var(--line);
  border-radius: 999px; background: #fff;
}
.docfilter input:focus-visible { box-shadow: var(--ring); }
.yeargroup { margin-bottom: 2.6rem; }
.yeargroup > h3 {
  font-size: 2rem; text-transform: uppercase; color: var(--navy);
  border-bottom: 3px solid var(--teal); padding-bottom: .25rem; margin-bottom: 1.3rem;
}
.catgroup { margin-bottom: 1.6rem; }
.catgroup h4 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  font-size: 1.15rem; color: var(--teal-deep); margin: 0 0 .7rem;
}
.doclist { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.doc {
  display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .8rem 1rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.doc:hover { border-color: var(--teal); transform: translateX(3px); box-shadow: var(--shadow-sm); color: var(--ink); }
.doc .ext {
  flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 8px;
  font-family: var(--display); font-weight: 700; font-size: .82rem; color: #fff; letter-spacing: .02em;
}
.ext-pdf { background: #c0392b; }
.ext-docx { background: var(--blue); }
.ext-pptx { background: #d35400; }
.doc .doc-title { font-weight: 600; line-height: 1.3; }
.doc .doc-meta { font-size: .85rem; color: var(--ink-soft); }
.doc-empty { color: var(--ink-soft); font-style: italic; display: none; }

/* ---- Timeline (About) ---- */
.timeline { position: relative; margin: 2rem 0 0; padding-left: 0; list-style: none; }
.tl-year { position: relative; padding: 0 0 2rem 2.2rem; border-left: 3px solid var(--teal); margin-left: .6rem; }
.tl-year:last-child { border-color: transparent; }
.tl-year::before {
  content: ""; position: absolute; left: -11px; top: .2rem; width: 19px; height: 19px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--paper);
}
.tl-year h3 { color: var(--navy); font-size: 1.7rem; margin: 0 0 .6rem; }
.tl-year ul { margin: 0; padding-left: 1.1rem; }
.tl-year li { margin-bottom: .5rem; }

/* ---- Hotlines (Get Help) ---- */
.hotline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; justify-content: space-between;
  background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--coral);
  border-radius: var(--radius); padding: 1.3rem 1.5rem;
}
.hotline.is-primary { border-left-color: var(--teal); background: linear-gradient(180deg, #fff, #f3faf8); }
.hotline .h-info h3 { margin: 0 0 .15rem; }
.hotline .h-info p { margin: 0; color: var(--ink-soft); }
.hotline .h-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem);
  color: var(--navy); text-decoration: none; white-space: nowrap;
}
.hotline .h-num:hover { color: var(--teal-deep); }

/* ---- Partner logos ---- */
.logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 2.5rem; }
.logos img { height: 56px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.logos img:hover { filter: none; opacity: 1; }

/* ---- Resource cards (with logo) ---- */
.resource { display: flex; flex-direction: column; gap: .6rem; }
.resource img { height: 50px; width: auto; }

/* ---- Infographic gallery ---- */
.info-card { text-align: left; }
.info-card .badge {
  display: inline-flex; align-items: center; gap: .4rem; font-family: var(--display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; color: var(--gold-deep); font-size: .85rem;
}

/* ---- Pledge ---- */
.pledge-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 1.5rem; }
.pledge-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; border-top: 5px solid var(--teal); }
.pledge-step .num { font-family: var(--display); font-weight: 700; font-size: 2.4rem; color: var(--teal-deep); line-height: 1; }

/* ---- Forms (Contact) ---- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  font: inherit; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: var(--ring); }
.form-note { font-size: .92rem; color: var(--ink-soft); }
.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.4rem; }
.alert--ok { background: #e7f6f1; border: 1px solid var(--teal); color: #155c50; }
.alert--err { background: #fdeceA; border: 1px solid var(--coral); color: #7d2a1c; }

/* ---- Subscribe ---- */
.subscribe { display: flex; flex-wrap: wrap; gap: .7rem; max-width: 520px; }
.subscribe input { flex: 1 1 220px; font: inherit; padding: .75rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; }
.subscribe input::placeholder { color: #b9cee0; }
.subscribe input:focus-visible { box-shadow: var(--ring); }

/* ---- Footer ---- */
.footer { background: var(--navy-deep); color: #aebfce; padding: 3rem 0 1.5rem; }
.footer a { color: #d6e3ef; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .cols { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
.footer img { height: 50px; margin-bottom: 1rem; }
.footer h4 { color: #fff; font-family: var(--display); text-transform: uppercase; letter-spacing: .05em; font-size: 1.15rem; margin: 0 0 .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer .colophon { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .9rem; }
.footer .colophon a { font-weight: 700; }

/* ---- Utilities ---- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack-sm > * + * { margin-top: .5rem; }
.muted { color: var(--ink-soft); }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
.reveal { transition: opacity .6s ease, transform .6s ease; }
[data-delay="1"] { transition-delay: .08s; }
[data-delay="2"] { transition-delay: .16s; }
[data-delay="3"] { transition-delay: .24s; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; inset: 100% 0 auto; background: var(--paper);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav.open { max-height: 70vh; }
  .nav ul { flex-direction: column; padding: .6rem 1.25rem 1.25rem; gap: .15rem; }
  .nav a { padding: .7rem .6rem; font-size: 1.3rem; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--teal); }
  .footer .cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
