/* =========================================================
   NISSP — National Institute for School Safety Policy
   Brand: Navy #0F2A55 · Gold #C9A24B · White #FFFFFF
   Type: Newsreader (editorial display serif) + Public Sans (body)
   ========================================================= */

:root {
  /* Palette */
  --navy: #0F2A55;
  --navy-900: #0a1d3d;
  --navy-700: #173b6e;
  --navy-600: #1d4a87;
  --navy-050: #eef2f8;
  --gold: #C9A24B;
  --gold-600: #b08c38;
  --gold-050: #faf5e9;
  --ink: #15233b;
  --slate: #4a5a72;
  --slate-light: #6b7a91;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-tint: #f1f5fb;
  --white: #ffffff;

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;

  --text-hero: clamp(2.6rem, 6vw, 4.6rem);
  --text-3xl: clamp(2.1rem, 4.5vw, 3.2rem);
  --text-2xl: clamp(1.7rem, 3.2vw, 2.4rem);
  --text-xl: clamp(1.35rem, 2.2vw, 1.7rem);
  --text-lg: 1.18rem;
  --text-base: 1.0625rem;
  --text-sm: 0.95rem;
  --text-xs: 0.82rem;

  /* Space */
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --maxw: 1180px;
  --maxw-narrow: 760px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 42, 85, 0.08), 0 1px 2px rgba(15, 42, 85, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 42, 85, 0.10);
  --shadow-lg: 0 20px 50px rgba(15, 42, 85, 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-600); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.12; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-weight: 600; }
p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--space-6); }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; }
section { padding-block: clamp(var(--space-16), 8vw, var(--space-32)); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gold-600);
  margin-bottom: var(--space-4);
  display: inline-block;
}
.eyebrow--light { color: var(--gold); }
.lead { font-size: var(--text-lg); color: var(--slate); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm);
  letter-spacing: 0.01em;
  padding: 0.85em 1.6em; border-radius: 8px; border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease); white-space: nowrap;
}
.btn--primary { background: var(--gold); color: var(--navy-900); border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-600); border-color: var(--gold-600); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--navy:hover { background: var(--navy-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); color: #fff; }
.btn-arrow { font-size: 1.1em; transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: var(--space-8);
}
.nav-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-shield { height: 48px; width: auto; }
.nav-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.nav-wordmark b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--navy); letter-spacing: -0.01em; }
.nav-wordmark span { font-family: var(--font-body); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em; color: var(--slate); text-transform: none; }
.nav-links { display: flex; align-items: center; gap: var(--space-6); list-style: none; }
.nav-links a {
  font-size: var(--text-sm); font-weight: 600; color: var(--ink);
  padding: 0.4em 0; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--gold); transition: width 0.25s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: var(--space-3); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: 0.3s var(--ease); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(105deg, var(--navy-900) 14%, rgba(10,29,61,0.86) 42%, rgba(15,42,85,0.55) 70%, rgba(15,42,85,0.30) 100%),
    url("/assets/hero.jpg") center right / cover no-repeat,
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy) 55%, var(--navy-700) 100%);
  color: #fff;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'%3E%3Cpath d='M0 30h60M30 0v60'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.25;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { padding-block: clamp(var(--space-20), 11vw, var(--space-32)); max-width: 880px; }
