/* ==========================================================================
   Haberfield Public School P&C — "Sunny & Friendly" design system
   Warm, gold-forward, rounded community-nonprofit style.
   Plain HTML + CSS. No JS, no build step.
   ========================================================================== */

/* ----- Design tokens ----------------------------------------------------- */
:root {
  --navy: #173a5e;          /* friendly deep navy — primary text/anchors */
  --navy-deep: #0f2840;     /* footer / darkest */
  --gold: #f6b42c;          /* the sun — hero + primary accent */
  --gold-deep: #e09a1f;     /* darker gold for borders/hovers */
  --gold-soft: #ffd87a;     /* light gold for glows */
  --gold-tint: #fdedcb;     /* pale gold pill backgrounds */
  --coral: #ef7a55;         /* warm pop accent (sparing) */
  --coral-soft: #fbe0d4;
  --cream: #fff9ee;         /* page background */
  --cream-2: #fdf2dc;       /* warmer panels */
  --white: #fffdf8;         /* cards */
  --text: #243446;          /* warm near-navy body text */
  --text-muted: #61708021;  /* (unused placeholder) */
  --muted: #5f6e7e;         /* muted text */
  --line: #efe3c9;          /* warm hairline */

  --display: "Fredoka", "Trebuchet MS", sans-serif;
  --body: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1140px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(23,58,94,0.06);
  --shadow-md: 0 14px 34px rgba(23,58,94,0.10);
  --shadow-lg: 0 24px 60px rgba(23,58,94,0.14);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.04rem, 0.98rem + 0.35vw, 1.18rem);
  line-height: 1.72;
  color: var(--text);
  background-color: var(--cream);
  /* warm atmospheric glow + the faintest grain */
  background-image:
    radial-gradient(60% 50% at 85% -5%, rgba(246,180,44,0.18), transparent 70%),
    radial-gradient(50% 40% at 0% 8%, rgba(239,122,85,0.08), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy); text-underline-offset: 3px; text-decoration-color: var(--gold-deep); }
a:hover { color: var(--coral); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ----- Typography -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 1.7rem + 4vw, 4.6rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
strong { font-weight: 800; color: var(--navy); }

/* ----- Friendly primitives ---------------------------------------------- */

/* Pill eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--gold-tint);
  color: var(--gold-deep);
  border-radius: 999px;
  padding: 0.42em 1.05em;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(246,180,44,0.25);
}
.eyebrow.coral { background: var(--coral-soft); color: #c4532f; }
.eyebrow.coral::before { background: var(--coral); box-shadow: 0 0 0 3px rgba(239,122,85,0.22); }

/* Pull-quote */
.pullquote {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem);
  line-height: 1.32;
  color: var(--navy);
  max-width: 26ch;
  margin: 1.6rem 0;
}
.pullquote .hl {
  background: linear-gradient(transparent 62%, var(--gold-soft) 62%);
  padding: 0 0.06em;
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--cream);
  background: var(--navy);
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 2px solid var(--navy);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover {
  background: var(--navy-deep);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn .arrow { transition: transform 0.16s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: var(--navy-deep); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gold-deep);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--gold-tint); color: var(--navy); }

/* ----- Site header ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,249,238,0.82);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.7rem;
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--navy); }
.brand img {
  width: 50px; height: 50px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text .name { font-family: var(--display); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.01em; }
.brand-text .sub {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
}

nav.primary { display: flex; align-items: center; gap: clamp(0.3rem, 1.5vw, 0.8rem); flex-wrap: wrap; }
nav.primary a {
  font-size: 0.92rem; font-weight: 700; text-decoration: none; color: var(--navy);
  padding: 0.45rem 0.95rem; border-radius: 999px; transition: background 0.14s ease, color 0.14s ease;
}
nav.primary a:hover { background: var(--gold-tint); color: var(--navy); }
nav.primary a.active { background: var(--navy); color: var(--cream); }

/* ----- Home hero (gold) -------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 75% -20%, var(--gold-soft) 0%, var(--gold) 42%, var(--gold-deep) 100%);
  isolation: isolate;
}
.hero .container {
  position: relative;
  z-index: 3;
  padding-block: clamp(3.5rem, 7vw, 7.5rem);
  padding-bottom: clamp(5rem, 9vw, 9rem);
}
.hero .eyebrow { background: rgba(255,255,255,0.55); color: #9a6a08; }
.hero .eyebrow::before { background: var(--coral); box-shadow: 0 0 0 3px rgba(255,255,255,0.4); }
.hero h1 { color: var(--navy-deep); max-width: 15ch; }
.hero .lead {
  font-size: clamp(1.12rem, 1rem + 0.6vw, 1.42rem);
  color: #5a4011;
  font-weight: 500;
  max-width: 48ch;
}
.hero .cta-band { margin-top: 1.8rem; }

/* Big rotating sun behind the hero */
.hero .sun {
  position: absolute;
  z-index: 1;
  top: -14%;
  right: -10%;
  width: min(560px, 64vw);
  height: min(560px, 64vw);
  color: rgba(255,255,255,0.55);
  pointer-events: none;
}
.hero .sun .rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: radiate 6.5s ease-in-out infinite;
}
.hero .sun .core { fill: rgba(255,255,255,0.16); }

