/* ==========================================================================
   Preschool website styles
   --------------------------------------------------------------------------
   Colors and fonts live in one place below (the ":root" block) so you can
   change the whole site's look by editing a few lines. Each value has a
   plain-language name and a comment.
   ========================================================================== */

:root {
  /* ---- Colors (change these to re-theme the site) ----
     A warm, earthy palette: mossy green, terracotta, gold and toasty cream. */
  --forest:      #3f5a45;   /* warm moss green — headings, buttons, header */
  --forest-dark: #314634;   /* darker green for hover states              */
  --gold:        #c0883a;   /* warm amber-gold — accents & the logo mark  */
  --clay:        #b56245;   /* terracotta — accents & status pills        */
  --bark:        #6b4f37;   /* warm brown — occasional deep accents       */
  --ink:         #34302a;   /* main text color (warm near-black)          */
  --muted:       #6b6155;   /* lighter warm text for captions & intros    */
  --paper:       #f7f0e3;   /* page background (toasty cream)             */
  --card:        #fffdf8;   /* card background (warm white)               */
  --tint:        #ebe0cc;   /* alternate section background (sand)        */
  --line:        #e2d6bf;   /* subtle warm border lines                  */

  /* ---- Typography (loaded from Google Fonts in each page's <head>) ---- */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;  /* headings */
  --font-body: "Nunito Sans", system-ui, -apple-system, sans-serif; /* text */

  /* ---- Layout ---- */
  line-height: 1.65;
  --maxwidth: 72rem;
  --radius: 14px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.05rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 600;
  color: var(--forest);
}

a { color: var(--forest); }

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

.container {
  width: 100%;
  max-width: var(--maxwidth);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Small label used above section titles for an editorial, polished feel. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6rem;
}

/* Skip link — invisible until a keyboard user presses Tab, then it appears at
   the top-left so they can jump straight past the menu to the page content. */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 20;
  background: var(--forest);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Site header & navigation
   ========================================================================== */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--forest);
  text-decoration: none;
}

/* The little sun mark next to the school name (an inline SVG, not an emoji). */
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--gold);
  flex: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover { color: var(--forest); }

/* The page you're currently on is highlighted with a gold underline. */
.nav-links a.active {
  color: var(--forest);
  border-bottom-color: var(--gold);
}

/* Hamburger button — only shown on small screens (see media query below). */
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--forest);
}

/* ==========================================================================
   Hero (big welcome area on the home page)
   ========================================================================== */
.hero {
  background:
    radial-gradient(60rem 30rem at 80% -10%, #f5e6c9 0%, transparent 60%),
    var(--paper);
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  margin: 0 0 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 0.8rem 1.6rem;
  border: 2px solid var(--forest);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { background: var(--forest-dark); border-color: var(--forest-dark); }

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

/* ==========================================================================
   Sections & cards
   ========================================================================== */
section { padding: 4rem 0; }

.section-head { text-align: center; max-width: 42rem; margin: 0 auto 2.75rem; }

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin: 0 0 0.6rem;
}
.section-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
}

/* The icon at the top of each card (an inline SVG line-icon, not an emoji). */
.card-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--tint);
  color: var(--forest);
  margin: 0 auto 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); }

/* Alternating background to separate sections visually. */
.tint { background: var(--tint); }

/* ==========================================================================
   Owner bios (About page)
   ========================================================================== */
.bio {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.75rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* Round photo placeholder — shows the person's initials until you add a real
   photo (see the note above each bio in about.html). */
.bio .photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 2.75rem;
  font-weight: 600;
}

.bio h3 { margin: 0 0 0.15rem; font-size: 1.5rem; }
.bio .role {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}
.bio p:last-child { margin-bottom: 0; color: var(--muted); }

/* ==========================================================================
   Schedule table
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.schedule {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

table.schedule th,
table.schedule td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.schedule tbody tr:last-child td { border-bottom: none; }

table.schedule thead th {
  background: var(--forest);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

table.schedule tbody tr:nth-child(even) { background: #f5ecda; }
table.schedule td .age { display: block; color: var(--muted); font-size: 0.9rem; }
table.schedule td strong { font-family: var(--font-head); font-weight: 600; }

/* Small status pills in the "Openings" column. */
.status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}
.status-open    { background: #e5ecdc; color: #3f5a45; }
.status-few     { background: #f4e6cb; color: #8a6116; }
.status-waitlist{ background: #f1ddd2; color: #97462b; }

/* ==========================================================================
   Forms (Registration page)
   ========================================================================== */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem;
  max-width: 44rem;
  margin: 0 auto;
}

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.field .req { color: var(--clay); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d4ccbc;
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(47, 91, 79, 0.15);
}

.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Shown by main.js after the form is submitted. */
.form-success {
  display: none;
  background: #e4efe8;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}
.form-success .check {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success .check svg { width: 30px; height: 30px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--forest);
  color: #e8efe9;
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.site-footer a { color: #fff; }
.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer h4 {
  margin: 0 0 0.6rem;
  color: #fff;
  font-size: 1.15rem;
}
.site-footer p { margin: 0.2rem 0; color: #cdd9d2; }
.footer-bottom {
  text-align: center;
  color: #a9bcb2;
  font-size: 0.9rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Small screens (phones)
   ========================================================================== */
@media (max-width: 720px) {
  .nav-toggle { display: block; }

  /* Hide the links by default on phones; the hamburger button reveals them. */
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0.25rem; }

  .bio { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
}
