/* =========================================================
   AFTER SCHOOL ACADEMY — Design System
   Signature idea: the whole site is set in Lexend, the
   sans-serif literally designed (and proven in study) to
   improve reading proficiency — a typeface choice that IS
   the brand's mission. Data/labels use IBM Plex Mono so
   phone numbers, timings and badges are instantly scannable
   for parents skimming on a phone.
   ========================================================= */

:root {
  /* --- Color tokens (named) ------------------------------ */
  --ink: #20262f;              /* body text */
  --navy: #17395f;             /* primary — trust, headers, nav */
  --navy-deep: #0f2843;        /* hover / pressed */
  --paper: #faf7f0;            /* warm off-white background */
  --paper-raised: #ffffff;     /* card surfaces */
  --sky: #e7eef6;              /* soft tint surfaces */
  --marigold: #f0a202;         /* secondary accent — warmth, energy */
  --marigold-deep: #c98300;
  --rust: #d6483a;             /* primary CTA accent — echoes the logo red */
  --rust-deep: #b53a2e;
  --line: #e4ddcf;             /* hairline borders on paper */
  --line-soft: #dfe6ee;

  /* --- Type ------------------------------------------------ */
  --font-display: 'Lexend', system-ui, sans-serif;
  --font-body: 'Lexend', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* --- Scale ------------------------------------------------ */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 1.9rem);
  --step-3:  clamp(1.9rem, 1.65rem + 1.2vw, 2.6rem);
  --step-4:  clamp(2.4rem, 2rem + 2vw, 3.6rem);

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 28px;
  --shadow-card: 0 1px 2px rgba(23,57,95,.06), 0 8px 24px rgba(23,57,95,.08);
  --container: 1180px;
}

/* --- Reset / base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; color: var(--navy-deep); }
h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
section { padding-block: clamp(48px, 7vw, 96px); }

/* Visible focus for keyboard users everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--marigold);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--rust); display: inline-block; }

.lede { font-size: var(--step-1); color: #45505f; max-width: 62ch; }

/* --- Buttons -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: var(--step-0);
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-deep); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-ghost { background: var(--sky); color: var(--navy-deep); }
.btn-ghost:hover { background: var(--line-soft); }

/* --- Header / Nav ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,247,240,0.92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 12px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy-deep); line-height: 1.1; }
.brand-word small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 10px 14px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: .95rem; color: var(--ink); transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--sky); color: var(--navy-deep); }
.nav-links a[aria-current="page"] { background: var(--navy); color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-phone { display: none; }
@media (min-width: 640px) {
  .nav-phone { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: .85rem; color: var(--navy); text-decoration: none; }
}

.menu-toggle { display: none; }
@media (max-width: 980px) {
  .nav-links { position: fixed; inset: 64px 0 0 0; background: var(--paper); flex-direction: column; align-items: stretch; padding: 16px 20px; gap: 6px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease; overflow-y: auto; }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line);
    background: var(--paper-raised); cursor: pointer;
  }
}

/* --- Hero -------------------------------------------------------- */
.hero { padding-block: clamp(40px, 8vw, 88px) clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: .35em; }
.hero-photo {
  position: relative; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-card);
  aspect-ratio: 4/3;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: 18px; bottom: 18px; background: var(--paper-raised);
  border-radius: var(--radius-m); padding: 12px 16px; box-shadow: var(--shadow-card);
  font-family: var(--font-mono); font-size: .8rem; display: flex; align-items: center; gap: 10px; max-width: 82%;
}
.hero-badge strong { display:block; font-family: var(--font-display); font-size: 1rem; color: var(--navy-deep); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.trust-row .stat strong { display: block; font-family: var(--font-display); font-size: var(--step-2); color: var(--navy-deep); }
.trust-row .stat span { font-size: var(--step--1); color: #5a6472; }

/* --- Cards / grids -------------------------------------------------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-raised); border-radius: var(--radius-m); padding: 26px;
  border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.card .icon-badge {
  width: 46px; height: 46px; border-radius: 12px; background: var(--sky);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px; color: var(--navy);
}
.card h3 { font-size: var(--step-1); margin-bottom: .4em; }
.card p { color: #4a5563; margin-bottom: 0; font-size: var(--step--1); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-alt { background: var(--sky); }

/* --- Program list ------------------------------------------------------- */
.program-row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center;
  padding: 22px; border-radius: var(--radius-m); background: var(--paper-raised);
  border: 1px solid var(--line); margin-bottom: 14px;
}
@media (max-width: 640px) { .program-row { grid-template-columns: 56px 1fr; } .program-row .btn { grid-column: 1 / -1; } }
.program-row .num { font-family: var(--font-mono); font-size: var(--step-2); color: var(--rust); font-weight: 600; }
.program-row h3 { margin-bottom: 4px; }
.program-row .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-family: var(--font-mono); font-size: .72rem; background: var(--sky); color: var(--navy-deep); padding: 4px 10px; border-radius: 999px; }

/* --- Testimonials -------------------------------------------------------- */
.quote-card { background: var(--paper-raised); border-radius: var(--radius-m); padding: 26px; border: 1px solid var(--line); box-shadow: var(--shadow-card); display: flex; flex-direction: column; height: 100%; }
.quote-mark { font-family: var(--font-display); font-size: 2.4rem; color: var(--marigold); line-height: 1; margin-bottom: 6px; }
.quote-card p.quote-text { color: #37414f; margin-bottom: 16px; flex-grow: 1; }
.quote-attrib { font-family: var(--font-mono); font-size: .78rem; color: var(--navy); border-top: 1px dashed var(--line); padding-top: 12px; }
.quote-attrib strong { display: block; font-family: var(--font-display); font-size: .95rem; color: var(--navy-deep); }

/* --- Gallery -------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-card); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* --- FAQ -------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 4px; font-family: var(--font-display);
  font-weight: 600; font-size: var(--step-0); display: flex; justify-content: space-between; align-items: center; gap: 16px;
  color: var(--navy-deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--rust); flex-shrink: 0; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 4px 20px; color: #45505f; max-width: 68ch; }

/* --- Map / location block -------------------------------------------------------- */
.area-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-family: var(--font-mono); font-size: .82rem; }

/* --- Form -------------------------------------------------------------- */
.form-grid { display: grid; gap: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 6px; color: var(--navy-deep); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--step-0); padding: 13px 14px;
  border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--paper-raised); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; }
textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: .8rem; color: #6b7484; }
.form-status { font-size: .9rem; padding: 12px 14px; border-radius: var(--radius-s); display: none; }
.form-status.ok { display: block; background: #e6f3ea; color: #1c6b3a; }
.form-status.err { display: block; background: #fbe9e7; color: #a33627; }

/* --- CTA band -------------------------------------------------------------- */
.cta-band { background: var(--navy); color: #fff; border-radius: var(--radius-l); padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h2, .cta-band p { color: #fff; margin: 0; }
.cta-band p { opacity: .85; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy-deep); color: #dbe3ee; padding-block: 56px 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #b9c5d6; text-decoration: none; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8rem; color: #8fa0b8; }

/* --- Skip link -------------------------------------------------------------- */
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0; z-index: 100; }
.skip-link:focus { left: 0; }

/* --- Utility -------------------------------------------------------------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--marigold); color: #29200a; font-family: var(--font-mono); font-size: .78rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
