/* A Better Cranberry — single-page stylesheet
   Design handoff (STE-159): restrained, community-focused, accessible. */

:root {
  --green: #1E5B3A;
  --green-dark: #17482d;
  --cranberry: #A6342E;
  --cranberry-dark: #8a2a24;
  --off-white: #FAF8F4;
  --slate: #222A26;
  --slate-muted: #55605a;
  --white: #ffffff;
  --border: #e4dfd6;
  --shadow: 0 4px 20px rgba(34, 42, 38, 0.08);
  --radius: 14px;
  --maxw: 1080px;
  --space: 8px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--slate);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--green); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  left: 8px;
  outline: 3px solid var(--cranberry);
  outline-offset: 2px;
}

/* Focus */
:focus-visible {
  outline: 3px solid var(--cranberry);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.wordmark {
  text-decoration: none;
  color: var(--slate);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.wordmark-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.wordmark .accent { color: var(--cranberry); }
.wordmark-tag {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-muted);
  font-weight: 600;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--slate);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--green); background: #f0ece4; }

/* Mobile header: allow the wordmark and nav to stack and the nav links to
   wrap so nothing overflows at 320px-640px. */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .wordmark {
    text-align: center;
    align-items: center;
  }
  .site-nav { width: 100%; }
  .site-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }
  .site-nav a {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  .wordmark-name { font-size: 1.2rem; }
  .wordmark-tag { font-size: 0.68rem; }
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(166, 52, 46, 0.07), transparent 40%),
    linear-gradient(180deg, #f2efe7, var(--off-white));
  padding: 88px 0 80px;
  text-align: center;
}
.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.12;
  margin: 0 auto 18px;
  max-width: 16ch;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-lede {
  max-width: 56ch;
  margin: 0 auto 30px;
  font-size: 1.15rem;
  color: var(--slate-muted);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  min-height: 48px;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-secondary:hover { background: rgba(30, 91, 58, 0.08); }

/* Donate button — inactive state */
.btn-donate {
  background: #e7e2d9;
  color: #8b8f8a;
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.85;
  font-weight: 500;
}
.btn-donate[aria-disabled="true"] { pointer-events: none; }

/* Sections */
section { padding: 80px 0; }
section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mission { background: var(--white); }
.mission .container { max-width: 760px; }
.mission-statement {
  font-size: 1.15rem;
  color: var(--slate);
  margin: 0 0 0;
  line-height: 1.7;
}

.topics-intro {
  color: var(--slate-muted);
  max-width: 60ch;
  margin: 0 0 36px;
}
.topic-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.topic-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow);
}
.topic-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--green-dark);
}
.topic-card p { margin: 0; color: var(--slate-muted); }

.fundraiser, .donate {
  text-align: center;
  background: linear-gradient(180deg, #f2efe7, var(--off-white));
}
.donate { background: var(--white); }
.fundraiser-date {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cranberry);
  margin: 16px 0 6px;
}
.fundraiser-note { color: var(--slate-muted); margin: 0; }
.donate-copy {
  font-size: 1.1rem;
  color: var(--slate);
  margin: 6px 0 22px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--off-white);
  padding: 32px 0;
  text-align: center;
}
.footer-wordmark { font-weight: 800; color: var(--slate); margin: 0 0 6px; }
.footer-note {
  margin: 0;
  color: var(--slate-muted);
  font-size: 0.9rem;
}

/* Breakpoints */
@media (min-width: 640px) {
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .topic-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 112px 0 100px; }
}