/* Tucson Hope Factory — "Dusk Cinema" design system
   One file styles every page. Serif display (Newsreader) + sans body (Archivo),
   warm-dark bands, cream editorial sections, brand green reserved for CTAs. */

:root {
  /* Dusk Cinema tokens */
  --ink-darkest: #12100b;   /* footer */
  --ink-dark: #1c1610;      /* hero underlay, dark bands */
  --ink-warm: #241c13;      /* stat strip, CTA strips */
  --cream-page: #f4ecdd;    /* page background */
  --cream-bright: #fdf8ec;  /* headings on dark; cards/inputs on cream */
  --tan-panel: #ede1c8;     /* alt light sections, info cards */
  --hairline: #ddd0b6;      /* borders on cream */
  --input-border: #d8cbb0;
  --text-primary: #2b2118;
  --text-secondary: #54483a;
  --text-muted: #6b5d4d;
  --text-faint: #8a7a64;
  --dark-muted: #a99a82;    /* secondary text on dark */
  --dark-mid: #cbbfa9;
  --dark-soft: #e5d9c2;     /* paragraphs on dark */
  --dark-softer: #f0e8d5;
  --terracotta: #b45a33;    /* kickers on cream */
  --tan-accent: #e8b98a;    /* kickers on dark */
  --green: #76b82a;         /* primary CTA on dark */
  --green-dark: #5e9421;    /* CTA on cream, text links */
  --green-darker: #4d7a1b;
  --green-active: #a9d573;  /* active nav on dark */
  --cta-text: #161009;      /* text inside green buttons */
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --pad-x: 56px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--cream-page);
}

img, video, iframe { max-width: 100%; display: block; }

a { color: var(--green-dark); transition: background-color 150ms ease, color 150ms ease; }
a:hover { color: var(--green); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: pretty;
  margin: 0 0 18px;
}
h2 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad-x); }
.center { text-align: center; }

.kicker {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 14px;
}
.on-dark .kicker, .kicker.on-dark { color: var(--tan-accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  background: var(--green);
  color: var(--cta-text);
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--green-dark); color: var(--cta-text); }
.btn.on-cream { background: var(--green-dark); color: var(--cream-bright); }
.btn.on-cream:hover { background: var(--green-darker); color: var(--cream-bright); }
.btn.slim { padding: 14px 30px; }
.btn.big { font-size: 20px; padding: 20px 52px; }
.btn-outline {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--cream-bright);
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 999px;
  border: 2px solid var(--cream-bright);
  transition: background-color 150ms ease;
}
.btn-outline:hover { background: rgba(253, 248, 236, 0.12); color: var(--cream-bright); }
.btn-outline.on-cream { color: var(--text-primary); border-color: var(--text-primary); }
.btn-outline.on-cream:hover { background: rgba(43, 33, 24, 0.08); color: var(--text-primary); }
.text-link { font-weight: 700; color: var(--green-dark); text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--green); }

/* ---------- Header (overlaid on hero/banner) ---------- */
header.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
}
header.site-header.static-dark { position: static; background: var(--ink-dark); }
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 44px; width: auto; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.brand .wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
  color: var(--cream-bright);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
#nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-size: 1.7rem;
  padding: 4px 10px;
  color: var(--cream-bright);
  margin-left: auto;
}
nav.site-nav { margin-left: auto; }
.nav-backdrop { display: none; }
nav.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; align-items: center; }
nav.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  color: var(--cream-page);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
nav.site-nav a:hover { color: var(--green-active); }
nav.site-nav a.active { color: var(--green-active); font-weight: 700; }
nav.site-nav a.donate-btn {
  background: var(--green);
  color: var(--cta-text);
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  text-shadow: none;
}
nav.site-nav a.donate-btn:hover { background: var(--green-dark); color: var(--cta-text); }

/* The full nav labels (incl. Home and "Seattle Hope Factory Connection") need
   ~1230px in one row, so the hamburger kicks in earlier than the layout
   breakpoints. */
@media (max-width: 1230px) {
  .nav-toggle-label { display: block; position: relative; z-index: 30; }
  /* Dropdown panel under the header. position:fixed (not absolute) so the
     hero/banner's overflow:hidden can't clip it, with its own scrollbar for
     short screens. 96px = header height (26px padding x2 + 44px logo). */
  nav.site-nav {
    display: none;
    position: fixed;
    top: 96px; left: 0; right: 0;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ink-dark);
    padding: 10px 20px 18px;
    z-index: 15;
  }
  #nav-toggle:checked ~ nav.site-nav { display: block; }
  /* Tap anywhere outside the open menu to close it: a full-screen label tied
     to the same checkbox sits behind the panel, lightly dimming the page. */
  #nav-toggle:checked ~ .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10;
    background: rgba(18, 16, 11, 0.45);
    cursor: pointer;
  }
  /* Freeze the page while the menu is open - scrolling happens inside the
     menu panel only. */
  html:has(#nav-toggle:checked), body:has(#nav-toggle:checked) { overflow: hidden; }
  nav.site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav.site-nav a { display: block; padding: 12px 6px; text-shadow: none; }
  nav.site-nav a.donate-btn { text-align: center; margin-top: 8px; }
}