/* soft floating blobs */
.hero .blob {
  position: absolute; z-index: 0; border-radius: 50%;
  filter: blur(8px); pointer-events: none;
}
.hero .blob.b1 { width: 180px; height: 180px; background: rgba(255,255,255,0.22); bottom: 12%; left: 6%; }
.hero .blob.b2 { width: 110px; height: 110px; background: rgba(239,122,85,0.18); top: 22%; left: 42%; }

/* Curved wave transition into the cream body */
.hero .wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%; height: clamp(48px, 7vw, 96px);
  z-index: 2;
  display: block;
}
.hero .wave path { fill: var(--cream); }

@keyframes radiate { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ----- Interior page header (soft gold) --------------------------------- */
.page-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
  border-bottom: 1px solid var(--line);
}
.page-header .container { padding-block: clamp(2.6rem, 5vw, 4.5rem); position: relative; z-index: 2; }
.page-header .lead {
  font-size: clamp(1.12rem, 1rem + 0.6vw, 1.4rem);
  color: var(--muted);
  font-weight: 500;
  max-width: 46ch;
}
.page-header .sun-mini {
  position: absolute; top: -40px; right: -40px; width: 220px; height: 220px;
  color: rgba(246,180,44,0.18); z-index: 1; pointer-events: none;
}

/* ----- Main / sections --------------------------------------------------- */
main.container { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
main section { padding-block: clamp(2rem, 4vw, 3.4rem); }

main ul { max-width: var(--measure); padding-left: 0; list-style: none; }
main ul li { position: relative; padding-left: 1.7rem; margin-bottom: 0.7rem; }
main ul li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-tint);
}

main .intro-lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.32rem); color: var(--text); }

/* ----- Feature cards (What we do) --------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-top: 1.8rem;
  max-width: none;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .icon {
  width: 3.1rem; height: 3.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-tint);
  color: var(--navy);
  margin-bottom: 1rem;
}
.feature-card:nth-child(2) .icon { background: var(--coral-soft); color: #c4532f; }
.feature-card:nth-child(3) .icon { background: #dbeef0; color: #1f6b73; }
.feature-card:nth-child(4) .icon { background: var(--gold-tint); color: var(--navy); }
.feature-card:nth-child(5) .icon { background: var(--coral-soft); color: #c4532f; }
.feature-card:nth-child(6) .icon { background: #dbeef0; color: #1f6b73; }
.feature-card .icon svg { width: 1.6rem; height: 1.6rem; }
.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { margin: 0; font-size: 0.98rem; color: var(--muted); }

/* ----- Impact list (What we've funded) ---------------------------------- */
.impact-list { margin-top: 1.8rem; border-top: 2px solid var(--gold); max-width: none; }
.impact-row {
  display: flex;
  align-items: baseline;
  gap: clamp(0.9rem, 3vw, 2.2rem);
  padding: 1.15rem 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s ease, padding-left 0.16s ease;
}
.impact-row:hover { background: var(--gold-tint); padding-left: 1rem; border-radius: var(--r-sm); }
.impact-row .amt {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold-deep);
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.3rem);
  line-height: 1;
  flex: none;
  min-width: 6.4ch;
  font-variant-numeric: tabular-nums;
}
.impact-row .impact-desc { color: var(--text); }
.impact-row .impact-desc strong { color: var(--navy); }
.impact-row .impact-desc .note { color: var(--muted); }
.impact-total {
  margin-top: 1.3rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  color: var(--navy);
}
.impact-total .big { color: var(--gold-deep); }
@media (max-width: 560px) {
  .impact-row { flex-direction: column; gap: 0.2rem; }
  .impact-row .amt { min-width: 0; }
}