.hero h1 { color: #fff; font-size: var(--text-hero); font-weight: 600; letter-spacing: -0.02em; margin-bottom: var(--space-6); }
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero p { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: rgba(255,255,255,0.82); max-width: 640px; margin-bottom: var(--space-8); line-height: 1.55; }
.hero .hero-tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 2vw, 1.6rem); color: var(--gold); margin-bottom: var(--space-6); margin-top: calc(-1 * var(--space-2)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.hero-emblem { display: none; }
.hero-emblem svg { width: 100%; height: auto; }

/* page hero (interior, shorter) */
.page-hero {
  background:
    radial-gradient(900px 400px at 85% -20%, rgba(201,162,75,0.14), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy) 100%);
  color: #fff; padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  position: relative; overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: var(--text-3xl); margin-bottom: var(--space-4); max-width: 800px; }
.page-hero p { color: rgba(255,255,255,0.82); font-size: var(--text-lg); max-width: 680px; }
.crumb { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-weight: 700; margin-bottom: var(--space-4); }

/* ---------- Section headers ---------- */
.sec-head { max-width: 720px; margin-bottom: var(--space-12); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head p { color: var(--slate); font-size: var(--text-lg); margin-top: var(--space-4); }

/* ---------- Stat band ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8);
}
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--navy); font-weight: 600; line-height: 1; }
.stat .num .unit { color: var(--gold-600); }
.stat .label { font-size: var(--text-sm); color: var(--slate); margin-top: var(--space-3); line-height: 1.4; }
.band-navy { background: var(--navy); color: #fff; }
.band-navy .stat .num { color: #fff; }
.band-navy .stat .num .unit { color: var(--gold); }
.band-navy .stat .label { color: rgba(255,255,255,0.75); }
.band-soft { background: var(--bg-soft); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--space-8); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d3dcea; }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy-050); color: var(--navy); margin-bottom: var(--space-6);
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.card p { color: var(--slate); font-size: var(--text-base); }
.card .tag { display:inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-600); margin-bottom: var(--space-3); }

/* numbered / pillar list */
.pillar { display: flex; gap: var(--space-6); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
.pillar:last-child { border-bottom: none; }
.pillar .pn { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); font-weight: 600; flex-shrink: 0; width: 48px; line-height: 1.2; }
.pillar h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.pillar p { color: var(--slate); }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-20)); align-items: center; }
.split--narrow { grid-template-columns: 1.1fr 0.9fr; }
.split h2 { margin-bottom: var(--space-6); }
.split p { color: var(--slate); }
.feature-visual {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-700) 100%);
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: var(--space-12);
}
.feature-visual svg { width: 60%; height: auto; }
.feature-visual .emblem-img { width: 58%; height: auto; }
.hero-emblem .emblem-img { width: 100%; height: auto; }

/* checklist */
.checks { list-style: none; display: grid; gap: var(--space-4); margin-top: var(--space-6); }
.checks li { display: flex; gap: var(--space-3); align-items: flex-start; color: var(--ink); }
.checks li svg { flex-shrink: 0; margin-top: 3px; color: var(--gold-600); }
.checks li b { color: var(--navy); }

/* pull quote */
.pullquote {
  border-left: 4px solid var(--gold); padding-left: var(--space-8);
  font-family: var(--font-display); font-size: var(--text-2xl); color: var(--navy);
  line-height: 1.3; font-weight: 500; max-width: 880px;
}
.pullquote cite { display: block; font-family: var(--font-body); font-style: normal; font-size: var(--text-sm); color: var(--slate); font-weight: 600; margin-top: var(--space-6); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(800px 400px at 20% 120%, rgba(201,162,75,0.18), transparent 60%),
    linear-gradient(150deg, var(--navy-900), var(--navy));
  color: #fff; text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: var(--space-4); }
.cta-band p { color: rgba(255,255,255,0.82); font-size: var(--text-lg); max-width: 600px; margin: 0 auto var(--space-8); }
.cta-actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* ---------- Focus / domain chips ---------- */
.domain-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-4); }
.domain {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-6); transition: all 0.25s var(--ease);
}
.domain:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.domain h4 { color: var(--navy); margin-bottom: var(--space-2); font-family: var(--font-display); }
.domain p { font-size: var(--text-sm); color: var(--slate); margin: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: var(--space-8); }
.timeline::before { content:''; position:absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: var(--space-12); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content:''; position:absolute; left: calc(-1 * var(--space-8) + 1px); top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--gold); }
.tl-item .yr { font-family: var(--font-display); font-weight: 600; color: var(--navy); font-size: var(--text-lg); }
.tl-item h4 { margin: var(--space-2) 0; }
.tl-item p { color: var(--slate); font-size: var(--text-base); }

/* ---------- Funder tiers ---------- */
.tier { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-8); background: #fff; display: flex; flex-direction: column; }
.tier--feature { border-color: var(--gold); box-shadow: var(--shadow-md); position: relative; }
.tier--feature .ribbon { position:absolute; top: -12px; left: var(--space-8); background: var(--gold); color: var(--navy-900); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 6px; }
.tier .amount { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--navy); font-weight: 600; margin: var(--space-2) 0 var(--space-4); }
.tier h3 { font-size: var(--text-lg); }
.tier ul { list-style: none; display: grid; gap: var(--space-3); margin: var(--space-6) 0; }
.tier li { display:flex; gap: var(--space-3); font-size: var(--text-sm); color: var(--slate); }
.tier li svg { flex-shrink:0; color: var(--gold-600); margin-top:2px; }

