/* =========================================================
   PROJECT H.O.O.D. — SITE DESIGN SYSTEM
   Source of truth: PH Visual Identity Guide V1 (09/30/21)
   ========================================================= */

/* ---- 1. TOKENS -------------------------------------------------- */
:root {
  /* Brand palette — 9-color system */
  --green:     #006a63;
  --red:       #ef4032;
  --blue:      #3face1;
  --lightblue: #91c7ec;
  --yellow:    #fbe14c;
  --purple:    #712f6b;
  --offwhite:  #e2e4e1;
  --black:     #231f21;
  --white:     #ffffff;

  /* Neutrals + utilities */
  --ink:      #231f21;
  --muted:    #6f6f71;
  --line:     #d7d8d4;
  --bg:       #f6f5f1;
  --gold:     #8a6d00;   /* darkened brand-yellow — accessible text/accents on light */

  /* Typography */
  --font-display: 'Oswald', 'Arial Narrow', sans-serif; /* Akkordeon substitute */
  --font-serif:   'Zilla Slab', Georgia, serif;          /* Freight Micro substitute */
  --font-mono:    'Montserrat', -apple-system, sans-serif;

  /* Scale */
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(30px, 4.5vw, 50px);
  --fs-h3: clamp(22px, 2.8vw, 30px);
  --fs-lead: clamp(16px, 1.6vw, 19px);
  --fs-body: 16px;

  /* Rhythm */
  --sp-1: 6px;
  --sp-2: 12px;
  --sp-3: 20px;
  --sp-4: 36px;
  --sp-5: 60px;
  --sp-6: 96px;

  /* Max widths */
  --w-page: 1200px;
  --w-read: 720px;
}

/* ---- 2. RESET + BASE ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 var(--sp-3);
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 20px; }
h5 { font-size: 15px; letter-spacing: 0.08em; }
p  { margin: 0 0 var(--sp-3); }

/* Layout primitives */
.wrap { width: 100%; max-width: var(--w-page); margin: 0 auto; padding: 0 var(--sp-4); }
.section { padding: var(--sp-5) 0; }
.section-sm { padding: var(--sp-4) 0; }
.section-lg { padding: var(--sp-6) 0; }

/* ---- 3. NAV / HEADER ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: 14px var(--sp-4);
  max-width: var(--w-page); margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo .wordmark {
  font-family: var(--font-display);
  font-weight: 700; font-size: 15px;
  letter-spacing: 0.05em; line-height: 1;
  text-transform: uppercase;
}
.nav-logo .wordmark small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: 0.08em; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-display);
  font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink); text-decoration: none;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-links a:hover { color: var(--red); border-bottom-color: var(--red); }
.nav-links a.active { color: var(--red); border-bottom-color: var(--red); }
.nav-links .donate {
  background: var(--red); color: var(--white) !important;
  padding: 10px 18px; margin-left: 8px;
  border-bottom: none !important;
  font-weight: 700;
}
.nav-links .donate:hover { background: var(--black); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column; align-items: stretch;
    padding: 16px var(--sp-4);
    border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .donate { margin: 10px 0 0; text-align: center; }
}

/* ---- 4. BUTTONS ------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 26px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-primary:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.btn-secondary { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-secondary:hover { background: var(--green); border-color: var(--green); color: var(--white); }
.btn-yellow { background: var(--yellow); color: var(--black); border-color: var(--yellow); }
.btn-yellow:hover { background: var(--black); color: var(--yellow); border-color: var(--yellow); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }

/* ---- 5. HIGHLIGHT / ACCENT UTILITIES --------------------------- */
.hl-red, .hl-yellow, .hl-blue, .hl-green {
  display: inline-block;
  padding: 2px 10px;
  line-height: 1;
  transform: rotate(-1.5deg);
}
.hl-red    { background: var(--red);    color: var(--white); }
.hl-yellow { background: var(--yellow); color: var(--black); }
.hl-blue   { background: var(--blue);   color: var(--white); }
.hl-green  { background: var(--green);  color: var(--white); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
  color: var(--red); margin-bottom: var(--sp-2);
}

/* ---- 6. COMPONENT — STAMP LOGO (tilt) -------------------------- */
.stamp {
  display: inline-block;
  transform: rotate(-6deg);
  transition: transform .2s;
}
.stamp:hover { transform: rotate(-3deg) scale(1.03); }
.stamp img { width: 120px; height: auto; }

/* ---- 7. COMPONENT — ACRONYM TAPE ------------------------------- */
.acronym-tape {
  background: var(--yellow);
  padding: 18px 0;
  overflow: hidden;
  border-top: 2px solid var(--black);
  border-bottom: 2px solid var(--black);
}
.acronym-tape .inner {
  display: flex; align-items: center; justify-content: center;
  gap: 40px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 22px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--black);
  flex-wrap: wrap;
  padding: 0 var(--sp-4);
}
.acronym-tape .word strong { color: var(--red); display: inline-block; }
.acronym-tape .dot { color: var(--red); font-size: 28px; }

