/* Eternal Optimist Combined Pre-Primary School
   Palette taken from the school uniform & building:
   orange tracksuit with sky-blue piping, royal-blue lettering. */
:root {
  --orange: #F26B1D;
  --orange-dark: #D9560C;
  --orange-soft: #FFE6D4;
  --blue: #1E4FA3;
  --blue-dark: #163C7D;
  --sky: #2BA3D9;
  --sky-soft: #DDF1FB;
  --yellow: #FFC93C;
  --cream: #FFF8EF;
  --ink: #1B2A4A;
  --muted: #55627D;
  --white: #fff;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(27, 42, 74, .12);
  --font-head: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Pacifico", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.script { font-family: var(--font-script); color: var(--blue); font-size: 1.5rem; margin-bottom: .4em; }
.script.small { font-size: 1rem; margin: 0; color: var(--orange); }
.hl-orange { color: var(--orange); }
.hl-blue { color: var(--blue); }

/* ---------- Stripes (the signature motif) ---------- */
/* Tracksuit piping: orange / white / sky / white / orange */
.piping {
  height: 14px;
  background: linear-gradient(var(--orange) 0 30%, #fff 30% 38%, var(--sky) 38% 62%, #fff 62% 70%, var(--blue) 70% 100%);
}
/* Candy stripes between sections */
.stripes {
  height: 22px;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 18px, var(--blue) 18px 36px);
}
.stripes-flip { background: repeating-linear-gradient(45deg, var(--blue) 0 18px, var(--orange) 18px 36px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  padding: .8em 1.5em; border-radius: 999px; border: 3px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: .45em 1.1em; font-size: .95rem; }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 5px 0 var(--orange-dark); }
.btn-orange:hover { box-shadow: 0 7px 0 var(--orange-dark); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-white { background: #fff; color: var(--blue); box-shadow: 0 5px 0 rgba(0,0,0,.15); }

/* ---------- Announcement ---------- */
.announce { background: var(--blue); color: #fff; text-align: center; font-size: .95rem; padding: 8px 16px; }
.announce p { margin: 0; }
.announce a { color: var(--yellow); font-weight: 800; }

/* ---------- Header ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.site-header + .piping { position: sticky; top: 76px; z-index: 49; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 64px; height: 64px; object-fit: contain; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--blue); }
.brand-sub { font-family: var(--font-head); font-weight: 600; font-size: .85rem; color: var(--orange); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) { display: block; padding: 8px 12px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 999px; }
.site-nav a:not(.btn):hover { background: var(--orange-soft); color: var(--orange-dark); }

.nav-toggle { display: none; background: var(--orange); border: 0; width: 46px; height: 46px; border-radius: 14px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 12px; width: 22px; height: 3px; background: #fff; border-radius: 2px; content: ""; transition: .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before { left: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 80px;
  background:
    radial-gradient(circle at 92% 12%, var(--sky-soft) 0 140px, transparent 141px),
    radial-gradient(circle at 4% 90%, var(--orange-soft) 0 180px, transparent 181px),
    var(--cream);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); color: var(--ink); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 700; }
.hero-badges li { display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-orange { background: var(--orange); } .dot-blue { background: var(--blue); } .dot-sky { background: var(--sky); }

.hero-media { position: relative; min-height: 460px; }
.hero-photo { position: absolute; border-radius: var(--radius); overflow: hidden; border: 6px solid #fff; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.g-item img { height: 100% !important; }
.hero-photo-main { inset: 0 12% 14% 0; transform: rotate(-2deg); }
.hero-photo-main::after { /* orange/blue piping along the photo base */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: linear-gradient(var(--orange) 0 33%, var(--sky) 33% 66%, var(--blue) 66%);
}
.hero-photo-small { width: 36%; aspect-ratio: 3 / 4; right: 0; bottom: 0; transform: rotate(4deg); }
.hero-photo-small img { object-position: center 18%; transform: scale(1.6); transform-origin: 50% 20%; }
.hero-sticker {
  position: absolute; left: -18px; bottom: 6%;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-content: center; text-align: center;
  font-family: var(--font-head); font-weight: 600; font-size: .85rem; line-height: 1.1;
  border: 5px dashed var(--orange); box-shadow: var(--shadow); transform: rotate(-10deg);
}
.hero-sticker span { display: block; font-size: 2rem; color: var(--yellow); font-weight: 700; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); color: var(--blue); }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  font-size: .85rem; color: var(--orange-dark); background: var(--orange-soft); padding: 4px 14px; border-radius: 999px; margin-bottom: 14px;
}
p.eyebrow.center { display: table; margin-inline: auto; }
.on-dark { color: #fff; }
.eyebrow.on-dark { background: rgba(255,255,255,.18); color: #fff; }
.note { color: var(--muted); margin-top: 32px; font-weight: 600; }

/* Why */
.why { background: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.why-card { border-radius: var(--radius); padding: 28px 24px; position: relative; overflow: hidden; }
.why-card.c-orange { background: var(--orange-soft); }
.why-card.c-blue { background: var(--sky-soft); }
.why-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; }
.why-card.c-orange::before { background: linear-gradient(90deg, var(--orange) 0 70%, var(--sky) 70% 80%, var(--orange) 80%); }
.why-card.c-blue::before { background: linear-gradient(90deg, var(--blue) 0 70%, var(--orange) 70% 80%, var(--blue) 80%); }
.why-icon { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; }
.c-orange .why-icon { background: var(--orange); }
.c-blue .why-icon { background: var(--blue); }
.why-icon svg { width: 28px; height: 28px; fill: #fff; }
.why-card h3 { font-size: 1.25rem; color: var(--ink); }
.why-card p { margin: 0; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); border: 6px solid #fff; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about-media::before {
  content: ""; position: absolute; inset: 22px -22px -22px 22px; border-radius: var(--radius); z-index: -1;
  background: repeating-linear-gradient(-45deg, var(--orange) 0 14px, var(--blue) 14px 28px);
}
.about { position: relative; z-index: 0; }
.motto { margin: 24px 0 0; padding: 14px 22px; border-left: 6px solid var(--orange); background: #fff; border-radius: 0 16px 16px 0; }
.motto .script { margin: 0; }

/* Classes */
.classes { background: #fff; }
.class-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; }
.class-card { background: var(--cream); border-radius: var(--radius); overflow: hidden; padding-bottom: 22px; box-shadow: 0 4px 0 rgba(27,42,74,.06); }
.class-card h3, .class-card p { padding-inline: 22px; }
.class-card h3 { font-size: 1.35rem; color: var(--blue); margin-top: 18px; }
.class-card p { color: var(--muted); margin: 0; }
.class-band { height: 84px; display: grid; place-items: center; position: relative; }
.class-band span { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.35rem; position: relative; z-index: 1; }
.class-band::after { /* side piping like the tracksuit sleeve */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px;
}
.band-orange { background: var(--orange); }
.band-orange::after { background: linear-gradient(#fff 0 25%, var(--sky) 25% 75%, #fff 75%); }
.band-blue { background: var(--blue); }
.band-blue::after { background: linear-gradient(#fff 0 25%, var(--orange) 25% 75%, #fff 75%); }
.band-sky { background: var(--sky); }
.band-sky::after { background: linear-gradient(#fff 0 25%, var(--orange) 25% 75%, #fff 75%); }

/* Life */
.life {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 40px, transparent 40px 80px),
    var(--blue);
}
.life .section-title { color: #fff; }
.life-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 40px; }
.life-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 0 var(--orange); }
.life-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.life-body { padding: 22px 24px 26px; }
.life-body h3 { color: var(--orange-dark); font-size: 1.35rem; }
.life-body p { margin: 0; color: var(--muted); }

/* Gallery */
.gallery-grid {
  list-style: none; padding: 0; margin: 40px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; grid-auto-flow: dense;
}
.gallery-grid li.tall { grid-row: span 2; }
@media (min-width: 1001px) { .gallery-grid li.pin-mid { grid-column: 2; grid-row: 2 / span 2; } }
.g-item { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.g-item:hover img { transform: scale(1.05); }
.gallery-grid li:nth-child(odd) .g-item { box-shadow: inset 0 0 0 0 transparent, 0 0 0 4px var(--orange-soft); }
.gallery-grid li:nth-child(even) .g-item { box-shadow: 0 0 0 4px var(--sky-soft); }

.trip-title { text-align: center; color: var(--orange-dark); font-size: 1.6rem; margin-top: -8px; }
.trip-grid { list-style: none; padding: 0; margin: 20px 0 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trip-grid .g-item { aspect-ratio: 16 / 10; box-shadow: 0 0 0 4px var(--sky-soft); }
.trip-grid .g-item img { object-position: center 85%; }

/* Enrol */
.enrol {
  background:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,.12) 0 120px, transparent 121px),
    linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff; position: relative;
}
.enrol-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.enrol .section-title { color: #fff; }
.year { color: var(--blue); background: #fff; padding: 0 .25em; border-radius: 12px; }
.steps { padding-left: 1.2em; margin: 24px 0 0; }
.steps li { margin-bottom: 10px; }
.enrol-form { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 30px; box-shadow: 0 10px 0 var(--blue); }
.enrol-form h3 { color: var(--blue); font-size: 1.5rem; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-weight: 800; font-size: .95rem; margin-bottom: 6px; }
.opt { font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 2px solid #D8DEEA; border-radius: 12px; background: var(--cream);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky); background: #fff; }
.field [aria-invalid="true"] { border-color: #D64545; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-actions .btn-white { border-color: var(--blue); box-shadow: none; }
.form-error { color: #C0392B; font-weight: 700; }
.form-hint { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.contact-card {
  display: flex; flex-direction: column; gap: 6px; padding: 26px 22px; border-radius: var(--radius);
  text-decoration: none; color: #fff; transition: transform .15s; min-width: 0;
}
.contact-card:hover { transform: translateY(-4px); }
.contact-card.c-orange { background: var(--orange); }
.contact-card.c-blue { background: var(--blue); }
.contact-label { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; opacity: .85; }
.contact-value { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.contact-email { font-size: 1.05rem; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: var(--ink); color: #C9D2E6; padding: 40px 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 14px 30px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { border-radius: 50%; }
.footer-name { font-family: var(--font-head); font-weight: 600; color: #fff; margin: 0; }
.footer-social { margin: 0; }
.footer-social a { color: var(--yellow); font-weight: 700; }
.footer-copy { grid-column: 1 / -1; margin: 0; font-size: .9rem; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(15, 25, 50, .88); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 14px; border: 5px solid #fff; }
.lightbox-close, .lightbox-nav {
  position: fixed; background: var(--orange); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%;
  font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lightbox-close { top: 16px; right: 16px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); background: var(--blue); }
.lightbox-nav.prev { left: 12px; } .lightbox-nav.next { right: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .why-grid, .class-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 6px solid var(--orange); box-shadow: 0 12px 20px rgba(0,0,0,.08);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; }
  .site-nav a:not(.btn) { padding: 12px; }
  .site-nav .btn { margin-top: 8px; }
  .hero-grid, .about-grid, .enrol-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero-media { min-height: 360px; margin-top: 10px; }
  .life-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .about-media::before { inset: 14px -10px -14px 14px; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hide-sm { display: none; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { font-size: .72rem; }
  .brand-logo { width: 46px; height: 46px; }
  .section { padding: 64px 0; }
  .why-grid, .class-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 10px; }
  .trip-grid { grid-template-columns: 1fr; gap: 10px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-media { min-height: 280px; }
  .hero-sticker { width: 100px; height: 100px; left: -6px; font-size: .7rem; }
  .hero-sticker span { font-size: 1.5rem; }
  .enrol-form { padding: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
