/* style.css — B2K's Foundation
   Art direction: "From trauma to triumph" — warm, hopeful, human.
   Palette derived from the foundation's logo: deep teal (trust, healing)
   + warm amber-gold (hope, sunrise) on warm cream surfaces.
   Type: Zodiak (warm editorial serif, display) + Work Sans (body). */

:root,
[data-theme='light'] {
  --font-display: 'Zodiak', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  /* Surfaces — warm cream */
  --color-bg: #faf7f2;
  --color-surface: #fffdf9;
  --color-surface-2: #fdfaf4;
  --color-surface-offset: #f2ede3;
  --color-surface-offset-2: #eae3d5;
  --color-surface-dynamic: #e4ddcf;
  --color-divider: #e2dccb;
  --color-border: #d8d0bf;

  /* Text — deep espresso-teal */
  --color-text: #1e2a28;
  --color-text-muted: #5f6a66;
  --color-text-faint: #a39e94;
  --color-text-inverse: #faf7f2;

  /* Primary — Deep Teal */
  --color-primary: #0d5c58;
  --color-primary-hover: #0a4744;
  --color-primary-active: #073532;
  --color-primary-highlight: #d3e4e0;

  /* Accent — Sunrise Amber */
  --color-accent: #b4690e;
  --color-accent-hover: #96540a;
  --color-accent-active: #784208;
  --color-accent-highlight: #f3e2c8;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 180 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 180 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 180 / 0.12);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

[data-theme='dark'] {
  --color-bg: #121817;
  --color-surface: #171d1c;
  --color-surface-2: #1b2221;
  --color-surface-offset: #1a201f;
  --color-surface-offset-2: #202726;
  --color-surface-dynamic: #293130;
  --color-divider: #232928;
  --color-border: #343d3b;

  --color-text: #d6dcd9;
  --color-text-muted: #8a948f;
  --color-text-faint: #5f6864;
  --color-text-inverse: #121817;

  --color-primary: #6db3ab;
  --color-primary-hover: #8fc4bc;
  --color-primary-active: #4f98a3;
  --color-primary-highlight: #243531;

  --color-accent: #e0a25e;
  --color-accent-hover: #ecb87f;
  --color-accent-active: #c98a44;
  --color-accent-highlight: #3a3024;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.container--wide {
  max-width: var(--content-wide);
}
.container--narrow {
  max-width: var(--content-narrow);
}

.section {
  padding-block: clamp(var(--space-12), 6vw, var(--space-24));
}
.section--tight {
  padding-block: clamp(var(--space-8), 4vw, var(--space-16));
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 2px;
  box-shadow: var(--shadow-sm);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.1;
}
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.nav {
  display: none;
  align-items: center;
  gap: var(--space-5);
}
.nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--color-primary);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.header__actions .btn {
  white-space: nowrap;
}

/* Mobile nav toggle + panel */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.nav-toggle:hover {
  background: var(--color-surface-offset);
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-divider);
}
.mobile-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  padding: var(--space-3);
  border-radius: var(--radius-md);
}
.mobile-nav a:hover {
  background: var(--color-surface-offset);
}
.mobile-nav[data-open='true'] {
  display: flex;
}

/* Desktop: show inline nav, hide hamburger and mobile panel */
@media (min-width: 1024px) {
  .nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav,
  .mobile-nav[data-open='true'] {
    display: none;
  }
}