@media (max-width: 900px) {
  :root { --pad-x: 20px; }
}

/* ---------- Home hero ---------- */
.hero-home {
  position: relative;
  height: min(780px, 92vh);
  background: var(--ink-dark);
  overflow: hidden;
}
.hero-home video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.hero-home::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,14,8,0.55) 0%, rgba(20,14,8,0.15) 40%, rgba(20,14,8,0.75) 100%);
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 56px;
  z-index: 2;
}
.hero-content h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--cream-bright);
  max-width: 900px;
  margin: 0 0 28px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hero-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.5);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}
.hero-link:hover { color: var(--green-active); border-color: var(--green-active); }

/* ---------- Interior page banner ---------- */
.page-banner {
  position: relative;
  height: 440px;
  background: var(--ink-dark);
  overflow: hidden;
}
.page-banner.tall { height: 520px; }
.page-banner > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}
.page-banner.dim > img { opacity: 0.75; }
.page-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,14,8,0.55) 0%, rgba(20,14,8,0.2) 45%, rgba(20,14,8,0.7) 100%);
}
.page-banner.strong::after {
  background: linear-gradient(180deg, rgba(20,14,8,0.55) 0%, rgba(20,14,8,0.25) 45%, rgba(20,14,8,0.8) 100%);
}
.banner-content {
  position: absolute;
  left: 0; right: 0; bottom: 44px;
  z-index: 2;
}
.banner-content h1 {
  font-size: clamp(34px, 4.7vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream-bright);
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.banner-content h1.long { font-size: clamp(30px, 4vw, 52px); line-height: 1.08; max-width: 820px; }
.banner-content.center-stage { text-align: center; }
.banner-content.center-stage h1 { max-width: none; font-size: clamp(38px, 5vw, 64px); }
.banner-content.center-stage .sub {
  color: var(--dark-softer);
  font-size: 18px;
  margin: 14px 0 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

/* Dark header block (pages without banner imagery: blog, posts, 404) */
.dark-head {
  background: var(--ink-dark);
  position: relative;
  padding-top: 96px;
  padding-bottom: 56px;
}
.dark-head h1 {
  font-size: clamp(38px, 4.7vw, 60px);
  color: var(--cream-bright);
  margin: 0;
}

/* ---------- Stat strip ---------- */
.stat-strip { background: var(--ink-warm); }
.stat-strip .wrap {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-top: 34px;
  padding-bottom: 34px;
  flex-wrap: wrap;
}
.stat { display: flex; align-items: baseline; gap: 12px; }
.stat .num { font-family: var(--serif); font-size: 34px; color: var(--cream-bright); }
.stat .label { font-size: 14px; color: var(--dark-muted); max-width: 240px; line-height: 1.4; }

/* ---------- Sections & bands ---------- */
section { padding: 80px 0; }
section.tight { padding: 72px 0; }
section.roomy { padding: 88px 0; }
.band-dark { background: var(--ink-dark); color: var(--dark-soft); }
.band-dark h2 { color: var(--cream-bright); }
.band-tan { background: var(--tan-panel); }
.narrow { max-width: 860px; margin-left: auto; margin-right: auto; }
.narrow-wide { max-width: 940px; margin-left: auto; margin-right: auto; }

.lead-serif {
  font-family: var(--serif);
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.45;
  margin: 0 0 24px;
}
.lead-serif.small { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.5; }
.support { color: var(--text-secondary); }
.band-dark .support { color: var(--dark-muted); }
.muted { color: var(--text-muted); }
.small-note { font-size: 13px; color: var(--text-muted); }

/* ---------- Full-bleed photo band (award) ---------- */
.photo-band {
  position: relative;
  height: 520px;
  background: var(--ink-dark);
  overflow: hidden;
}
.photo-band > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-band::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,14,8,0.8) 0%, rgba(20,14,8,0.25) 70%, rgba(20,14,8,0.1) 100%);
}
.photo-band .band-content {
  position: absolute;
  left: 0; right: 0; bottom: 48px;
  z-index: 2;
}
.photo-band .band-content .inner { max-width: 560px; }
.photo-band h2 { color: var(--cream-bright); font-size: clamp(30px, 3.3vw, 42px); text-shadow: 0 2px 18px rgba(0,0,0,0.5); }
.photo-band p { color: var(--dark-softer); font-size: 16px; text-shadow: 0 1px 10px rgba(0,0,0,0.5); }

/* ---------- Split section (text panel + image) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.split .split-text { background: var(--tan-panel); padding: 72px var(--pad-x); }
.split .split-text .inner { max-width: 500px; margin-left: auto; }
.split .split-media { position: relative; min-height: 420px; }
.split .split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split .split-text .inner { max-width: none; margin-left: 0; }
  .split .split-media { min-height: 280px; }
}

/* ---------- Two-column grid ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Pre-footer CTA strip ---------- */
.cta-strip { background: var(--ink-warm); }
.cta-strip .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 44px;
  padding-bottom: 44px;
  flex-wrap: wrap;
}
.cta-strip .line { font-family: var(--serif); font-size: 24px; color: var(--cream-bright); margin: 0; }