/* ---- 8. COMPONENT — STAT GRID ---------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--line);
  border: 2px solid var(--line);
}
.stat {
  background: var(--white);
  padding: 28px 20px;
  text-align: left;
}
.stat .v {
  font-family: var(--font-display);
  font-weight: 700; font-size: 44px; line-height: 1;
  color: var(--ink);
}
.stat .l {
  font-family: var(--font-serif);
  font-size: 13.5px; line-height: 1.45; color: var(--muted);
  margin-top: 8px;
}
.stat.accent-green { background: var(--green); color: var(--white); }
.stat.accent-green .v, .stat.accent-green .l { color: var(--white); }
.stat.accent-red   { background: var(--red); color: var(--white); }
.stat.accent-red   .v, .stat.accent-red .l { color: var(--white); }
.stat.accent-blue  { background: var(--blue); color: var(--white); }
.stat.accent-blue  .v, .stat.accent-blue .l { color: var(--white); }
.stat.accent-yellow { background: var(--yellow); }
@media (max-width: 800px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- 9. COMPONENT — PROGRAM TAG ------------------------------- */
.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  padding: 4px 10px;
  border: 1.5px solid;
}
.tag-green { color: var(--green); border-color: var(--green); }
.tag-red { color: var(--red); border-color: var(--red); }
.tag-blue { color: var(--blue); border-color: var(--blue); }
.tag-purple { color: var(--purple); border-color: var(--purple); }
.tag-yellow { color: var(--gold); border-color: var(--yellow); background: var(--yellow); }
.tag-black { color: var(--ink); border-color: var(--ink); }

/* ---- 10. COMPONENT — PROGRESS BAR ----------------------------- */
.progress {
  background: var(--offwhite);
  border: 2px solid var(--black);
  height: 46px;
  position: relative;
  overflow: hidden;
}
.progress-fill {
  background: var(--green);
  height: 100%;
  display: flex; align-items: center; padding-left: 16px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px;
  letter-spacing: 0.08em;
}

/* ---- 11. CARD — content blocks -------------------------------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--sp-4);
  display: flex; flex-direction: column;
}
.card-accent { border-top: 6px solid var(--red); }
.card h3 { font-size: 22px; margin-bottom: var(--sp-2); }

/* Program card with color bar */
.prog-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border-left: 6px solid var(--red);
  padding: var(--sp-4);
  transition: transform .15s, box-shadow .15s;
}
.prog-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.prog-card.pg-green { border-left-color: var(--green); }
.prog-card.pg-blue  { border-left-color: var(--blue); }
.prog-card.pg-purple { border-left-color: var(--purple); }
.prog-card.pg-yellow { border-left-color: var(--gold); }

/* ---- Responsive 16:9 video embed --------------------------------- */
.video-frame {
  position: relative; width: 100%; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.video-frame iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* ---- 12. HERO variants ---------------------------------------- */
.hero {
  padding: var(--sp-6) 0;
  background: var(--black);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero h1 { color: var(--white); }
.hero p.lead {
  font-family: var(--font-serif);
  font-size: var(--fs-lead);
  max-width: 620px;
  opacity: 0.9;
}
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-5);
  align-items: center;
}
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; } }

/* Decorative stamp placement */
.hero .stamp-corner {
  position: absolute;
  right: 40px; bottom: -10px;
  opacity: 0.95;
}
@media (max-width: 860px) { .hero .stamp-corner { display: none; } }

/* ---- 13. BACKGROUND utilities --------------------------------- */
.bg-red { background: var(--red); color: var(--white); }
.bg-red h1, .bg-red h2, .bg-red h3 { color: var(--white); }
.bg-green { background: var(--green); color: var(--white); }
.bg-green h1, .bg-green h2, .bg-green h3 { color: var(--white); }
.bg-blue { background: var(--blue); color: var(--white); }
.bg-blue h1, .bg-blue h2, .bg-blue h3 { color: var(--white); }
.bg-yellow { background: var(--yellow); color: var(--black); }
.bg-offwhite { background: var(--offwhite); }
.bg-bg { background: var(--bg); }
.bg-black { background: var(--black); color: var(--white); }
.bg-black h1, .bg-black h2, .bg-black h3 { color: var(--white); }
.bg-purple { background: var(--purple); color: var(--white); }
.bg-purple h1, .bg-purple h2, .bg-purple h3 { color: var(--white); }

