/* ===================================================================
   Hatch Carers — shared design system
   Used by every page. Page-specific layout lives in a small <style>
   block in each HTML file; everything reusable lives here.
=================================================================== */

:root{
  --forest:#137146;
  --green:#5DA569;
  --sage:#CBE6C6;
  --sage-tint:#EEF6EC;
  --deep-blue:#2A5F7A;
  --mid-blue:#97BFCC;
  --pale-blue:#D6EFF6;
  --warm-grey:#727A7C;
  --ink:#1B2620;
  --paper:#FFFFFF;
  --line: rgba(19,113,70,0.14);
  --max: 1160px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter','Helvetica Neue',Arial,sans-serif;
  font-size:17px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

h1,h2,h3,.display{
  font-family:'Manrope','Century Gothic',Arial,sans-serif;
  font-weight:800;
  line-height:1.12;
  letter-spacing:-0.01em;
  margin:0;
  color:var(--forest);
}
h3{ font-weight:600; color:var(--ink); }

p{ max-width:62ch; }
a{ color:inherit; }

.wrap{ max-width:var(--max); margin:0 auto; padding:0 32px; }
.wrap-narrow{ max-width:var(--max); margin:0 auto; padding:0 32px; } /* same left edge as .wrap; line length is limited by the text blocks themselves */

.eyebrow{
  font-family:'Inter',sans-serif;
  font-size:13.5px;
  font-weight:600;
  letter-spacing:0.02em;
  color:var(--warm-grey);
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:'';
  width:18px;
  height:2px;
  background:var(--green);
  display:inline-block;
  border-radius:2px;
}

.skip-link{
  position:fixed; top:-60px; left:16px; z-index:100;
  background:var(--forest); color:#fff;
  padding:12px 18px; border-radius:8px; font-weight:600;
  transition:top .2s ease;
}
.skip-link:focus{ top:16px; }

:focus-visible{
  outline:2.5px solid var(--deep-blue);
  outline-offset:3px;
  border-radius:3px;
}

/* ---------- header / nav ---------- */
header{
  position:sticky; top:0; z-index:40;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(10px) saturate(120%);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 32px;
  max-width:var(--max); margin:0 auto;
  gap:24px;
}
.logo-link{ display:flex; align-items:center; }
.logo-link img{ height:38px; width:auto; display:block; }

.nav-links{
  display:flex; align-items:center; gap:30px;
  list-style:none; margin:0; padding:0;
}
.nav-links a{
  text-decoration:none; font-size:15px; font-weight:500;
  color:var(--ink);
  padding:6px 2px; position:relative;
}
.nav-links a::after{
  content:''; position:absolute; left:0; right:0; bottom:0px; height:2px;
  background:var(--green); transform:scaleX(0); transform-origin:left;
  transition:transform .25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current]::after{ transform:scaleX(1); }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family:'Inter', sans-serif; font-weight:600; font-size:15px;
  padding:12px 22px; border-radius:8px;
  text-decoration:none; cursor:pointer; border:1.5px solid transparent;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space:nowrap;
}
.btn-primary{ background:var(--forest); color:#fff; }
.btn-cta{
  font-weight:700; padding:12px 26px;
  box-shadow:0 6px 16px -6px rgba(19,113,70,0.55);
}
.btn-cta:hover{ box-shadow:0 10px 22px -6px rgba(19,113,70,0.6); }
.btn-primary:hover{ background:#0E5C39; transform:translateY(-1px); }
.btn-ghost{ border-color:var(--line); color:var(--ink); background:transparent; }
.btn-ghost:hover{ border-color:var(--forest); }
.btn:disabled{ opacity:0.6; cursor:not-allowed; transform:none; }

.nav-cta{ display:flex; align-items:center; gap:12px; }
.nav-toggle{ display:none; }

/* ---------- generic page hero (non-home pages) ---------- */
.page-hero{
  position:relative;
  padding:96px 0 84px;
  background:linear-gradient(180deg, #DDEEDA 0%, var(--sage-tint) 100%);
  border-bottom:4px solid var(--green);
}
.page-hero-inner{ max-width:var(--max); margin:0 auto; padding:0 32px; }
.page-hero h1{ font-size:clamp(34px, 5vw, 54px); max-width:20ch; margin-top:20px; text-wrap:balance; }
.page-hero p{ margin:22px 0 0; font-size:18.5px; color:var(--ink); max-width:60ch; line-height:1.6; }

/* ---------- section shells ---------- */
section{ padding:84px 0; }
.section-head{ max-width:640px; margin:0 0 44px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head h2{ font-size:clamp(26px,3.2vw,38px); margin-top:14px; text-wrap:balance; }
.section-head p{ margin-top:16px; font-size:17px; color:var(--warm-grey); }

/* ---------- generic 4-up card grid (stats / values / chapters) ---------- */
.stat-grid, .chapter-grid, .value-list, .audience-grid, .partner-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:1px;
  background:var(--line);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}
.value-list{ background:none; border:none; gap:20px; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); }
.partner-grid{ grid-template-columns:repeat(3,1fr); background:none; border:none; gap:24px; }
.chapter-grid.three, .stat-grid.three{ grid-template-columns:repeat(3,1fr); }
.pillar-grid.three{ grid-template-columns:repeat(3,1fr); }
.chapter-grid.two{ grid-template-columns:repeat(2,1fr); }
.chapter-card .bullets{ margin:12px 0 0; padding-left:18px; font-size:14.5px; color:var(--warm-grey); }
.chapter-card .bullets li{ margin-bottom:6px; }
.chapter-card .card-output{ margin-top:14px; padding-top:12px; border-top:1px solid var(--line); font-size:14px; color:var(--ink); }
.chapter-card .card-output strong{ color:var(--forest); }
.note-small{ margin-top:28px; font-size:14.5px; color:var(--warm-grey); max-width:68ch; }
.status-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-top:8px; }
.status-card{ border-top:3px solid var(--green); padding:20px 4px 0; }
.status-card .status-tag{ font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--forest); }
.status-card h3{ font-size:17px; margin:6px 0 8px; }
.status-card p{ font-size:15px; color:var(--warm-grey); margin:0; }

