/* ==========================================================================
   COLOURS: one place to change the look.
   Navy and blue follow the school uniform (abbeyprimary.net/school-uniform);
   red follows the nursery polo shirts. Yellow is a friendly accent.
   Keep text/background pairs at WCAG AA (4.5:1 for small text).
   --accent, --blue and --flag are for fills and shapes. Text on --accent uses --ink.
   If you change these, also change theme-color in index.html and the fill in
   assets/favicon.svg.
   ========================================================================== */
:root {
  --primary: #1b2f5b;        /* navy: headings, buttons, donate band */
  --primary-dark: #12203f;   /* hover state for primary */
  --on-primary: #ffffff;     /* text on primary */
  --blue: #2f6fb5;           /* school blue: bunting, list bullets */
  --accent: #f6c326;         /* sunny yellow: Donate buttons, highlights */
  --accent-dark: #e0ae12;    /* hover for accent */
  --flag: #d13b3b;           /* red: bunting only */
  --bg: #fbfaf6;             /* warm white page background */
  --surface: #ffffff;        /* cards */
  --ink: #1a1d24;            /* main text */
  --muted: #4d5566;          /* secondary text */
  --line: #dfe5ee;           /* borders */
  --tint: #eef3fa;           /* alternating section background */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3, .wordmark, .stat-big, .quote blockquote {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.15;
  color: var(--primary);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.site-footer :focus-visible, .donate :focus-visible, .impact :focus-visible { outline-color: #fff; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1rem; }
.narrow > *, .section-intro { max-width: 44rem; }
section { padding-block: 3.5rem; }
.alt { background: var(--tint); }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; color: #fff; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 4rem; }
.wordmark { font-size: 1.15rem; font-weight: 800; text-decoration: none; margin: 0; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 1.25rem; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .4rem 0; }
.nav-links a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; }

/* Buttons */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; text-align: center;
  padding: .75rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  background: var(--primary); color: var(--on-primary); line-height: 1.25;
}
.btn:hover { background: var(--primary-dark); color: var(--on-primary); }
.btn-accent, .btn-on-dark { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-dark); color: var(--ink); }
.btn-on-dark:hover { background: #fff; color: var(--ink); }
.btn-outline-on-dark { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-on-dark:hover { background: #fff; color: var(--primary); }
.btn-small { padding: .5rem 1.1rem; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }

/* Hero + bunting */
.hero { padding-top: 0; padding-bottom: 3rem; overflow: hidden; }
.bunting { display: block; width: 100%; height: 56px; }
.bunting .f1 { fill: var(--blue); }
.bunting .f2 { fill: var(--accent); }
.bunting .f3 { fill: var(--flag); }
.bunting .string { stroke: var(--ink); }
.hero-grid { display: grid; gap: 2rem; padding-top: 2rem; }
.eyebrow { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; color: var(--primary); margin-bottom: .75rem; }
.lead { font-size: 1.2rem; max-width: 36rem; }
.trust { font-size: .95rem; color: var(--muted); font-weight: 600; }

/* Impact panel */
.impact { background: var(--primary); color: var(--on-primary); border-radius: 20px; padding: 1.75rem; }
.impact h2 { color: #fff; font-size: 1.35rem; }
.stat { border-top: 1px solid rgba(255, 255, 255, .25); padding-top: 1rem; margin-top: 1rem; }
.stat p { margin-bottom: .25rem; }
.stat-big { color: var(--accent); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: .2rem; }
.source { font-size: .9rem; opacity: .9; margin: 1.25rem 0 0; }
.impact a { color: #fff; }

/* Quote */
.quote { margin: 2rem 0 0; padding-left: 1.25rem; border-left: 5px solid var(--accent); }
.quote blockquote { margin: 0; font-size: 1.35rem; font-weight: 700; }
.quote blockquote p { margin: 0; }
.quote figcaption { color: var(--muted); font-size: .95rem; margin-top: .4rem; }

/* Cards */
.grid { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon { color: var(--primary); width: 48px; height: 48px; display: block; margin-bottom: .75rem; }
.help-card h3 { margin-bottom: .4rem; }
.help-card a { font-weight: 700; }

.feature { margin-top: 1.75rem; border-left: 6px solid var(--accent); }
.feature p { max-width: 46rem; }
.tag {
  display: inline-block; background: var(--accent); color: var(--ink); font-weight: 700;
  font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  padding: .2rem .7rem; border-radius: 999px; margin-bottom: .75rem;
}
.date { color: var(--muted); font-weight: 600; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.4rem; margin-bottom: .45rem; }
.ticks li::before {
  content: ""; position: absolute; left: .15rem; top: .6em;
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--blue);
}

/* Donate band */
.donate { background: var(--primary); color: var(--on-primary); }
.donate h2 { color: #fff; }
.donate p { max-width: 38rem; font-size: 1.15rem; }

/* Contact */
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.25rem; }
.contact-list strong { display: block; color: var(--primary); }
.contact-list a { overflow-wrap: anywhere; }
.contact-list address { font-style: normal; }

/* Footer */
.site-footer { background: var(--ink); color: #eef0f4; padding-block: 2.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin-bottom: .6em; }

@media (min-width: 640px) {
  .grid.cols-2, .contact-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  section { padding-block: 5rem; }
  .nav-links { display: flex; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem; padding-top: 3rem; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4, .contact-list { grid-template-columns: repeat(4, 1fr); }
  .bunting { height: 72px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
