/* ==========================================================================
   Emuna Learning Centre — Stylesheet
   Palette pulled directly from the school crest:
   charcoal cap, gold tassel, sky-blue key & book, leaf-green page edge.
   ========================================================================== */

:root {
  /* --- Brand colour tokens (from logo) --- */
  --ink: #2b2828;          /* charcoal — cap, primary text */
  --ink-soft: #5b5654;     /* secondary text */
  --ink-faint: #8a8481;

  --gold: #e2a429;         /* tassel gold — primary accent / CTAs */
  --gold-deep: #926a1a;    /* accessible gold-on-white/cream text (AA, 4.5:1+) */
  --gold-pale: #fbe9c6;

  --sky: #3e85a8;          /* key & book blue */
  --sky-deep: #2c6883;
  --sky-pale: #dceef4;

  --leaf: #128a50;         /* page-edge green */
  --leaf-deep: #0d6b3e;
  --leaf-pale: #d9f0e2;

  --cream: #fbf6ec;        /* warm paper background */
  --cream-deep: #f3ead7;
  --white: #ffffff;

  /* --- Type --- */
  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-body: "Karla", "Segoe UI", system-ui, sans-serif;

  /* --- Layout --- */
  --max-width: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 12px 32px -16px rgba(43, 40, 40, 0.28);
  --shadow-card: 0 8px 24px -12px rgba(43, 40, 40, 0.22);
}

/* --- Reset --- */
html, body { overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.14;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
  display: inline-block;
}
.eyebrow.on-dark { color: var(--gold); }

.section {
  padding: 72px 0;
}
.section--tight { padding: 48px 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: var(--cream); }
.section--ink h2, .section--ink h3 { color: var(--white); }
.section--ink p { color: #d9d4d0; }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: #ecb545; }
.btn-outline { border-color: currentColor; color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-ink { border-color: var(--ink); color: var(--ink); }
.btn-outline-ink:hover { background: var(--ink); color: var(--white); }
.btn-sky { background: var(--sky); color: var(--white); box-shadow: var(--shadow-card); }
.btn-sky:hover { background: var(--sky-deep); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-deep);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  max-width: 1320px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  flex-shrink: 0;
}
.brand img { height: 40px; width: auto; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-name small {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.main-nav { display: flex; align-items: center; gap: 2px; flex-shrink: 1; min-width: 0; }
.main-nav ul { flex-wrap: nowrap; }
.main-nav a {
  font-weight: 700;
  font-size: 0.87rem;
  padding: 9px 11px;
  border-radius: 999px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { background: var(--cream); color: var(--ink); }
.main-nav a.active { color: var(--ink); background: var(--gold-pale); }

.header-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-cta .btn { padding: 10px 16px; font-size: 0.85rem; }
.header-cta-mobile { display: none; }
.call-chip {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Hero + signature wave divider
   ========================================================================== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero--short { min-height: 46vh; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 22, 22, 0.35) 0%, rgba(24, 22, 22, 0.55) 55%, rgba(20, 18, 18, 0.92) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 76px;
  width: 100%;
}
.hero-inner h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  color: var(--white);
  max-width: 15ch;
}
.hero-inner .lede {
  font-size: 1.12rem;
  max-width: 52ch;
  color: #f1ede6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  backdrop-filter: blur(3px);
}
.hero-badge strong { font-family: var(--font-display); font-size: 1rem; }

.wave-divider {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: 46px;
  margin-top: -2px;
}
.wave-divider svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   Stat band
   ========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  border-top: 5px solid var(--gold);
}
.stat-card:nth-child(2) { border-top-color: var(--sky); }
.stat-card:nth-child(3) { border-top-color: var(--leaf); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 2.8rem);
  color: var(--ink);
  display: block;
}
.stat-label {
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ==========================================================================
   Cards / grids
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.info-card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-card);
}
.info-card .icon-badge { margin-bottom: 16px; }
.info-card h3 { font-size: 1.2rem; }
.info-card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.97rem; }

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-pale);
  color: var(--gold-deep);
}
.icon-badge.sky { background: var(--sky-pale); color: var(--sky-deep); }
.icon-badge.leaf { background: var(--leaf-pale); color: var(--leaf-deep); }
.icon-badge svg { width: 26px; height: 26px; }
.icon-badge svg * { stroke: currentColor; }