.stat, .chapter-card, .value, .audience, .partner-card{
  background:var(--paper);
  padding:30px 26px;
}
.value{ border:1px solid var(--line); border-radius:14px; padding:24px 20px; }
.partner-card{ border:1px solid var(--line); border-radius:16px; padding:30px 26px; }

.stat-number{
  font-family:'Manrope', sans-serif; font-weight:800; font-size:clamp(30px,3.4vw,42px);
  color:var(--forest); line-height:1;
}
.stat-label{ margin-top:12px; font-size:14.5px; color:var(--ink); line-height:1.45; }
.stat-source{ margin:20px 0 0; font-size:12.5px; color:var(--warm-grey); }

.chapter-card h3{ font-size:17.5px; margin-bottom:10px; }
.chapter-card p{ font-size:15px; color:var(--warm-grey); margin:0; }
.chapter-card .num{
  font-family:'Manrope',sans-serif; font-weight:800; font-size:13px; color:var(--green);
  letter-spacing:0.04em; margin-bottom:10px; display:block;
}

.value h3{ font-size:16px; color:var(--forest); margin-bottom:8px; }
.value p{ font-size:14px; color:var(--warm-grey); margin:0; }

.audience .eyebrow{ color:var(--deep-blue); font-size:12.5px; }
.audience .eyebrow::before{ background:var(--deep-blue); }
.audience h3{ font-size:16.5px; margin:12px 0 8px; }
.audience p{ font-size:14px; color:var(--warm-grey); margin:0; }

.partner-card h3{ font-size:18px; margin:10px 0 10px; }
.partner-card p{ font-size:15px; color:var(--warm-grey); margin:0 0 18px; }
.partner-card .eyebrow{ color:var(--deep-blue); }
.partner-card .eyebrow::before{ background:var(--deep-blue); }

/* ---------- pillar-style 4-up (no shared border grid) ---------- */
.pillar-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:24px; margin-top:8px;
}
.pillar{ border-top:3px solid var(--green); padding:24px 4px 0; }
.pillar h3{ font-size:17.5px; margin-bottom:10px; }
.pillar p{ font-size:15px; color:var(--warm-grey); margin:0; }

/* ---------- flow / chain sequences ---------- */
.flow{
  display:flex; align-items:stretch; gap:0; margin-top:44px; flex-wrap:wrap;
}
.flow-step{
  flex:1 1 160px;
  background:var(--paper); border:1px solid var(--line); border-radius:14px;
  padding:22px 18px; text-align:center; position:relative;
}
.flow-step .flow-index{
  width:26px; height:26px; border-radius:50%; background:var(--forest); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700;
  margin:0 auto 12px;
}
.flow-step p{ font-size:14px; color:var(--ink); margin:0; max-width:none; line-height:1.4; }
.flow.five .flow-step{ flex:1 1 100px; padding:20px 10px; }
.flow.five .flow-step p{ font-size:13.5px; }
.flow.five .flow-arrow{ width:26px; }
.flow-arrow{
  display:flex; align-items:center; justify-content:center; flex:0 0 auto; width:34px;
  color:var(--green);
}
.flow-arrow svg{ width:20px; height:20px; }