/* ---------- Figures & media ---------- */
figure { margin: 0; }
figure img { border-radius: 16px; width: 100%; }
figcaption { font-size: 14px; color: var(--text-muted); margin-top: 12px; }

/* Name labels under a group photo, one per person, left-to-right */
.photo-names {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
.photo-names div:nth-child(2) { text-align: center; }
.photo-names div:nth-child(3) { text-align: right; }
.photo-names strong { display: block; font-size: 15px; color: var(--text-primary); }
.photo-names span { font-size: 13px; color: var(--text-muted); }
@media (max-width: 640px) {
  .photo-names { grid-template-columns: 1fr; gap: 10px; }
  .photo-names div:nth-child(2), .photo-names div:nth-child(3) { text-align: left; }
}
.rounded { border-radius: 16px; }
.video-frame { border-radius: 16px; overflow: hidden; }
.video-frame video { width: 100%; }
.embed-16x9 { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; }
.embed-16x9 iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Cards ---------- */
.card {
  background: var(--cream-bright);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 44px 48px;
}
.card-tan { background: var(--tan-panel); border-radius: 16px; padding: 32px 36px; }
.card-dark { background: var(--ink-dark); border-radius: 16px; padding: 32px 36px; color: var(--dark-soft); }
.card-dark .kicker { color: var(--green-active); }
.card-white { background: #fff; border-radius: 16px; padding: 18px; }

/* ---------- Blog list ---------- */
.post-row {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--hairline);
}
.post-row:first-child { padding-top: 0; }
.post-row:last-child { border-bottom: 0; }
.post-row .post-img { border-radius: 14px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-row .post-img.on-white { background: #fff; object-fit: contain; }
.post-date {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 8px;
}
.post-row h2 { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.2; margin-bottom: 12px; }
.post-row h2 a { text-decoration: none; color: var(--text-primary); }
.post-row h2 a:hover { color: var(--green-dark); }
.post-row p { color: var(--text-secondary); }
@media (max-width: 900px) {
  .post-row { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Article (post detail) ---------- */
article.post { max-width: 760px; margin: 0 auto; }
article.post h1 { font-size: clamp(32px, 3.8vw, 48px); line-height: 1.15; }
article.post h2 { font-size: 28px; margin-top: 36px; }
article.post .post-date { margin-bottom: 24px; }
article.post .post-date a { color: var(--terracotta); }
article.post img { border-radius: 16px; }
article.post p { color: var(--text-secondary); }
article.post p strong { color: var(--text-primary); }

/* ---------- FAQ ---------- */
.faq { max-width: 920px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--hairline); padding: 34px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: " +"; color: var(--terracotta); }
.faq details[open] summary::after { content: " –"; }
.faq details p { font-size: 16px; line-height: 1.7; color: var(--text-secondary); }

/* ---------- Forms ---------- */
form .field { margin-bottom: 20px; }
form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
form .req { color: var(--terracotta); }
form input[type="text"], form input[type="email"], form input[type="tel"], form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  background: var(--cream-bright);
  color: var(--text-primary);
}
form ::placeholder { color: #a2947e; }
form textarea { min-height: 140px; resize: vertical; }
form .checkbox-field { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }

/* Newsletter input in CTA strip */
.newsletter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.newsletter input[type="email"] {
  background: var(--cream-page);
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  width: 240px;
  font: inherit;
  font-size: 15px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink-darkest);
  color: var(--dark-muted);
  font-size: 14px;
  line-height: 1.6;
}
footer.site-footer .wrap {
  display: flex;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 40px;
  flex-wrap: wrap;
  align-items: flex-start;
}
footer.site-footer .foot-brand { max-width: 340px; }
footer.site-footer .foot-brand strong { color: var(--cream-bright); display: block; margin-bottom: 4px; }
footer.site-footer a { color: var(--dark-muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--green-active); }
footer.site-footer .foot-copy { margin-left: auto; color: #7a6c58; }
@media (max-width: 900px) {
  footer.site-footer .wrap { gap: 24px; }
  footer.site-footer .foot-copy { margin-left: 0; }
}

/* Users who prefer reduced motion get the still poster instead of autoplay video */
@media (prefers-reduced-motion: reduce) {
  .hero-home video { display: none; }
  .hero-home { background: url("/assets/images/hero-poster.jpg") center / cover no-repeat; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 900px) {
  section { padding: 56px 0; }
  .page-banner { height: 340px; }
  .photo-band { height: auto; min-height: 420px; }
  .stat-strip .wrap { flex-direction: column; gap: 18px; }
  .cta-strip .wrap { flex-direction: column; align-items: flex-start; }
  .hero-content { bottom: 36px; }
}
