/* =========================================================
   KoolChamps Nursery School — Design System
   Palette inspired by a classroom art table: sky, sun, leaf,
   coral crayon, and ink for the grown-up parts of the copy.
   ========================================================= */

:root {
  --sky: #EAF6FF;
  --cream: #FFFDF7;
  --sun: #FFC93C;
  --sun-dark: #E8AC1B;
  --leaf: #4CAF7D;
  --leaf-dark: #388A5F;
  --coral: #FF6B5E;
  --coral-dark: #E44F42;
  --ink: #263859;
  --ink-soft: #4B5B7C;
  --white: #FFFFFF;

  --font-display: "Baloo 2", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;

  --radius: 22px;
  --shadow-soft: 0 10px 30px rgba(38, 56, 89, 0.10);
  --container: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--leaf-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

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

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* =========================
   Header / Navigation
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 3px solid var(--sun);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .logo-img { height: 44px; }
}

.logo .dot { color: var(--coral); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink);
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--sun);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 12px 24px 20px;
    border-bottom: 3px solid var(--sun);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--coral-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-secondary:hover { background: var(--sun); }

/* =========================
   Hero
   ========================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
  padding: 70px 0 110px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--leaf-dark);
  background: var(--white);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

.hero-art { position: relative; height: 320px; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  animation: bob 6s ease-in-out infinite;
}
.blob.sun { width: 150px; height: 150px; background: var(--sun); top: 10px; right: 40px; animation-delay: 0s; }
.blob.leaf { width: 110px; height: 110px; background: var(--leaf); bottom: 40px; right: 130px; animation-delay: 1.2s; }
.blob.coral { width: 90px; height: 90px; background: var(--coral); bottom: 0; right: -10px; animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* Torn-paper wave divider — the site's signature element */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  margin-top: -2px;
  position: relative;
  z-index: 2;
}

/* =========================
   Homepage photo hero (KLAY-style)
   ========================= */
.hero-photo {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 0 110px;
}

.hero-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--sky); /* fallback tint until the real photo is added */
  background-image: url('../images/hero-mother-child.jpg');
  background-size: cover;
  background-position: center;
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(38, 56, 89, 0.82) 0%,
    rgba(38, 56, 89, 0.55) 45%,
    rgba(38, 56, 89, 0.15) 75%,
    rgba(38, 56, 89, 0.05) 100%);
}

.hero-photo-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.hero-photo-content h1,
.hero-photo-content p { color: var(--white); }
.hero-photo-content .badge-pill {
  display: inline-block;
  font-family: var(--font-display);
  color: var(--leaf-dark);
  background: var(--white);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}

.quick-enquiry-card {
  position: relative;
  z-index: 2;
  max-width: 320px;
  margin: 40px 24px 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.quick-enquiry-card h3 { margin-bottom: 4px; }
.quick-enquiry-card form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.quick-enquiry-card input,
.quick-enquiry-card select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #D9E2F1;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .hero-photo { padding-bottom: 70px; }
  .quick-enquiry-card { margin: 30px auto 0; max-width: 100%; }
}

@media (max-width: 780px) {
  .hero-photo-overlay {
    background: linear-gradient(180deg,
      rgba(38, 56, 89, 0.55) 0%,
      rgba(38, 56, 89, 0.75) 100%);
  }
}

/* =========================
   Sections
   ========================= */
section { padding: 70px 0; }

.section-heading { text-align: center; max-width: 640px; margin: 0 auto 48px; }

.underline-accent {
  display: inline-block;
  position: relative;
}
.underline-accent svg {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 10px;
}

/* Highlight cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  border-bottom: 6px solid var(--sun);
}
.card:nth-child(2) { border-bottom-color: var(--leaf); }
.card:nth-child(3) { border-bottom-color: var(--coral); }

.card .icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--sky);
}

/* CTA band */
.cta-band {
  background: var(--leaf);
  border-radius: var(--radius);
  padding: 50px;
  text-align: center;
  color: var(--white);
}
.cta-band h2, .cta-band p { color: var(--white); }
.cta-band .btn-secondary { background: var(--white); border: none; }

/* =========================
   Footer
   ========================= */
.site-footer {
  background: var(--ink);
  color: var(--sky);
  padding: 50px 0 24px;
}
.site-footer a { color: var(--sun); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 30px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: var(--white); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 18px;
  font-size: 0.85rem;
  text-align: center;
  color: #A9B7D6;
}

/* =========================
   About page
   ========================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.timeline-note {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border-left: 6px solid var(--coral);
}

.value-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 600px) { .value-list { grid-template-columns: 1fr; } }
.value-list li {
  list-style: none;
  background: var(--sky);
  border-radius: 16px;
  padding: 16px 20px;
  font-weight: 700;
}

/* =========================
   Admissions — real numbered process
   ========================= */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  background: var(--coral);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.fee-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.fee-table th, .fee-table td {
  text-align: left;
  padding: 16px 20px;
}
.fee-table thead { background: var(--sun); }
.fee-table tbody tr:nth-child(even) { background: var(--sky); }

.fee-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 960px) { .fee-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .fee-cards { grid-template-columns: 1fr; } }

.fee-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fee-card.featured {
  border: 3px solid var(--coral);
  transform: translateY(-8px);
}
.fee-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--coral);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.fee-age { color: var(--ink-soft); font-weight: 700; margin-bottom: 4px; }
.fee-timing { font-size: 0.9rem; color: var(--ink-soft); }
.fee-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink);
  margin: 12px 0 18px;
}
.fee-price span { font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); }
.fee-card .btn { width: 100%; }

/* =========================
   Gallery / Events
   ========================= */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-btn {
  font-family: var(--font-body);
  font-weight: 700;
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.filter-btn.active { background: var(--ink); color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.gallery-card .thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--sky), var(--sun));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
  padding: 10px;
}
.gallery-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-card .meta { padding: 16px 18px; }
.gallery-card .meta .date { color: var(--coral-dark); font-weight: 800; font-size: 0.85rem; }
.gallery-card { cursor: pointer; }
.gallery-card .thumb { position: relative; }
.gallery-card .photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(38, 56, 89, 0.75);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 40, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.open { display: flex; }

.lightbox-image {
  max-width: 88vw;
  max-height: 78vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: var(--white);
  margin-top: 16px;
  font-weight: 700;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 600px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}

/* =========================
   Contact
   ========================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #D9E2F1;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
}
.form-field textarea { min-height: 130px; resize: vertical; }

.form-status {
  margin-top: 14px;
  font-weight: 700;
}
.form-status.success { color: var(--leaf-dark); }
.form-status.error { color: var(--coral-dark); }

.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}
