/* ==========================================================================
   Maple Ridge Primary School — stylesheet
   Design tokens live at the top as CSS variables. To reskin the whole site,
   change the values in :root — everything else references them.
   ========================================================================== */

:root {
  /* Color */
  --sky:        #F3FAFF;   /* page background — soft sky tint, not cream */
  --paper:      #FFFFFF;   /* card / panel background */
  --ink:        #23393D;   /* chalkboard teal-black — primary text */
  --ink-soft:   #4B6266;   /* secondary text */
  --sun:        #FFC93C;   /* sunshine yellow — primary accent */
  --sun-deep:   #F2A900;   /* pressed / hover state for sun */
  --grass:      #4E9B4A;   /* grass green — secondary accent */
  --grass-deep: #3B7A38;
  --sky-line:   #4FB6E8;   /* sky blue — tertiary accent, links */
  --crayon:     #E85D4C;   /* crayon red — rare highlight only */
  --line:       #DCEAF2;   /* hairline borders */

  /* Type */
  --font-head: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Work Sans', system-ui, sans-serif;

  /* Layout */
  --max-w: 1080px;
  --radius: 14px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 3rem;
  --space-5: 5rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em 0;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em 0; max-width: 62ch; }

a { color: var(--grass-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--sun-deep); }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: white;
  padding: 0.6em 1em;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--sky-line);
  outline-offset: 2px;
}

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }

.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

nav.primary-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4em 0.1em;
  border-bottom: 3px solid transparent;
}

nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--sun);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0.4em 0.6em;
  font-size: 1.3rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  nav.primary-nav {
    display: none;
    width: 100%;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: var(--space-2);
  }
  nav.primary-nav a {
    display: block;
    padding: 0.7em 0;
    border-bottom: 1px solid var(--line);
  }
  .site-header .container { flex-wrap: wrap; }
}

/* ---------------------------------- Buttons ---------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--sun);
  color: var(--ink);
}
.btn-primary:hover { background: var(--sun-deep); color: var(--ink); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  padding: var(--space-5) 0 var(--space-4);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: center;
}

@media (max-width: 800px) {
  .hero .container { grid-template-columns: 1fr; }
}

.hero-eyebrow {
  color: var(--grass-deep);
  font-weight: 600;
  margin-bottom: 0.6em;
}

.hero-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  flex-wrap: wrap;
}

.hero-facts {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.hero-fact strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--grass-deep);
}
.hero-fact span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------------------------------- Path divider ---------------------------------- */

.path-divider {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
}

/* ---------------------------------- Sections ---------------------------------- */

section { padding: var(--space-5) 0; }
section.tight { padding: var(--space-4) 0; }

.section-band { background: var(--paper); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-4);
}

.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }

/* Quick links — asymmetric, not identical cards */

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (max-width: 760px) {
  .quick-links { grid-template-columns: 1fr; }
}

.quick-link {
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-link:nth-child(1) { border-color: var(--sun); }
.quick-link:nth-child(2) { border-color: var(--sky-line); }
.quick-link:nth-child(3) { border-color: var(--grass); }

.quick-link .icon { width: 44px; height: 44px; }

.quick-link h3 { margin-bottom: 0.2em; }
.quick-link p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* About / mission */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }

.value-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.value-list li { display: flex; gap: 0.7rem; align-items: flex-start; }
.value-list .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--grass);
  margin-top: 0.5em; flex-shrink: 0;
}

/* Steps (admissions) — a genuine sequence, numbered is appropriate here */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: var(--space-3);
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-3);
  align-items: start;
}

.step-num {
  counter-increment: step;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.4rem;
}
.step-num::before { content: counter(step); }

.step h3 { margin-bottom: 0.2em; }

/* Key dates */

.dates-list { list-style: none; margin: 0; padding: 0; }
.dates-list li {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--line);
}
.dates-list .date-tag {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--grass-deep);
  min-width: 130px;
}

/* Staff */

.staff-lead {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-4);
}
@media (max-width: 620px) { .staff-lead { grid-template-columns: 1fr; text-align: center; } }

.avatar {
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--sky-line);
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: var(--font-head); font-size: 2.2rem; font-weight: 600;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}

.staff-card { display: flex; gap: var(--space-2); align-items: flex-start; }
.staff-card .avatar { width: 64px; height: 64px; font-size: 1.2rem; flex-shrink: 0; }
.staff-card h4 { margin: 0 0 0.1em; font-family: var(--font-head); }
.staff-card .role { color: var(--grass-deep); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3em; }
.staff-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

.contact-panel {
  background: var(--paper);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  padding: var(--space-3);
}

.contact-panel dt { font-weight: 600; margin-top: var(--space-2); }
.contact-panel dt:first-child { margin-top: 0; }
.contact-panel dd { margin: 0.15em 0 0; color: var(--ink-soft); }

/* News / events */

.news-list { display: grid; gap: var(--space-3); }

.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 600px) { .news-item { grid-template-columns: 1fr; } }

.news-date {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  background: var(--sky);
  border-radius: 10px;
  padding: 0.6em;
  text-align: center;
  height: fit-content;
}
.news-date .day { display: block; font-size: 1.5rem; line-height: 1; }
.news-date .month { display: block; font-size: 0.8rem; color: var(--ink-soft); }

.news-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grass-deep);
  background: #E9F5E8;
  padding: 0.15em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.4em;
}

/* FAQ */

.faq-item { border-bottom: 1px solid var(--line); padding: var(--space-2) 0; }
.faq-item summary {
  font-family: var(--font-head);
  font-weight: 600;
  cursor: pointer;
  padding: 0.3em 0;
}
.faq-item p { margin-top: 0.6em; color: var(--ink-soft); }

/* Quote */

.quote-band {
  background: var(--ink);
  color: white;
}
.quote-band blockquote {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 500;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.35;
}
.quote-band cite {
  display: block;
  margin-top: var(--space-2);
  font-style: normal;
  color: #C9DDE1;
  font-size: 1rem;
}

/* CTA band */

.cta-band {
  background: var(--grass);
  color: white;
  text-align: center;
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-3);
}
.cta-band h2 { color: white; }
.cta-band p { color: #E7F3E6; margin-left: auto; margin-right: auto; }
.cta-band .btn-primary { background: white; color: var(--grass-deep); }
.cta-band .btn-primary:hover { background: var(--sun); color: var(--ink); }

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  background: var(--ink);
  color: #C9DDE1;
  padding: var(--space-4) 0 var(--space-3);
  margin-top: var(--space-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); } }

.site-footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: var(--space-2);
}

.site-footer a { color: #C9DDE1; }
.site-footer a:hover { color: var(--sun); }

.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5em; }

.footer-bottom {
  border-top: 1px solid #3A4F53;
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  font-size: 0.85rem;
  color: #8FA9AE;
}
