/* Giving Campaign — mobile-first, designed at 375px.
   Palette: maroon page, cream text, cream buttons, gold accents. */

:root {
  --cream: #FFF8F0;
  --text: #FFFDFA;                     /* light text on dark backgrounds */
  --maroon: #782323;                   /* page background */
  --cream-soft: #EBD9CF;               /* secondary text, 7.4:1 on maroon */
  --gold-light: #E6C67E;               /* gold text/accents, 6.6:1 on maroon */
  --pine: #0B3A22;                     /* body text, 12:1 on cream */
  --green: #1B5636;                    /* headings, 8:1 on cream */
  --green-soft: #4A6354;               /* secondary text, 6:1 on cream */
  --red: #A33232;                      /* buttons, 6.5:1 with cream */
  --red-deep: #7E2424;
  --gold: #B48C3E;                     /* decoration only */
  --gold-text: #8A6A2A;                /* gold text, 4.8:1 on cream */
  --line: rgba(180, 140, 62, 0.45);    /* gold dividers */
  --track: rgba(11, 58, 34, 0.12);     /* bar tracks */

  --radius: 999px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Montserrat", var(--font-body);
  --font-title: "Belgiano Serif", Georgia, serif;
}

/* Title font: Belgiano Serif (Fajarisha Phonna). */
@font-face {
  font-family: "Belgiano Serif";
  src: url("/fonts/belgiano-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--maroon);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2 {
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  word-spacing: 0.08em;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }

p { margin: 0 0 1em; }

a { color: var(--gold-light); text-underline-offset: 3px; }

strong { color: var(--text); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Sections are separated by a thin gold rule. */
.how,
.org,
.faq { border-top: 1px solid rgba(230, 198, 126, 0.4); }

/* Scrolling ticker (top and bottom of page) */
.ticker {
  overflow: hidden;
  background: #FFFFFF;
  color: var(--pine);
  border-block: 1px solid rgba(11, 58, 34, 0.15);
}
.ticker-track {
  display: flex;
  width: max-content;
}
.ticker-group {
  display: flex;
  flex-shrink: 0;
}
.ticker-group span {
  padding: 10px 14px;
  font-family: var(--font-title);
  font-size: 1.125rem;
  word-spacing: 0.12em;
  white-space: nowrap;
}
.ticker-sep { opacity: 0.55; }

/* Closed banner */
.closed-banner {
  background: var(--green);
  color: var(--text);
  text-align: center;
  font-weight: 700;
  padding: 14px 20px;
}

/* Hero */
.hero {
  padding: 40px 0 48px;
  text-align: center;
}
.logo { margin: 0 -16px 24px; }
.logo img { width: 100%; }
.deadline { color: var(--cream-soft); }
.deadline strong { white-space: nowrap; } /* keep the date and time on one line */

/* Buttons: cream pill, maroon text */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--cream);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--maroon);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); }

.jump {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}
/* Jump links are secondary: outlined. */
.jump .btn {
  background: transparent;
  border-color: var(--cream);
  color: var(--text);
}
.jump .btn:hover { background: rgba(255, 248, 240, 0.12); border-color: var(--cream); }

.btn-shop { display: flex; width: 100%; margin: 8px auto 12px; }
.org .progress-block { text-align: center; }
.give-money { margin: 0 0 12px; text-align: center; font-size: 0.9375rem; color: var(--cream-soft); }

.btn-shop[aria-disabled="true"] {
  background: transparent;
  color: var(--cream-soft);
  border-color: var(--cream-soft);
  border-style: dashed;
  cursor: not-allowed;
}

/* Progress */
.progress-block { margin: 24px 0; }
.bar {
  height: 12px;
  background: rgba(255, 248, 240, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: var(--gold-light);
  border-radius: var(--radius);
}
.progress-text { margin: 10px 0 0; font-weight: 700; }

/* How it works */
.how { padding-top: 48px; padding-bottom: 48px; }
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: 20px;
  min-height: 36px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--maroon);
  font-family: var(--font-head);
  font-weight: 700;
}

/* Org sections */
.org {
  scroll-margin-top: 16px;
  padding: 48px 0;
}
.org-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
  background: rgba(255, 248, 240, 0.12);
}
.org-about {
  margin-bottom: 28px;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--cream-soft);
  text-wrap: pretty;
}

/* Org dropdowns: Testimonials, Why give? */
.org-more {
  margin: 8px 0 28px;
  border-top: 1px solid rgba(230, 198, 126, 0.4);
}
.org-more details { border-bottom: 1px solid rgba(230, 198, 126, 0.4); }
.org-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 0;
  font-family: var(--font-title);
  font-size: 1.25rem;
  cursor: pointer;
  list-style: none;
}
.org-more summary::-webkit-details-marker { display: none; }
.org-more summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gold-light);
}
.org-more details[open] summary::after { content: "\2212"; }
.org-more details > p { color: var(--cream-soft); }
.testimonial {
  margin: 4px 0 20px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold-light);
}
.testimonial blockquote { margin: 0; }
.testimonial blockquote p {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--text);
}
.testimonial blockquote p::before { content: "\201C"; }
.testimonial blockquote p::after { content: "\201D"; }
.testimonial figcaption {
  font-size: 0.9375rem;
  color: var(--gold-light);
}

/* FAQ */
.faq { padding-top: 48px; padding-bottom: 56px; }
.faq details { border-bottom: 1px solid rgba(230, 198, 126, 0.4); }
.faq summary {
  min-height: 44px;
  padding: 14px 0;
  font-weight: 700;
  cursor: pointer;
}
.faq details p { color: var(--cream-soft); padding-bottom: 8px; }

/* Footer */
.footer {
  padding: 40px 0 56px;
  background: var(--pine);
  color: var(--text);
  text-align: center;
}
.footer a { color: var(--text); }
.footer strong { color: var(--text); }
.footer :focus-visible { outline-color: var(--cream); }

/* Larger screens */
@media (min-width: 600px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 2.5rem; }
  .logo { max-width: 680px; margin: 0 auto 24px; }
  .jump { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .btn-shop { width: fit-content; }
}

/* Motion: only animate when the user hasn't asked for less. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .ticker-track { animation: ticker 40s linear infinite; }
  .bar-fill { transition: width 0.6s ease-out; }
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Reduced motion: still banner, centered. */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { width: auto; justify-content: center; }
  .ticker-group + .ticker-group { display: none; }
}
