/* ============================================================
   PARK LANE PRESCHOOL — DESIGN SYSTEM
   A warm, nature-forward identity built around the logo's navy
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand palette — navy pulled directly from the logo */
  --navy-900: #1a2547;
  --navy-800: #243660;
  --navy-700: #2c3e6b; /* logo navy */
  --navy-600: #3d4f7d;
  --navy-500: #5a6a94;

  /* Warm neutrals — inspired by natural paper, limestone, linen */
  --cream-50: #fbf8f1;
  --cream-100: #f6f0e5;
  --cream-200: #ede4d3;
  --cream-300: #d9ccb3;

  /* Nature accents — sage for the nature-school tie-in, terracotta for CTAs */
  --sage-500: #7a9671;
  --sage-600: #5e7a57;
  --terracotta-500: #c67b5c;
  --terracotta-600: #a65f41;
  --gold-500: #d9a441;

  /* Semantic */
  --bg: var(--cream-50);
  --bg-alt: var(--cream-100);
  --bg-dark: var(--navy-700);
  --ink: var(--navy-900);
  --ink-soft: var(--navy-700);
  --muted: #6b7a98;
  --border: rgba(44, 62, 107, 0.12);
  --border-strong: rgba(44, 62, 107, 0.25);

  --accent: var(--terracotta-500);
  --accent-hover: var(--terracotta-600);

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.74rem + 0.05vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.86rem + 0.08vw, 0.9375rem);
  --text-base: 1rem;
  --text-lg: clamp(1.125rem, 1.08rem + 0.23vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.24rem + 0.7vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.45rem + 1.5vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.7rem + 2.75vw, 3.75rem);
  --text-hero: clamp(2.75rem, 2rem + 3.75vw, 5rem);

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

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(26, 37, 71, 0.06), 0 1px 3px rgba(26, 37, 71, 0.05);
  --shadow-md: 0 4px 14px rgba(26, 37, 71, 0.08), 0 2px 4px rgba(26, 37, 71, 0.05);
  --shadow-lg: 0 12px 32px rgba(26, 37, 71, 0.12), 0 4px 10px rgba(26, 37, 71, 0.06);

  /* Fonts */
  --font-display: "Fraunces", "Source Serif 4", Georgia, serif;
  --font-body: "Nunito", "Helvetica Neue", system-ui, sans-serif;

  /* Container */
  --container: 1200px;
  --container-narrow: 780px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy-900);
  font-variation-settings: "opsz" 64, "SOFT" 50;
}

h1 {
  font-size: var(--text-hero);
  line-height: 0.98;
  font-variation-settings: "opsz" 144, "SOFT" 60;
}

h2 {
  font-size: var(--text-3xl);
  font-variation-settings: "opsz" 96, "SOFT" 55;
}

h3 {
  font-size: var(--text-xl);
  line-height: 1.2;
}

h4 {
  font-size: var(--text-lg);
  line-height: 1.3;
}

p {
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sage-600);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--sage-600);
}

.lede {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.35;
  font-weight: 400;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 64, "SOFT" 60;
}

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) 0;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.95rem 1.7rem;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn--primary {
  background: var(--navy-700);
  color: var(--cream-50);
}

.btn--primary:hover {
  background: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--terracotta-500);
  color: #fff;
}

.btn--accent:hover {
  background: var(--terracotta-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--navy-700);
  border: 1.5px solid var(--border-strong);
}

.btn--ghost:hover {
  background: var(--navy-700);
  color: var(--cream-50);
  border-color: var(--navy-700);
}

.btn--light {
  background: var(--cream-50);
  color: var(--navy-700);
}

.btn--light:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.header.scrolled {
  border-color: var(--border);
  background: rgba(251, 248, 241, 0.95);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
  gap: var(--space-6);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--navy-700);
  flex-shrink: 0;
}

.logo svg, .logo img {
  height: 48px;
  width: auto;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--navy-700);
  letter-spacing: -0.01em;
}

.logo__tag {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--sage-600);
  font-weight: 700;
  margin-top: 3px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.nav__link:hover, .nav__link.active {
  color: var(--navy-900);
}

.nav__link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--terracotta-500);
  border-radius: 2px;
}

.header__cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  padding: var(--space-2);
  color: var(--navy-700);
}

@media (max-width: 900px) {
  .nav, .header__cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream-50);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav.open .nav__link {
    font-size: var(--text-base);
  }
  .nav.open .header__cta {
    display: block;
    margin-top: var(--space-2);
  }
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--navy-900);
  color: var(--cream-100);
  padding: var(--space-20) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(122, 150, 113, 0.1), transparent 50%),
              radial-gradient(ellipse at bottom left, rgba(198, 123, 92, 0.08), transparent 50%);
  pointer-events: none;
}

.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-12);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (max-width: 800px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
}
@media (max-width: 500px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

.footer__brand .logo__name,
.footer__brand .logo__tag {
  color: var(--cream-50);
}
.footer__brand .logo__tag {
  color: var(--sage-500);
}

.footer__tagline {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.4;
  color: var(--cream-100);
  max-width: 28ch;
}

.footer__heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--sage-500);
  margin-bottom: var(--space-5);
}

.footer__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__list a,
.footer__contact a {
  color: var(--cream-100);
  font-size: var(--text-sm);
  transition: color 0.2s;
}
.footer__list a:hover,
.footer__contact a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__contact {
  font-size: var(--text-sm);
  line-height: 1.8;
  font-style: normal;
  color: var(--cream-100);
}

.footer__socials {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.footer__socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(246, 240, 229, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
}
.footer__socials a:hover {
  background: var(--sage-500);
  border-color: var(--sage-500);
  transform: translateY(-2px);
}
.footer__socials svg {
  width: 16px;
  height: 16px;
}

.footer__bottom {
  max-width: var(--container);
  margin: var(--space-20) auto 0;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid rgba(246, 240, 229, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--cream-300);
  flex-wrap: wrap;
  gap: var(--space-3);
  position: relative;
}

/* ---------- REVEAL ANIMATION ---------- */
/* Default state is visible. JS adds .reveal-ready on load, which hides
   elements until the IntersectionObserver adds .in. This guarantees content
   is always visible if JS fails or an intersection is missed (e.g. fast
   scrolls on mobile). */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-ready .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- UTILITIES ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  background: var(--cream-200);
  color: var(--navy-700);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tag--sage {
  background: rgba(122, 150, 113, 0.18);
  color: var(--sage-600);
}
.tag--terracotta {
  background: rgba(198, 123, 92, 0.15);
  color: var(--terracotta-600);
}

.divider-leaf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  color: var(--sage-500);
  margin: var(--space-8) 0;
}

.divider-leaf::before,
.divider-leaf::after {
  content: "";
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border-strong);
}
