/* ==========================================================================
   Noah's Daycare — base: design tokens, reset, typography, layout, utilities.
   Warm & soft: cream grounds, pastel accents, generous rounding.
   Mobile-first — every media query is min-width.
   ========================================================================== */

:root {
  /* --- Warm neutrals (grounds) --- */
  --cream:        #fff9f2;  /* page background */
  --cream-alt:    #fdf1e6;  /* alternating section background */
  --cream-deep:   #f7e4d4;  /* subtle fills, borders on cream */
  --white:        #ffffff;

  /* --- Pastel accents --- */
  --peach:        #fbd4c2;
  --apricot:      #f7bfa4;
  --butter:       #fdeab4;
  --sage:         #cfe0d0;
  --sky:          #cfe2ee;
  --lilac:        #e0d5ee;

  /* --- Ink (accessible on cream) --- */
  --ink:          #3b3230;  /* headings + body — 11.9:1 on cream */
  --ink-soft:     #6b5f5a;  /* secondary text — 5.9:1 on cream */
  --ink-faint:    #8b7d77;  /* captions only, never body copy */

  /* --- Brand actions --- */
  /* Deep enough to carry white text and to sit on cream as link colour.
     Measured: terracotta 5.05:1 on white, 4.8:1 on --cream. forest 4.9:1 on
     white. All clear WCAG AA for normal text — don't lighten these without
     re-checking. Pastels above are fills only, never text colours. */
  --terracotta:      #b64f36;  /* primary buttons + links */
  --terracotta-dark: #9a4029;  /* hover/active */
  --forest:          #4f7a5c;  /* secondary action */
  --forest-dark:     #3e6249;

  /* --- State --- */
  --focus:        #2f6fa8;
  --error:        #b23a2c;

  /* --- Rounding (soft, never sharp) --- */
  --r-sm:   10px;
  --r-md:   18px;
  --r-lg:   28px;
  --r-xl:   40px;
  --r-pill: 999px;

  /* --- Soft, warm-tinted shadows --- */
  --shadow-sm: 0 2px 8px rgba(96, 62, 45, 0.07);
  --shadow-md: 0 8px 24px rgba(96, 62, 45, 0.09);
  --shadow-lg: 0 18px 44px rgba(96, 62, 45, 0.12);

  /* --- Type --- */
  --font-head: 'Quicksand', 'Trebuchet MS', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Fluid scale: comfortable at 375px, roomy past 1024px. */
  --t-xs:   0.8125rem;
  --t-sm:   0.9375rem;
  --t-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --t-lg:   clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --t-h3:   clamp(1.25rem, 1.16rem + 0.4vw, 1.5rem);
  --t-h2:   clamp(1.6rem, 1.4rem + 0.9vw, 2.25rem);
  --t-h1:   clamp(2rem, 1.6rem + 1.9vw, 3.25rem);

  /* --- Spacing --- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* --- Layout --- */
  --wrap:        1120px;
  --wrap-narrow: 760px;
  --gutter:      1.25rem;
}

@media (min-width: 768px) {
  :root { --gutter: 2rem; }
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

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

h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-lg); }

p, ul, ol { margin: 0 0 var(--sp-4); }
p { max-width: 68ch; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--terracotta);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--terracotta-dark); }

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

address { font-style: normal; }

button { font: inherit; }

/* --------------------------------------------------------------------------
   Focus + accessibility
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -4rem;
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: var(--sp-4); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section {
  padding-block: var(--sp-7);
  /* Keep the sticky header from covering a section when linked to by #id. */
  scroll-margin-top: 5.5rem;
}

@media (min-width: 768px) {
  .section { padding-block: var(--sp-8); }
}

.section--alt  { background: var(--cream-alt); }
.section--white { background: var(--white); }

/* Rounded band — softens the edge between two section colours. */
.section--soft-top {
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
}

.section__head {
  margin-bottom: var(--sp-6);
  max-width: var(--wrap-narrow);
}

.section__head p {
  color: var(--ink-soft);
  font-size: var(--t-lg);
}

/* Auto-fitting card grid — one column on phones, no media query needed. */
.grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.lede {
  font-size: var(--t-lg);
  color: var(--ink-soft);
}

.eyebrow {
  display: block;
  margin-bottom: var(--sp-2);
  font-family: var(--font-head);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.text-center p { margin-inline: auto; }

/* A centred <p> must centre its own box too. Paragraphs are capped at 68ch,
   so without this the box stays flush left in a wider container and the
   "centred" text reads noticeably off to the left. */
p.text-center { margin-inline: auto; }