/* ---- 14. IMAGE placeholder (lets staff swap in photos later) -- */
.img-ph {
  background-image: repeating-linear-gradient(135deg, #e6e5df 0 10px, #d8d7d2 10px 20px);
  border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  min-height: 260px;
  text-align: center; padding: 20px;
}
.img-ph.dark {
  background-image: repeating-linear-gradient(135deg, #2d2d2f 0 10px, #232325 10px 20px);
  color: rgba(255,255,255,.55);
  border-color: #333;
}

/* ---- 15. TESTIMONIAL ------------------------------------------ */
.testimonial {
  background: var(--black); color: var(--white);
  padding: var(--sp-5) var(--sp-4);
  border-left: 8px solid var(--yellow);
}
.testimonial blockquote {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.35;
  margin: 0 0 var(--sp-3);
  font-style: italic;
}
.testimonial cite {
  font-family: var(--font-display);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 13px;
  color: var(--yellow);
}

/* ---- 16. CTA strip -------------------------------------------- */
.cta-strip {
  background: var(--red);
  color: var(--white);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
}
.cta-strip h2 { color: var(--white); margin-bottom: var(--sp-3); }
.cta-strip .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- 17. FOOTER ----------------------------------------------- */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: var(--sp-5) 0 var(--sp-4);
}
.site-footer a { color: var(--white); text-decoration: none; opacity: 0.85; }
.site-footer a:hover { color: var(--yellow); opacity: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-4);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-4); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h5 {
  color: var(--yellow);
  font-size: 12px; letter-spacing: 0.14em;
  margin-bottom: var(--sp-2);
}
.site-footer p, .site-footer ul {
  font-family: var(--font-serif);
  font-size: 14px; line-height: 1.7;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer .nl-input {
  display: flex; gap: 6px; margin-top: 10px;
}
.site-footer .nl-input input {
  flex: 1; padding: 10px 12px;
  border: 1px solid #444; background: #1a1718; color: var(--white);
  font-family: var(--font-serif); font-size: 14px;
}
.site-footer .nl-input button {
  background: var(--yellow); color: var(--black);
  border: none; padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
}
.footer-bottom {
  border-top: 1px solid #2e2b2c;
  padding-top: var(--sp-3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-serif);
  font-size: 12.5px; color: #a0a0a0;
}
.footer-bottom a { color: #a0a0a0; }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid #4a4647; border-radius: 999px;
  font-family: var(--font-display); font-size: 12px;
  text-decoration: none;
}
.social-row a:hover { border-color: var(--yellow); color: var(--yellow); }

/* ---- 18. GENERIC bits ----------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.callout-box {
  background: var(--offwhite);
  padding: var(--sp-3) var(--sp-4);
  border-left: 6px solid var(--red);
}
.callout-box.blue { border-left-color: var(--blue); }
.callout-box.green { border-left-color: var(--green); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--yellow); color: var(--black);
  padding: 10px 14px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---- 19. PREVIEW BANNER (removes after launch) ---------------- */
.preview-banner {
  background: var(--blue);
  color: var(--white);
  padding: 10px var(--sp-4);
  text-align: center;
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.preview-banner strong { color: var(--yellow); }

/* ---- 20. Print ------------------------------------------------- */
@media print {
  .site-header, .site-footer, .preview-banner, .nav-toggle { display: none; }
  body { background: var(--white); }
}

/* ---- 21. Mobile refinements (≤560px) -------------------------- */
@media (max-width: 560px) {
  /* Tighter side padding — gives more content room on 390px phones */
  .wrap { padding: 0 20px; }

  /* Reduce hero vertical space */
  .hero { padding: 48px 0; }

  /* Reduce section spacing */
  .section { padding: 40px 0; }
  .section-sm { padding: 28px 0; }
  .section-lg { padding: 56px 0; }

  /* Stat numbers: 44px is too wide for 2-col grid on 390px screens */
  .stat .v { font-size: 32px; }
  .stat { padding: 20px 14px; }

  /* Hide wordmark tagline — logo + name is enough in hamburger context */
  .nav-logo .wordmark small { display: none; }

  /* Acronym tape: tighten spacing */
  .acronym-tape .inner { gap: 18px; font-size: 18px; }
  .acronym-tape .dot { font-size: 22px; }

  /* Buttons: slightly smaller on tiny screens */
  .btn { padding: 12px 20px; font-size: 13px; }

  /* Footer bottom: stack on very small screens */
  .footer-bottom { flex-direction: column; gap: 14px; }

  /* Progress bar text */
  .progress-fill { font-size: 14px; padding-left: 10px; }

  /* Testimonial */
  .testimonial { padding: var(--sp-4) 20px; }

  /* Card padding */
  .card, .prog-card { padding: var(--sp-3); }

  /* Ensure images in grid-2 don't overflow */
  .grid-2 img, .hero-split img { max-width: 100%; }
}
