/* =====================================================
   CLAUSES 4 CAUSES — Children's Book Theme
   Warm parchment · Storybook red · Holly green
   Mobile-first, whimsical, illustrated
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --parchment:   #fef9ee;
  --parchment2:  #fdf0d5;
  --parchment3:  #f5e4bc;
  --red:         #d63a2f;
  --red-light:   #f0544a;
  --green:       #2d6a3f;
  --green-light: #3d8f55;
  --gold:        #d4a017;
  --gold-light:  #f0c040;
  --brown:       #7a4a1e;
  --brown-light: #c49a6c;
  --ink:         #2a1a0a;
  --ink-mid:     #5a3a1a;
  --ink-light:   #9a7a5a;
  --white:       #ffffff;

  --font-display: 'Fredoka One', cursive;
  --font-body:    'Nunito', sans-serif;

  --radius-card:  20px;
  --radius-btn:   50px;
  --shadow-card:  0 4px 20px rgba(122,74,30,0.18);
  --shadow-lift:  0 10px 36px rgba(122,74,30,0.28);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  min-height: 100vh;
  /* subtle paper texture via repeating gradient */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(122,74,30,0.03) 28px,
      rgba(122,74,30,0.03) 29px
    );
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }

/* ── Black-background PNG fix ──────────────────────
   The character/elf PNGs have black backgrounds instead
   of true transparency. mix-blend-mode: multiply makes
   black invisible on light backgrounds.
   Apply .blend-img to any character image.
   ─────────────────────────────────────────────────── */
.blend-img {
  mix-blend-mode: multiply;
}
/* On dark (green) backgrounds, use screen instead */
.blend-img-screen {
  mix-blend-mode: screen;
}

/* ── Wavy SVG dividers ─────────────────────────── */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -2px;
}
.wave-divider svg { display: block; width: 100%; }

/* ── Page wrapper ──────────────────────────────── */
.page-wrap { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ==============================================
   HEADER / NAV
   ============================================== */
header {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 200;
  /* hand-drawn top border feel */
  box-shadow: 0 3px 0 var(--brown), 0 5px 16px rgba(0,0,0,0.25);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
}

.logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.logo-link img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-link .logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
  white-space: nowrap;
}

.logo-link .logo-text span { color: var(--red-light); }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 8px 10px;
  transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.25); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Nav links */
nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--green);
  border-top: 3px solid var(--brown);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  flex-direction: column;
  padding: 0.75rem 1rem 1.25rem;
  gap: 0.25rem;
}
nav.open { display: flex; }

nav a {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
nav a .ni { display: inline-block; width: 1.6rem; text-align: center; line-height: 1; }
nav a:hover, nav a.active {
  background: rgba(255,255,255,0.15);
  color: var(--gold-light);
}
nav a.nav-donate {
  background: var(--red);
  color: #fff;
  margin-top: 0.5rem;
  justify-content: center;
  box-shadow: 0 3px 0 var(--brown);
}
nav a.nav-donate:hover { background: var(--red-light); }

@media (min-width: 700px) {
  .nav-toggle { display: none; }
  nav {
    display: flex;
    position: static;
    flex-direction: row;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 0.15rem;
    align-items: center;
  }
  .logo-link img { height: 60px; }
  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.15rem;
    line-height: 1.1;
  }
  nav a .ni { width: auto; font-size: 1.3rem; }
  nav a.nav-donate { margin-top: 0; padding: 0.4rem 1rem; }
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 0 rgba(0,0,0,0.2);
  text-align: center;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,0.2); }
.btn:active { transform: translateY(1px);  box-shadow: 0 2px 0 rgba(0,0,0,0.2); }

.btn-red   { background: var(--red);   color: #fff; }
.btn-red:hover { background: var(--red-light); }

.btn-green { background: var(--green); color: var(--gold-light); }
.btn-green:hover { background: var(--green-light); }

.btn-gold  { background: var(--gold);  color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 3px solid var(--green);
  box-shadow: none;
}
.btn-outline:hover { background: var(--green); color: var(--gold-light); }

/* ==============================================
   SECTION UTILITIES
   ============================================== */
.section { padding: 3rem 1.2rem; }
.section-inner { max-width: 860px; margin: 0 auto; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--green);
  text-align: center;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--ink-mid);
  text-align: center;
  line-height: 1.7;
  max-width: 560px;
  margin: 0.6rem auto 0;
}

.squiggle {
  display: block;
  margin: 0.5rem auto 1.75rem;
  width: 80px;
  height: 12px;
}

/* ==============================================
   CARDS
   ============================================== */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 2.5px solid var(--parchment3);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  box-shadow: var(--shadow-lift);
}
.card-body { padding: 1.4rem 1.4rem 1.6rem; }
.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}
.card-body p {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* ==============================================
   FADE-IN SCROLL ANIMATION
   ============================================== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ==============================================
   FOOTER
   ============================================== */
footer {
  background: var(--green);
  color: rgba(255,255,255,0.8);
  text-align: center;
  padding: 2rem 1.2rem 1.5rem;
  border-top: 4px solid var(--brown);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
footer a { color: var(--gold-light); font-weight: 700; }
footer a:hover { text-decoration: underline; }

.footer-char {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  margin-top: -1rem;
}
@media (max-width: 560px) {
  .footer-char {
    margin-bottom: 2.5rem;
  }
}
.footer-char img {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.footer-fb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-light);
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.footer-fb-link svg { width: 20px; height: 20px; fill: var(--gold-light); }


/* ==============================================
   CUSTOM ICONS (replace emoji)
   ============================================== */
.ic { height: 1.2em; width: auto; vertical-align: -0.22em; margin: 0 0.1em; display: inline-block; }
.ic-card { height: 3.4rem; width: auto; display: inline-block; }
.ic-info { height: 2.2rem; width: auto; display: block; }
.ic-thumb { height: 120px; width: auto; }
.btn .ic { height: 1.3em; vertical-align: -0.3em; }
nav a .ni img { height: 1.7rem; width: 1.7rem; object-fit: contain; display: block; }
@media (min-width: 700px) {
  nav a .ni img { height: 2.1rem; width: 2.1rem; }
}

/* ==============================================
   CHRISTMAS COUNTDOWN
   ============================================== */
.countdown {
  background: var(--parchment);
  padding: 0.5rem 1.2rem 2.2rem;
  text-align: center;
}
.countdown-inner { max-width: 640px; margin: 0 auto; }
.countdown-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 1rem;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
.countdown-grid[hidden], .countdown-done[hidden] { display: none; }
.cd-unit {
  background: var(--green);
  border-radius: 16px;
  border-bottom: 4px solid var(--brown);
  padding: 0.8rem 0.3rem 0.65rem;
  box-shadow: var(--shadow-card);
}
.cd-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  line-height: 1.1;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.cd-label {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
}
.countdown-done {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--red);
}