/* ----- News / magazine cards -------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-top: 1.8rem;
  max-width: none;
}
.news-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card .date {
  align-self: flex-start;
  background: var(--navy);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.3em 0.85em;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.news-card:nth-child(2) .date { background: var(--coral); }
.news-card:nth-child(3) .date { background: var(--gold-deep); }
.news-card:nth-child(4) .date { background: #1f6b73; }
.news-card h3 { margin-bottom: 0.5rem; }
.news-card p:last-child { margin-bottom: 0; font-size: 0.97rem; color: var(--muted); }

/* ----- Info box ---------------------------------------------------------- */
.info-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  margin: 1.5rem 0;
  max-width: var(--measure);
  box-shadow: var(--shadow-sm);
}
.info-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.5rem; margin: 0; }
.info-box dt {
  font-family: var(--body); font-weight: 800; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); padding-top: 0.18rem;
}
.info-box dd { margin: 0; color: var(--text); }

/* ----- Step / numbered sections (interior pages) ------------------------ */
.step-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.4rem; }
.step-badge {
  flex: none;
  width: 2.7rem; height: 2.7rem; border-radius: 50%;
  background: var(--gold); color: var(--navy-deep);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(246,180,44,0.4);
}
.step-head h2 { margin: 0; }

/* ----- CTA band ---------------------------------------------------------- */
.cta-band { margin-top: 1.6rem; display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; }

/* Big friendly CTA panel */
.cta-panel {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: var(--cream);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 5vw, 3.2rem);
  margin-top: 1.5rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.cta-panel h2 { color: var(--cream); }
.cta-panel p { color: #c9d6e4; }
.cta-panel .sun-mini {
  position: absolute; right: -30px; top: -30px; width: 200px; height: 200px;
  color: rgba(246,180,44,0.16); pointer-events: none;
}

/* ----- Footer ------------------------------------------------------------ */
.site-footer {
  background: var(--navy-deep);
  color: #c4d0dd;
  margin-top: 3rem;
  border-radius: clamp(28px, 5vw, 56px) clamp(28px, 5vw, 56px) 0 0;
  position: relative;
  overflow: hidden;
}
.site-footer .container { padding-block: clamp(2.6rem, 5vw, 3.8rem); position: relative; z-index: 2; }
.site-footer .sun-mini {
  position: absolute; left: -40px; bottom: -50px; width: 240px; height: 240px;
  color: rgba(246,180,44,0.10); z-index: 1; pointer-events: none;
}
.colophon-mark {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.colophon-mark img { width: 46px; height: 46px; border-radius: 50%; }
.colophon-mark .a { font-family: var(--display); font-size: 1.2rem; color: var(--cream); font-weight: 600; }
.colophon-mark .b { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.site-footer h4 {
  color: var(--gold); font-family: var(--body); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; margin-bottom: 0.7rem;
}
.site-footer p { color: #c4d0dd; font-size: 0.95rem; margin-bottom: 0.5rem; max-width: none; }
.site-footer a { color: var(--cream); text-decoration-color: var(--gold); }
.site-footer a:hover { color: var(--gold); }
.copyright {
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem; color: #8b99a8;
}

/* ----- Load-in animation ------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.rise.d1 { animation-delay: 0.05s; }
.rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.28s; }
.rise.d4 { animation-delay: 0.40s; }

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .site-header .container { flex-wrap: wrap; gap: 0.6rem; }
  .brand img { width: 44px; height: 44px; }
  nav.primary { gap: 0.2rem; }
  nav.primary a { padding: 0.4rem 0.7rem; font-size: 0.86rem; }
  .info-box dl { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .info-box dt { padding-top: 0.7rem; }
  .info-box dt:first-child { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; transition: none !important; }
  .rise { opacity: 1; }
}
