/* ============================================================
   LITTLE LEARNERS PRIVATE PRESCHOOL
   style.css — design tokens, reset, typography, nav, footer,
               utilities, animations
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Colors */
  --color-primary:       #1976D2;
  --color-primary-dark:  #1565C0;
  --color-primary-light: #E3F2FD;

  --color-green:         #2E7D32;
  --color-green-light:   #C8E6C9;
  --color-green-mid:     #4CAF50;

  --color-navy:          #1A237E;
  --color-navy-mid:      #283593;

  --color-accent-yellow: #FDD835;
  --color-accent-orange: #FF7043;
  --color-accent-pink:   #EC407A;
  --color-accent-teal:   #00897B;

  --color-bg:            #FFFFFF;
  --color-bg-soft:       #F8FAFF;
  --color-border:        #E0E7FF;

  --color-text:          #2D2D2D;
  --color-text-muted:    #6B7280;
  --color-text-light:    #9CA3AF;

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Nunito', sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3rem;
  --text-hero: clamp(2rem, 5vw, 3.25rem);

  --fw-regular:   400;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  --lh-tight:  1.2;
  --lh-normal: 1.6;
  --lh-loose:  1.8;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1.5rem;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(25,118,210,0.12);
  --shadow-lg:   0 8px 32px rgba(25,118,210,0.20);
  --shadow-card: 0 2px 12px rgba(26,35,126,0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index */
  --z-nav:      100;
  --z-overlay:  200;
  --z-lightbox: 300;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
address { font-style: normal; }

/* ── Utilities ─────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-16);
}
.section--soft { background: var(--color-bg-soft); }

.section-label {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-navy);
  line-height: var(--lh-tight);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  line-height: var(--lh-loose);
  max-width: 60ch;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem var(--space-6);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(25,118,210,0.30);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(25,118,210,0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

.btn-yellow {
  background: var(--color-accent-yellow);
  color: var(--color-navy);
  border-color: var(--color-accent-yellow);
  box-shadow: 0 4px 14px rgba(253,216,53,0.4);
}
.btn-yellow:hover {
  background: #F9CA00;
  box-shadow: 0 6px 20px rgba(253,216,53,0.55);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.85rem var(--space-8);
  font-size: var(--text-md);
}
.btn-full { width: 100%; justify-content: center; }

/* ── Wave Dividers ─────────────────────────────────────────── */
.wave-divider {
  display: block;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg { display: block; width: 100%; }

/* ── Site Header & Navigation ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background var(--transition-base);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.98);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding-inline: var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
  position: relative;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { width: 42px; height: 42px; object-fit: contain; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-logo-name {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  color: var(--color-navy);
}
.nav-logo-tagline {
  font-size: var(--text-xs);
  color: var(--color-green);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 10);
}
.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
  transform-origin: center;
}

/* Nav Links — mobile drawer by default */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: fixed;
  inset: 0 auto 0 0;
  width: min(300px, 80vw);
  background: #fff;
  padding: 100px var(--space-6) var(--space-8);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  z-index: calc(var(--z-nav) + 5);
  overflow-y: auto;
}
.nav-link {
  font-weight: var(--fw-semibold);
  font-size: var(--text-md);
  color: var(--color-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}
.nav-link:hover { color: var(--color-primary); background: var(--color-primary-light); }
.nav-link.active { color: var(--color-primary); background: var(--color-primary-light); font-weight: var(--fw-bold); }

.nav-enroll-mobile { margin-top: var(--space-4); }

/* Desktop CTA — hidden on mobile */
.nav-cta { display: none; }

/* Overlay backdrop */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  z-index: var(--z-overlay);
}

/* Open state */
body.nav-open .nav-links  { transform: translateX(0); }
body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
body.nav-open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.nav-open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-overlay { display: none; }
  .nav-cta { display: inline-flex; }

  .nav-links {
    position: static;
    flex-direction: row;
    width: auto;
    background: none;
    padding: 0;
    box-shadow: none;
    transform: none;
    gap: var(--space-1);
    /* Center the links */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav-link {
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-3);
  }
  .nav-enroll-mobile { display: none; }
}

/* ── Site Footer ───────────────────────────────────────────── */
.site-footer { background: var(--color-navy); color: #fff; }

.footer-wave { display: block; overflow: hidden; line-height: 0; }
.footer-wave svg { display: block; width: 100%; }

.footer-body { padding-block: var(--space-12) var(--space-16); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10) var(--space-8);
}

.footer-brand { grid-column: 1 / -1; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.footer-logo img { width: 44px; height: 44px; object-fit: contain; }
.footer-logo-name {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--text-lg);
  color: #fff;
}
.footer-tagline {
  font-size: var(--text-sm);
  color: var(--color-green-mid);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.footer-arabic {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-5);
}
.footer-socials {
  display: flex;
  gap: var(--space-3);
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: background var(--transition-fast);
  color: #fff;
}
.social-icon:hover { background: var(--color-primary); }
.social-icon svg { width: 18px; height: 18px; }

.footer-heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-4);
}

.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  transition: color var(--transition-fast);
}
.footer-links a:hover { color: #fff; }

.footer-contact { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-contact p { font-size: var(--text-sm); color: rgba(255,255,255,0.75); }
.footer-contact a { color: rgba(255,255,255,0.75); transition: color var(--transition-fast); }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: var(--space-5);
}
.footer-bottom .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}
.footer-bottom p { font-size: var(--text-xs); color: rgba(255,255,255,0.4); }

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
  .footer-brand { grid-column: auto; }
  .footer-bottom .container {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ── Scroll Animations ─────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: var(--delay, 0s);
}
[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* ── Success Banner ────────────────────────────────────────── */
.success-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-lightbox);
  background: #fff;
  border: 2px solid var(--color-green-mid);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 90vw;
  font-size: var(--text-sm);
}
.success-banner strong { color: var(--color-green); }
.success-banner-close {
  margin-left: auto;
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .nav-toggle, .nav-cta, .nav-overlay,
  .footer-socials, .cta-banner,
  .site-header { display: none; }
}

/* ── Reduced Motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}