/* ---------- Contact / form ---------- */
.contact-grid { display:grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(var(--space-8), 5vw, var(--space-20)); align-items:start; }
.form-card { background:#fff; border:1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(var(--space-8), 4vw, var(--space-12)); box-shadow: var(--shadow-sm); }
.field { margin-bottom: var(--space-6); }
.field label { display:block; font-size: var(--text-sm); font-weight:600; color: var(--navy); margin-bottom: var(--space-2); }
.field input, .field select, .field textarea {
  width:100%; font-family: var(--font-body); font-size: var(--text-base); color: var(--ink);
  padding: 0.8em 1em; border:1.5px solid var(--line); border-radius: 8px; background: var(--bg-soft);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color: var(--navy-600); background:#fff; box-shadow: 0 0 0 3px rgba(29,74,135,0.10); }
.field textarea { resize: vertical; min-height: 130px; }
.contact-detail { display:flex; gap: var(--space-4); padding: var(--space-6) 0; border-bottom:1px solid var(--line); }
.contact-detail:last-child { border-bottom:none; }
.contact-detail .ci { flex-shrink:0; width:44px; height:44px; border-radius:10px; background: var(--navy-050); color: var(--navy); display:grid; place-items:center; }
.contact-detail h4 { margin-bottom: 2px; font-family: var(--font-body); font-size: var(--text-base); }
.contact-detail p { font-size: var(--text-sm); color: var(--slate); margin:0; }
.form-note { font-size: var(--text-xs); color: var(--slate-light); margin-top: var(--space-4); }
.form-status { padding: var(--space-4); border-radius: 8px; font-size: var(--text-sm); font-weight:600; margin-bottom: var(--space-6); display:none; }
.form-status.ok { display:block; background: var(--gold-050); color: var(--gold-600); border:1px solid var(--gold); }
.form-status.err { display:block; background:#fdeaea; color:#b3261e; border:1px solid #f3c0bd; }

/* ---------- Prose (about/research detail) ---------- */
.prose { max-width: 720px; }
.prose h2 { font-size: var(--text-2xl); margin: var(--space-12) 0 var(--space-4); }
.prose h3 { font-size: var(--text-lg); margin: var(--space-8) 0 var(--space-3); font-family: var(--font-body); font-weight:700; color: var(--navy); }
.prose p { color: var(--slate); margin-bottom: var(--space-4); }
.prose ul { margin: 0 0 var(--space-6) var(--space-6); color: var(--slate); }
.prose li { margin-bottom: var(--space-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.72); padding-block: var(--space-16) var(--space-8); font-size: var(--text-sm); }
.footer-top { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-8); padding-bottom: var(--space-12); border-bottom:1px solid rgba(255,255,255,0.12); }
.footer-logo { height: 116px; width: auto; margin-bottom: var(--space-6); }
.footer-tagline { font-family: var(--font-display); font-style: italic; color: var(--gold); font-size: var(--text-base); margin-bottom: var(--space-4); max-width: 360px; }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 340px; font-size: var(--text-sm); }
.footer-col h5 { color:#fff; font-family: var(--font-body); font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-4); font-weight:700; }
.footer-col ul { list-style:none; display:grid; gap: var(--space-3); }
.footer-col a { color: rgba(255,255,255,0.72); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { display:flex; justify-content:space-between; align-items:center; gap: var(--space-4); padding-top: var(--space-8); flex-wrap:wrap; }
.footer-bottom p { color: rgba(255,255,255,0.5); font-size: var(--text-xs); margin:0; }
.footer-legal { display:flex; gap: var(--space-6); }
.footer-legal a { color: rgba(255,255,255,0.5); font-size: var(--text-xs); }

/* ---------- Reveal animation ---------- */
.reveal { opacity:0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity:1; transform:none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2,1fr); gap: var(--space-12) var(--space-8); }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .domain-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 820px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 76px; left:0; right:0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background:#fff; border-bottom:1px solid var(--line); box-shadow: var(--shadow-md); padding: var(--space-4) var(--space-6);
  }
  .nav.open .nav-links li { width:100%; }
  .nav.open .nav-links a { display:block; padding: var(--space-4) 0; border-bottom:1px solid var(--line); width:100%; }
  .split, .split--narrow, .grid-2, .grid-3, .contact-grid { grid-template-columns: 1fr; }
  .feature-visual { order: -1; }
  .pricing-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-4, .domain-grid { grid-template-columns: 1fr; }
  .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .cta-actions .btn { justify-content: center; }
}
