/* ============================================================
   SKYLON SCHOOLS — Shared Stylesheet
   Covers: reset, CSS variables, nav, footer, page-hero,
   buttons, form elements, animations, responsive breakpoints
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --xgreen:       #1a6b3a;
  --green-mid:    #2d9057;
  --green-light:  #e6f4ec;
  --xred:         #c0392b;
  --red-light:    #fbeaea;
  --gold:         #e8a020;
  --gold-light:   #fef7e8;
  --blue:         #1a4fa0;
  --blue-light:   #e8eefb;
  --purple:       #6b2fa0;
  --purple-light: #f0e8fb;
  --cream:        #fdf9f3;
  --dark:         #1a1a2e;
  --text:         #2c3e50;
  --muted:        #607080;
  --border:       #e2e8ef;
  --white:        #ffffff;
  --green:        #6a0dad;
  --red:          #fd5e0f;
  --radius:       16px;
  --radius-sm:    8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(253,249,243,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  transition: box-shadow .2s;
}
nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700;
  color: var(--green); text-decoration: none;
  flex-shrink: 0;
}
.nav-logo span { color: var(--red); }
.nav-logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text);
  font-size: 0.92rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--green); }

.nav-cta {
  background: var(--green); color: #fff;
  padding: 9px 20px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: background .2s;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--green-mid); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 6px;
  flex-direction: column; gap: 5px;
  z-index: 1010;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, background .2s;
  transform-origin: center;
}

/* Hamburger → X animation */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(253,249,243,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 5% 28px;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
}
.mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu a {
  text-decoration: none; color: var(--text);
  font-size: 1.05rem; font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s, padding-left .2s;
  display: flex; align-items: center; gap: 8px;
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu a:hover,
.mobile-menu a.active { color: var(--green); padding-left: 6px; }
.mobile-menu .mobile-cta {
  margin-top: 16px;
  background: var(--green); color: #fff !important;
  padding: 13px 24px; border-radius: 50px;
  text-align: center; font-weight: 600;
  border-bottom: none !important;
  justify-content: center;
}
.mobile-menu .mobile-cta:hover {
  background: var(--green-mid);
  padding-left: 24px !important;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--green); color: #fff;
  padding: 14px 28px; border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: #145730; transform: translateY(-1px); }

.btn-outline {
  background: transparent; color: var(--green);
  border: 1.5px solid var(--green);
  padding: 14px 28px; border-radius: 50px;
  font-size: 0.95rem; font-weight: 600;
  text-decoration: none; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { background: var(--green-light); }

/* ── PAGE HERO (sub-pages) ── */
.page-hero {
  padding: 120px 5% 60px;
  color: #fff; position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-inner { position: relative; z-index: 1; }
.page-tag {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 5px 14px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 14px;
}
.page-hero h1 em { font-style: normal; }
.page-hero p {
  font-size: 1.05rem; color: rgba(255,255,255,.75);
  max-width: 520px; line-height: 1.7;
}

/* ── SECTIONS ── */
section { padding: 90px 5%; }
.section-tag {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--green); margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900; color: var(--dark);
  line-height: 1.15; margin-bottom: 16px;
}
.section-title em { font-style: normal; color: var(--green); }
.section-sub {
  font-size: 1.05rem; color: var(--muted);
  line-height: 1.75; max-width: 560px;
}

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 18px; }
label.form-label {
  display: block; font-size: 0.83rem; font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
}
input.form-input, textarea.form-input, select.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--cream);
  transition: border-color .2s, background .2s;
  outline: none;
}
input.form-input:focus, textarea.form-input:focus, select.form-input:focus {
  border-color: var(--green);
  background: #fff;
}
textarea.form-input { resize: vertical; min-height: 110px; }

/* ── FOOTER ── */
footer {
  background: var(--dark); color: #9ab0c0;
  padding: 60px 5% 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 48px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.75; margin-top: 14px; }
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700; color: #fff;
}
.footer-logo span { color: #7bd4a0; }
.footer-col h4 { color: #fff; font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: #9ab0c0; text-decoration: none;
  font-size: 0.9rem; transition: color .2s;
}
.footer-col ul li a:hover { color: #7bd4a0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.83rem;
}

/* Simple footer (sub-pages) */
footer.footer-simple {
  padding: 40px 5% 24px;
}
footer.footer-simple .footer-bottom {
  border-top: none; padding-top: 0;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: #9ab0c0; text-decoration: none; font-size: 0.88rem; transition: color .2s; }
.footer-nav a:hover { color: #7bd4a0; }

/* Kenya flag strip */
.kenya-flag { display: flex; align-items: center; gap: 6px; }
.flag-bar { height: 6px; width: 20px; border-radius: 2px; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .7s ease both; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .28s; }
.delay-3 { animation-delay: .42s; }
.delay-4 { animation-delay: .56s; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: .7; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .footer-grid { grid-template-columns: 1fr; }
}