.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.media-split.reverse .media-split-media { order: 2; }
.media-split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  width: 100%;
  aspect-ratio: 4/3.1;
  object-fit: cover;
}
.media-split-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.media-split-text p { color: var(--ink-soft); }

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-weight: 600;
}
.check-list li svg { flex-shrink: 0; margin-top: 3px; width: 22px; height: 22px; color: var(--leaf-deep); }

/* ==========================================================================
   Photo strip / gallery
   ========================================================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.photo-grid a, .photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform 0.35s ease;
}
.photo-tile { overflow: hidden; border-radius: var(--radius-sm); box-shadow: var(--shadow-card); }
.photo-tile:hover img { transform: scale(1.06); }
.photo-tile.tall { grid-row: span 2; }
.photo-tile.tall img { aspect-ratio: 1/2.06; }
.photo-tile.wide { grid-column: span 2; }
.photo-tile.wide img { aspect-ratio: 2/1; }
.photo-caption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding-top: 6px;
}

/* ==========================================================================
   Steps (genuine sequence — admissions)
   ========================================================================== */
.step-list {
  display: grid;
  gap: 0;
  counter-reset: step;
}
.step-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  position: relative;
  padding-bottom: 40px;
}
.step-item:last-child { padding-bottom: 0; }
.step-item::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.15rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: -4px;
  width: 2px;
  background: var(--cream-deep);
}
.step-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step-body p { color: var(--ink-soft); margin-bottom: 0; }

/* ==========================================================================
   Quote / principal message
   ========================================================================== */
.quote-block {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 44px;
  position: relative;
  border-left: 6px solid var(--gold);
}
.quote-block p.quote-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--ink);
  line-height: 1.5;
}
.quote-attrib { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.quote-attrib strong { display: block; font-size: 0.98rem; }
.quote-attrib span { color: var(--ink-soft); font-size: 0.85rem; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: linear-gradient(120deg, var(--ink) 0%, #3a3432 100%);
  border-radius: var(--radius-lg);
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  color: var(--white);
}
.cta-band h2 { color: var(--white); font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 20ch; }
.cta-band p { color: #d9d4d0; margin-bottom: 0; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Form (contact)
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 36px;
  border: 1px solid var(--cream-deep);
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 7px;
  color: var(--ink);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--cream-deep);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sky);
  background: var(--white);
  outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }

.contact-info-list { display: grid; gap: 18px; }
.contact-info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.contact-info-item .icon-badge { flex-shrink: 0; }
.contact-info-item h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-info-item p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.95rem; }
.contact-info-item a { color: var(--sky-deep); font-weight: 700; }
.contact-info-item a:hover { text-decoration: underline; }

.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--cream-deep);
}
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #cfc9c5;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand-badge {
  background: var(--white);
  display: inline-flex;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.footer-brand-badge img { height: 46px; width: auto; }
.site-footer p { color: #b9b2ad; font-size: 0.93rem; }
.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #cfc9c5; font-size: 0.93rem; transition: color 0.15s ease; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.82rem;
  color: #938d89;
}
.footer-bottom a { color: #938d89; }
.footer-bottom a:hover { color: var(--gold); }

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 800;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1160px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 84vw);
    height: 100vh;
    background: var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 90px 24px 24px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { color: #e7e2dd; padding: 14px 16px; font-size: 1rem; }
  .main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.08); color: var(--gold); }
  .main-nav .header-cta-mobile { margin-top: 16px; display: block; }
  .nav-toggle { display: block; z-index: 110; }
  .header-cta .btn-outline-ink { display: none; }
}

@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .media-split { grid-template-columns: 1fr; gap: 28px; }
  .media-split.reverse .media-split-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .section { padding: 52px 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .card-grid, .card-grid.two { grid-template-columns: 1fr; }
  .cta-band { padding: 34px 26px; flex-direction: column; align-items: flex-start; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-tile.wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero { min-height: 86vh; }
  .hero-inner { padding-bottom: 60px; }
}

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-name small { display: none; }
  .brand img { height: 34px; }
  .brand-name { font-size: 0.92rem; }
  .header-cta { gap: 4px; }
  .header-cta .btn-primary { display: none; }
  .nav-toggle { padding: 8px 4px; }
}

@media (max-width: 340px) {
  .brand-name { font-size: 0.8rem; }
  .header-bar { padding: 10px 14px; gap: 8px; }
  .brand { gap: 6px; }
  .brand img { height: 30px; }
}

