/* ==========================================================================
   Elyon Nursery & Primary School — stylesheet
   Palette drawn from the pupils' uniform: red-and-white gingham with a
   navy crest. Red = energy & warmth, navy = trust, cream/rose = softness.
   ========================================================================== */

:root {
  --red:        #cc2b2b;
  --red-dark:   #a81f1f;
  --red-deep:   #8a1818;
  --red-soft:   #f7dede;
  --rose:       #fbecec;
  --navy:       #1c2b45;
  --navy-soft:  #33425f;
  --gold:       #e8983a;
  --gold-light: #f6c453;
  --cream:      #fdfbf7;
  --paper:      #ffffff;
  --ink:        #2a2a33;
  --ink-soft:   #5d5d68;
  --line:       #ece4e4;

  --shadow-sm: 0 2px 8px rgba(28, 43, 69, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 43, 69, 0.10);
  --shadow-lg: 0 24px 60px rgba(138, 24, 24, 0.16);

  --radius:     14px;
  --radius-lg:  26px;
  --wrap:       1140px;
  --gutter:     clamp(1.1rem, 4vw, 2.25rem);

  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

/* gingham nod — a faint red check, used sparingly on accent bands */
.gingham {
  background-color: var(--rose);
  background-image:
    linear-gradient(45deg, rgba(204,43,43,.10) 25%, transparent 25%, transparent 75%, rgba(204,43,43,.10) 75%),
    linear-gradient(45deg, rgba(204,43,43,.10) 25%, transparent 25%, transparent 75%, rgba(204,43,43,.10) 75%);
  background-size: 26px 26px;
  background-position: 0 0, 13px 13px;
}

/* --------------------------------------------------------------- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--red-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; color: var(--navy); font-weight: 600; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; top: -60px; left: 1rem; z-index: 1000;
  background: var(--navy); color: #fff; padding: .8rem 1.2rem;
  border-radius: var(--radius); font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------- layout --- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tint { background: var(--rose); }
.section--paper { background: var(--paper); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .8rem;
}
.section-head { max-width: 44rem; margin-bottom: 2.6rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.section-head p { color: var(--ink-soft); margin-top: .9rem; font-size: 1.08rem; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 800; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 100px; border: 2px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  line-height: 1; white-space: nowrap;
}
.btn--primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--red-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: #fff; color: var(--red-dark); transform: translateY(-2px); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-soft); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* --------------------------------------------------------------- header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand img { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--red-dark); letter-spacing: .01em; }
.brand__sub { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  font-weight: 700; font-size: .96rem; color: var(--navy);
  padding: .5rem .8rem; border-radius: 100px;
}
.nav a:hover { color: var(--red-dark); background: var(--rose); }
.nav a.nav-cta { background: var(--red); color: #fff; padding: .55rem 1.15rem; margin-left: .4rem; }
.nav a.nav-cta:hover { background: var(--red-dark); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; color: var(--navy); }
.nav-toggle svg { width: 30px; height: 30px; }

/* --------------------------------------------------------------- hero ----- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(28,43,69,.42) 0%, rgba(138,24,24,.30) 45%, rgba(138,24,24,.80) 100%),
    radial-gradient(120% 90% at 15% 20%, rgba(28,43,69,.35), transparent 60%);
}
.hero__inner { padding-block: clamp(4rem, 12vw, 8rem); max-width: 46rem; }
.hero__pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.pill {
  font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
  color: #fff; padding: .35rem .9rem; border-radius: 100px; backdrop-filter: blur(2px);
  transition: background .15s ease, transform .15s ease;
}
a.pill:hover, a.pill:focus-visible {
  background: rgba(255,255,255,.3); transform: translateY(-1px);
}
.hero h1 { color: #fff; font-size: clamp(2.5rem, 7vw, 4.4rem); font-weight: 700; letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero__tag { font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 600; margin-top: 1rem; color: #fff; opacity: .95; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero__motto { margin-top: 2.4rem; font-family: var(--font-head); font-style: italic; font-size: 1.05rem; opacity: .9; border-left: 3px solid var(--gold-light); padding-left: 1rem; }

/* quick facts strip under hero */
.facts { background: var(--navy); color: #fff; }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.6rem; text-align: center; }
.facts__grid .num { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--gold-light); display: block; }
.facts__grid .lbl { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; opacity: .85; font-weight: 700; }

/* --------------------------------------------------------------- about ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split__media { position: relative; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; }
.split__media .badge-note {
  position: absolute; bottom: -18px; right: -10px;
  background: var(--red); color: #fff; font-weight: 800; font-size: .9rem;
  padding: .8rem 1.1rem; border-radius: var(--radius); box-shadow: var(--shadow-md); max-width: 12rem; line-height: 1.3;
}
.split__media .badge-note span { display: block; font-family: var(--font-head); font-size: 1.6rem; }
.prose p + p { margin-top: 1rem; }
.prose p { color: var(--ink-soft); }
.verse { margin-top: 1.4rem; font-family: var(--font-head); font-style: italic; color: var(--navy); border-left: 3px solid var(--red); padding-left: 1rem; font-size: 1.05rem; }
.verse cite { display: block; font-style: normal; font-family: var(--font-body); font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-top: .4rem; }

/* --------------------------------------------------------------- programmes */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
  scroll-margin-top: 90px;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__img { aspect-ratio: 3/2; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__age { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.card__body h3 { font-size: 1.35rem; margin: .3rem 0 .5rem; }
.card__body p { color: var(--ink-soft); font-size: .98rem; }

/* --------------------------------------------------------------- features - */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; }
.feature { background: var(--paper); border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--rose); color: var(--red-dark); margin-bottom: 1rem;
}
.feature__icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.feature p { color: var(--ink-soft); font-size: .96rem; }

/* --------------------------------------------------------------- gallery -- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery a { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: block; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; height: 100%; transition: transform .4s ease, filter .3s ease; }
.gallery a:hover img { transform: scale(1.06); filter: saturate(1.1); }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gallery { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- CTA band - */
.cta-band { background: linear-gradient(120deg, var(--red-dark), var(--red)); color: #fff; text-align: center; border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4rem); box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.7rem); }
.cta-band p { max-width: 34rem; margin: 1rem auto 1.8rem; opacity: .95; font-size: 1.1rem; }
.cta-band .btn--ghost { border-color: #fff; }

/* --------------------------------------------------------------- contact -- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.info-list { list-style: none; display: grid; gap: 1.2rem; margin-top: .5rem; }
.info-list li { display: flex; gap: .9rem; align-items: flex-start; }
.info-list .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--rose); color: var(--red-dark); display: grid; place-items: center; }
.info-list .ic svg { width: 22px; height: 22px; }
.info-list b { display: block; color: var(--navy); font-family: var(--font-head); }
.info-list span, .info-list a { color: var(--ink-soft); }
.hours { margin-top: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-sm); }
.hours h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.hours dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; font-size: .96rem; }
.hours dt { color: var(--ink-soft); }
.hours dd { text-align: right; font-weight: 700; color: var(--navy); }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem, 4vw, 2.2rem); box-shadow: var(--shadow-md); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; color: var(--navy); margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem 1rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(204,43,43,.14); }
.field textarea { resize: vertical; min-height: 130px; }
.field.hp { position: absolute; left: -9999px; }
.form-note { font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }
.form-status { border-radius: 12px; padding: .9rem 1.1rem; font-weight: 700; margin-bottom: 1.1rem; display: none; }
.form-status.ok { display: block; background: #e6f4ea; color: #1e6b3a; border: 1px solid #b7e0c4; }
.form-status.err { display: block; background: #fdecec; color: var(--red-dark); border: 1px solid #f2c2c2; }

.map-embed { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--line); margin-top: 2.5rem; }
.map-embed iframe { display: block; width: 100%; height: 340px; border: 0; }

/* --------------------------------------------------------------- footer --- */
.site-footer { background: var(--navy); color: #cdd4e0; padding-block: 3rem 1.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__sub { color: #9aa6bd; }
.footer-about p { margin-top: 1rem; font-size: .95rem; color: #aab4c8; max-width: 24rem; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer-col a { color: #cdd4e0; font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom a { color: #cdd4e0; text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }
.footer-col p { font-size: .95rem; color: #aab4c8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.4rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem; color: #8b97ae; }

/* --------------------------------------------------------------- page hero  */
.page-hero { background: var(--navy); color: #fff; padding-block: clamp(2.6rem, 7vw, 4.2rem); position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); }
.page-hero p { color: #c9d2e2; margin-top: .6rem; max-width: 40rem; }
.crumbs { font-size: .85rem; color: #9fb0c9; margin-bottom: .8rem; }
.crumbs a { color: #cdd8e8; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: .8rem var(--gutter) 1.4rem;
    gap: .2rem; box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .25s ease; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: .8rem .6rem; border-radius: 10px; }
  .nav a.nav-cta { margin-left: 0; margin-top: .4rem; text-align: center; }
  .nav-toggle { display: block; }
}
@media (max-width: 480px) {
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