/* Very small screens: keep the header to brand + controls */
@media (max-width: 480px) {
  .header__actions .btn--accent {
    display: none;
  }
  .brand__name {
    font-size: var(--text-base);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border: none;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
}
.btn--accent {
  background: var(--color-accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--color-accent-hover);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
[data-theme='dark'] .btn--accent {
  background: var(--color-accent);
  color: #1c1408;
}
[data-theme='dark'] .btn--accent:hover {
  background: var(--color-accent-hover);
}
[data-theme='dark'] .donate-band .btn--light {
  background: var(--color-accent);
  color: #1c1408;
}
[data-theme='dark'] .donate-band .btn--light:hover {
  background: var(--color-accent-hover);
}
.btn--light {
  background: var(--color-text-inverse);
  color: var(--color-text);
}
.btn--light:hover {
  background: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #f5f2ea;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding-block: var(--space-16) var(--space-20);
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      oklch(0.18 0.03 200 / 0.55) 0%,
      oklch(0.16 0.03 200 / 0.35) 55%,
      oklch(0.14 0.02 200 / 0.7) 100%);
}
.hero__content {
  max-width: 720px;
}
/* Hero is always dark imagery — use fixed light palette */
.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f0c987;
  border: 1px solid oklch(from #f5f2ea l c h / 0.35);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-4);
  margin-bottom: var(--space-6);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.08;
  margin-bottom: var(--space-6);
}
.hero h1 em {
  font-style: italic;
  color: #f0c987;
}
.hero__text {
  font-size: var(--text-lg);
  color: oklch(from #f5f2ea l c h / 0.88);
  max-width: 58ch;
  margin-bottom: var(--space-8);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---------- Section headings ---------- */
.section__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.15;
  margin-bottom: var(--space-5);
}
.section__lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 62ch;
}

/* ---------- Stats / The Problem ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.stat {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.stats__note {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Split sections (mission / solution) ---------- */
.split {
  display: grid;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--reverse .split__media {
    order: -1;
  }
}
.split__media img {
  border-radius: var(--radius-xl);
  width: 100%;
  box-shadow: var(--shadow-md);
}
.split__body p {
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}
.split__body p strong {
  color: var(--color-text);
}
.pull-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--color-text);
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-5);
  margin-top: var(--space-6);
}

/* ---------- Programs ---------- */
.programs {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 800px) {
  .programs {
    grid-template-columns: 1fr 1fr;
  }
  .program--wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-8);
    align-items: center;
  }
}
.program {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-divider);
}
.program img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}
.program--wide img {
  width: 100%;
  height: 100%;
  min-height: 320px;
}
.program__body {
  padding: var(--space-6);
}
.program__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.program__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.program__body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- Divider band ---------- */
.band {
  position: relative;
  color: #f5f2ea;
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  isolation: isolate;
}
.band__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.band__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: oklch(0.16 0.03 200 / 0.62);
}
.band h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: 1.15;
  max-width: 22ch;
  margin-bottom: var(--space-6);
}
.band p {
  color: oklch(from #f5f2ea l c h / 0.85);
  max-width: 60ch;
  margin-bottom: var(--space-8);
}

/* ---------- Testimonials ---------- */
.quotes {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-10);
}
@media (min-width: 800px) {
  .quotes {
    grid-template-columns: repeat(3, 1fr);
  }
}
.quote {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.quote__mark {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--color-accent);
}
.quote blockquote {
  font-size: var(--text-base);
  color: var(--color-text);
}
.quote figcaption {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: auto;
}

/* ---------- Get involved ---------- */
.involve {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 800px) {
  .involve {
    grid-template-columns: repeat(3, 1fr);
  }
}
.involve__card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.involve__card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
}
.involve__card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.involve__card .btn {
  margin-top: var(--space-3);
  align-self: flex-start;
}

/* ---------- Hotlines ---------- */
.hotlines {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
@media (min-width: 700px) {
  .hotlines {
    grid-template-columns: 1fr 1fr;
  }
}
.hotline {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-surface-offset);
}
.hotline strong {
  font-size: var(--text-sm);
}
.hotline a {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  text-decoration: none;
}
.hotline a:hover {
  text-decoration: underline;
}
.hotline span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-surface-offset);
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12) var(--space-8);
  margin-top: var(--space-16);
}
.footer__grid {
  display: grid;
  gap: var(--space-10);
}
@media (min-width: 800px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.footer a {
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
}
.footer a:hover {
  color: var(--color-primary);
}
.footer ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer__about {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.footer__about img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 2px;
}
.footer__about strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.footer__about p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer__bottom {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: var(--space-2);
}

/* ---------- Donate band CTA ---------- */
.donate-band {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 800px) {
  .donate-band {
    grid-template-columns: 1.4fr auto;
    align-items: center;
  }
}
.donate-band h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  line-height: 1.2;
}
.donate-band p {
  color: oklch(from var(--color-text-inverse) l c h / 0.85);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
}
