/* Jayden Educational Centre: clean layout.
   One accent colour (the maroon of the school jumper), warm neutrals, plenty of space. */

:root {
  --brand: #8b1e2d;
  --brand-dark: #681624;
  --brand-soft: #f8eced;
  --ink: #1d2433;
  --muted: #5b6474;
  --line: #e5e2dd;
  --wash: #f7f4f0;
  --white: #ffffff;
  --radius: 14px;
  --container: 1120px;
  --font: Jost, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-wash { background: var(--wash); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.kicker { display: block; margin-bottom: .6rem; color: var(--brand); font-size: .9rem; font-weight: 600; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--muted); }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.4rem; border: 2px solid var(--brand); border-radius: 999px; background: var(--brand); color: var(--white); font: 600 1rem/1.2 var(--font); text-decoration: none; transition: background .2s, color .2s; cursor: pointer; }
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-quiet { background: transparent; color: var(--brand); }
.button-quiet:hover { background: var(--brand-soft); color: var(--brand-dark); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.text-link { font-weight: 600; text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; }

/* Dev notice */
.dev-strip { padding: .4rem 1rem; background: #fff4d6; color: #6b4a00; border-bottom: 1px solid #f0d58a; font-size: .85rem; font-weight: 600; text-align: center; }

/* Header */
/* No backdrop-filter here: it would trap the fixed mobile menu inside the header. */
.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: min(1240px, 100% - 2rem); min-height: 72px; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); font-weight: 700; line-height: 1.15; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.brand small { display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
.menu { display: flex; align-items: center; gap: .25rem; }
.menu > a, .menu-group-button { padding: .5rem .8rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; }
.menu > a:hover, .menu-group-button:hover { background: var(--wash); }
.menu [aria-current="page"] { color: var(--brand); font-weight: 600; }
.menu-group { position: relative; }
.menu-group-button::after { content: ""; display: inline-block; width: .45em; height: .45em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.15em) rotate(45deg); }
.menu-group-items { position: absolute; top: calc(100% + .4rem); left: 0; display: none; min-width: 210px; padding: .5rem; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(29,36,51,.1); }
.menu-group.is-open .menu-group-items { display: grid; }
.menu-group-items a { padding: .55rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.menu-group-items a:hover { background: var(--wash); }
.menu .menu-portal { margin-left: .5rem; padding: .5rem 1rem; border: 2px solid var(--brand); border-radius: 999px; color: var(--brand); font-weight: 600; }
.menu .menu-portal:hover { background: var(--brand-soft); }
.menu-button { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; margin: auto; background: var(--ink); content: ""; position: relative; transition: transform .2s; }
.menu-icon::before { position: absolute; top: -6px; }
.menu-icon::after { position: absolute; top: 6px; }
.menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-button[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-button { display: block; }
  .menu { position: fixed; inset: 72px 0 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem; background: var(--white); overflow-y: auto; }
  .menu.is-open { display: flex; }
  .menu > a, .menu-group-button { width: 100%; padding: .9rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; font-size: 1.1rem; }
  .menu-group-items { position: static; min-width: 0; padding: 0 0 .5rem 1rem; border: 0; box-shadow: none; }
  .menu .menu-portal { margin: 1rem 0 0; text-align: center; border-radius: 999px; }
  body.menu-open { overflow: hidden; }
}

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0; background: var(--wash); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
.hero-text .lead { max-width: 520px; margin-bottom: 1.75rem; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; }
.hero-note { margin-top: 1.5rem; color: var(--muted); font-size: .95rem; }
.hero-note a { font-weight: 600; }

/* School stages: three simple columns, no boxes */
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stage { padding-top: 1.25rem; border-top: 3px solid var(--brand); }
.stage p { color: var(--muted); }

/* Photo beside text */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.split-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.split-reverse .split-photo { order: 2; }

.ticks { margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.ticks li { position: relative; margin-bottom: 1rem; padding-left: 2rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: .6rem; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.ticks strong { display: block; }
.ticks span { color: var(--muted); }

/* Simple link list (parents) */
.link-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: block; height: 100%; padding: 1.25rem 1rem 1.25rem 0; color: var(--ink); text-decoration: none; }
.link-list a strong { display: block; color: var(--brand); }
.link-list a span { color: var(--muted); font-size: .95rem; }
.link-list a:hover strong { text-decoration: underline; }

/* Call to action band */
.cta { padding: clamp(3rem, 7vw, 4.5rem) 0; background: var(--brand); color: var(--white); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta h2 { margin-bottom: .25rem; }
.cta p { margin: 0; color: rgba(255,255,255,.85); }
.cta a:not(.button) { color: var(--white); font-weight: 600; }
.cta .button { background: var(--white); border-color: var(--white); color: var(--brand); }
.cta .button:hover { background: var(--brand-soft); border-color: var(--brand-soft); }

/* Inner page header */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem); background: var(--wash); }
.breadcrumb { margin-bottom: 1rem; color: var(--muted); font-size: .9rem; }
.breadcrumb a { color: var(--muted); }
.page-head .lead { max-width: 640px; margin: 0; }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.steps p { color: var(--muted); }

/* Topics list (definition style) */
.topics { margin: 0; }
.topics dt { margin-top: 1.5rem; font-weight: 600; }
.topics dt:first-child { margin-top: 0; }
.topics dd { margin: .25rem 0 0; color: var(--muted); }

.contact-lines { margin: 2rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.contact-lines li { margin-bottom: .5rem; }
.contact-lines span { display: inline-block; min-width: 6.5rem; color: var(--muted); }

/* Enquiry form (shared partial) */
.enquiry-form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.form-title span { display: none; }
.form-title h3 { margin-bottom: .25rem; font-size: 1.4rem; }
.form-title p { margin: 0; color: var(--muted); font-size: .95rem; }
.enquiry-form label { display: grid; gap: .4rem; font-weight: 600; font-size: .95rem; }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea { width: 100%; padding: .75rem .9rem; border: 1px solid #cfcac3; border-radius: 10px; background: var(--white); color: var(--ink); font: 400 1rem/1.4 var(--font); }
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.enquiry-form [aria-invalid="true"] { border-color: #b42318; }
.enquiry-form .button { justify-self: start; }
.form-alert { margin: 0; padding: .85rem 1rem; border-radius: 10px; font-weight: 600; }
.form-alert-success { background: #e7f6ec; color: #145c2e; }
.form-alert-error { background: #fdecec; color: #8a1c1c; }
.field-error { color: #b42318; font-weight: 600; font-size: .9rem; }
.form-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { padding: 3.5rem 0 1.5rem; background: #1d2433; color: rgba(255,255,255,.75); font-size: .95rem; }
.footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid nav { display: grid; align-content: start; gap: .4rem; }
.footer-name { margin-bottom: .5rem; color: var(--white); font-size: 1.15rem; font-weight: 700; }
.footer-note { max-width: 360px; }
.footer-heading { margin-bottom: .5rem; color: var(--white); font-weight: 600; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
.footer-bottom span a { margin-left: 1.25rem; }

/* WhatsApp: one small button, bottom right */
.whatsapp-button { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-radius: 999px; background: #1f8f4e; color: var(--white); font-weight: 600; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.whatsapp-button:hover { background: #18773f; }

/* Small screens */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .split-reverse .split-photo { order: 0; }
  .stages { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .link-list { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .steps, .link-list { grid-template-columns: 1fr; }
  .whatsapp-button span { display: none; }
  .whatsapp-button { padding: .8rem; }
  .footer-bottom span a { margin: 0 1.25rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