/* ---------- loop (value returns to carers first, then branches outward) ---------- */
.loop-return{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin-top:22px; color:var(--warm-grey); font-size:14px; font-weight:600;
}
.loop-return svg{ width:18px; height:18px; color:var(--green); flex:none; }
.loop-branch{ margin-top:8px; display:flex; flex-direction:column; align-items:center; }
.loop-branch-connector{ width:2px; height:30px; background:var(--line); }
.loop-branch-card{
  max-width:480px; text-align:center;
  border:1px solid var(--line); border-radius:14px; padding:22px 26px;
  background:var(--pale-blue);
}
.loop-branch-card .eyebrow{ justify-content:center; color:var(--deep-blue); }
.loop-branch-card .eyebrow::before{ background:var(--deep-blue); }
.loop-branch-card h3{ margin:10px 0 8px; font-size:17px; }
.loop-branch-card p{ font-size:14.5px; color:var(--ink); margin:0 auto; max-width:44ch; }

/* ---------- insight chain (dark) ---------- */
.chain-dark{ background:var(--forest); color:#fff; }
.chain-dark h2{ color:#fff; }
.chain-dark .eyebrow{ color:var(--sage); }
.chain-dark .eyebrow::before{ background:var(--sage); }
.chain-dark .section-head p{ color:rgba(255,255,255,0.82); }
.chain-dark .flow-step{ background:rgba(255,255,255,0.06); border-color:rgba(255,255,255,0.18); }
.chain-dark .flow-step p{ color:#fff; }
.chain-dark .flow-step .flow-index{ background:var(--sage); color:var(--forest); }
.chain-dark .flow-arrow{ color:var(--sage); }

/* ---------- insight quote block ---------- */
.insight{ background:var(--forest); color:#fff; }
.insight .eyebrow{ color:var(--sage); }
.insight .eyebrow::before{ background:var(--sage); }
.insight-inner{ max-width:820px; text-align:left; }
.insight blockquote{
  margin:22px 0 0; font-family:'Manrope', sans-serif; font-weight:700;
  font-size:clamp(24px,3.4vw,34px); line-height:1.32; color:#fff;
}
.insight footer{
  all:unset; display:block; margin-top:18px; font-size:14.5px; color:var(--sage); font-weight:600;
}
.insight-body{ margin-top:28px; font-size:17px; color:rgba(255,255,255,0.86); max-width:64ch; }

/* ---------- CTA banner card (State of Foster Care, Partner with Hatch, etc) ---------- */
.cta-card{
  background:var(--sage-tint); border:1px solid var(--line); border-radius:20px;
  padding:44px; display:flex; align-items:center; justify-content:space-between; gap:32px;
  flex-wrap:wrap;
}
.cta-card h3{ font-size:22px; margin:12px 0 8px; }
.cta-card p{ font-size:15.5px; color:var(--warm-grey); margin:0; max-width:52ch; }
.cta-card .cta-actions{ flex:none; }

/* ---------- video ---------- */
.video-frame{
  border-radius:16px; overflow:hidden;
  border:1px solid var(--line);
  box-shadow:0 24px 50px -28px rgba(19,113,70,0.4);
  background:#000;
}
.video-frame video{ display:block; width:100%; height:100%; object-fit:cover; }

/* organic blob mask used behind the hero video */
.organic-figure{ width:100%; align-self:center; }
.hero-visual{
  position:relative;
  width:100%; max-width:440px;
  height:0; padding-top:100%;
  margin:0 auto;
}
.hero-blob-shadow{
  position:absolute;
  top:10%; left:9%; right:-7%; bottom:-7%;
  background:var(--forest);
  border-radius:58% 42% 39% 61% / 61% 44% 56% 39%;
  transform:rotate(-7deg);
}
.hero-blob-media{
  position:absolute;
  top:-4%; left:-4%; right:11%; bottom:11%;
  border-radius:42% 58% 61% 39% / 39% 61% 42% 58%;
  overflow:hidden;
  transform:rotate(4deg);
  box-shadow:0 18px 40px -18px rgba(19,113,70,0.45);
}
.hero-blob-media video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  transform:rotate(-4deg) scale(1.22);
}
.hero-play{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(19,38,32,0.18); cursor:pointer; border:none; padding:0;
  transform:rotate(-4deg) scale(1.22);
}
.hero-play svg{ width:56px; height:56px; filter:drop-shadow(0 6px 14px rgba(0,0,0,0.35)); }
.hero-play[data-playing="true"]{ display:none; }

/* ---------- team ---------- */
.team-grid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:32px; }
.team-card{
  background:var(--paper); border:1px solid var(--line); border-radius:16px;
  padding:28px; display:flex; gap:22px; align-items:flex-start;
}
.team-photo{
  width:96px; height:96px; border-radius:50%; object-fit:cover; flex:none;
  background:var(--sage); border:1px solid var(--line);
}
.team-name{ font-size:19px; margin-bottom:4px; }
.team-title{ font-size:13.5px; font-weight:600; color:var(--green); margin-bottom:12px; display:block; }
.team-bio p{ font-size:15px; color:var(--warm-grey); margin:0 0 12px; line-height:1.6; }
.team-bio p:last-child{ margin-bottom:0; }
.team-bio blockquote{
  margin:12px 0; padding-left:14px; border-left:2px solid var(--sage);
  font-style:italic; color:var(--ink); font-size:14.5px; line-height:1.6;
}

/* condensed team preview (used on homepage) */
.team-preview-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.team-preview-card{ text-align:center; }
.team-preview-card img{
  width:84px; height:84px; border-radius:50%; object-fit:cover; margin:0 auto 14px;
  background:var(--sage); border:1px solid var(--line); display:block;
}
.team-preview-card .team-name{ font-size:16px; margin-bottom:2px; }
.team-preview-card .team-title{ font-size:13px; margin-bottom:0; }

/* ---------- contact ---------- */
.contact-simple{ max-width:560px; margin:0 auto; text-align:center; }
.contact-simple h2{ font-size:clamp(26px,3vw,36px); margin-top:14px; }
.contact-simple p{ color:var(--warm-grey); font-size:16.5px; margin:16px auto 0; max-width:44ch; }
.contact-simple .btn{ margin-top:28px; }
.socials{ display:flex; gap:12px; margin-top:32px; justify-content:center; }
.social-link{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; text-decoration:none;
  transition:background .2s ease, border-color .2s ease;
}
.social-link:hover{ background:var(--forest); border-color:var(--forest); }
.social-link:hover svg{ stroke:#fff; }
.social-link svg{ width:16px; height:16px; stroke:var(--ink); transition:stroke .2s ease; }

/* ---------- footer ---------- */
footer{ padding:44px 32px 36px; border-top:1px solid var(--line); }
.footer-inner{
  max-width:var(--max); margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:16px;
}
.footer-mission{ font-family:'Manrope', sans-serif; font-weight:700; color:var(--forest); font-size:15px; }
.footer-meta{ font-size:13px; color:var(--warm-grey); display:flex; gap:20px; flex-wrap:wrap; }
.footer-meta a{ text-decoration:none; font-weight:600; color:var(--warm-grey); }
.footer-meta a:hover{ color:var(--forest); }

/* ---------- reveal-on-scroll ---------- */
.reveal{ opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px){
  .stat-grid, .chapter-grid{ grid-template-columns:repeat(2,1fr); }
  .chapter-grid.three, .stat-grid.three, .status-grid, .pillar-grid.three{ grid-template-columns:1fr; }
  .pillar-grid{ grid-template-columns:repeat(2,1fr); }
  .value-list{ grid-template-columns:repeat(2,1fr); }
  .audience-grid{ grid-template-columns:repeat(2,1fr); }
  .partner-grid{ grid-template-columns:1fr; }
  .team-preview-grid{ grid-template-columns:repeat(3,1fr); }
  .flow{ flex-direction:column; }
  .flow-arrow, .flow.five .flow-arrow{ transform:rotate(90deg); width:auto; height:28px; }
}

@media (max-width: 760px){
  .nav-links{
    position:fixed; inset:64px 16px auto 16px;
    background:var(--paper); border:1px solid var(--line); border-radius:14px;
    flex-direction:column; align-items:flex-start; padding:18px 22px; gap:16px;
    box-shadow:0 20px 50px -25px rgba(19,113,70,0.35);
    transform:translateY(-12px); opacity:0; pointer-events:none;
    transition:transform .2s ease, opacity .2s ease;
  }
  .nav-links.is-open{ transform:translateY(0); opacity:1; pointer-events:auto; }
  .nav-toggle{
    display:flex; align-items:center; justify-content:center;
    width:40px; height:40px; border-radius:8px; border:1px solid var(--line);
    background:transparent; cursor:pointer;
  }
  .nav-toggle svg{ width:20px; height:20px; stroke:var(--ink); }
  .page-hero{ padding:56px 0 48px; }
  section{ padding:60px 0; }
  .wrap, .wrap-narrow, .nav, .page-hero-inner{ padding-left:20px; padding-right:20px; }
  .stat-grid, .pillar-grid, .value-list, .audience-grid, .chapter-grid, .chapter-grid.two{ grid-template-columns:1fr; }
  .team-grid{ grid-template-columns:1fr; }
  .team-preview-grid{ grid-template-columns:1fr; }
  .team-card{ flex-direction:column; align-items:center; text-align:center; }
  .team-bio blockquote{ text-align:left; }
  .cta-card{ flex-direction:column; align-items:flex-start; }
}
