/* =========================================================
   Carlsbad Village Montessori School
   Shared stylesheet
   ========================================================= */

:root {
  --sage:        #7a8b6f;
  --sage-dark:   #5c6b52;
  --sage-light:  #eef1e9;
  --terracotta:  #c9714f;
  --terracotta-dark: #a85a3c;
  --cream:       #faf6ee;
  --sand:        #f1e9d9;
  --ink:         #3a3730;
  --ink-soft:    #6a655b;
  --gold:        #d9a441;
  --white:       #ffffff;
  --shadow:      0 8px 30px rgba(58, 55, 48, 0.10);
  --shadow-sm:   0 3px 12px rgba(58, 55, 48, 0.08);
  --radius:      16px;
  --radius-sm:   10px;
  --maxw:        1140px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.1em; }

a { color: var(--terracotta-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--sage { background: var(--sage-light); }
.section--sand { background: var(--sand); }
.section--ink { background: var(--sage-dark); color: var(--cream); }
.section--ink h2, .section--ink h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--terracotta);
  margin-bottom: 14px;
}

.lead { font-size: 1.2rem; color: var(--ink-soft); }

.center { text-align: center; }
.measure { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.98rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--terracotta); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--terracotta-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--light { background: #fff; color: var(--terracotta-dark); }
.btn--light:hover { color: var(--terracotta-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(122, 139, 111, 0.2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand__mark { flex: 0 0 auto; }
.brand__text { line-height: 1.05; }
.brand__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  display: block;
}
.brand__sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-dark);
  font-weight: 700;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav__links a:hover { background: var(--sage-light); text-decoration: none; }
.nav__links a.active { color: var(--terracotta-dark); }
.nav__cta { margin-left: 6px; }
.nav__cta .btn { padding: 10px 18px; white-space: nowrap; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 26px; height: 3px;
  background: var(--ink);
  border-radius: 3px;
  margin: 5px 0;
  transition: .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(217,164,65,0.20), transparent 60%),
    linear-gradient(160deg, var(--sage-light) 0%, var(--cream) 55%, var(--sand) 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 96px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__school {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: var(--sage-dark);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.hero h1 { margin-bottom: 0.35em; }
.hero .lead { margin-bottom: 1.6em; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  background: linear-gradient(150deg, var(--sage) 0%, var(--sage-dark) 100%);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero__art svg { width: 78%; height: 78%; }
.hero__art img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-hero {
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(201,113,79,0.16), transparent 60%),
    linear-gradient(160deg, var(--sage-light), var(--cream));
  padding: 72px 0 60px;
  text-align: center;
}
.page-hero p { margin: 0 auto; max-width: 640px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(122,139,111,0.14);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--sage-light);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.card__icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }

.age-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--terracotta-dark);
  background: rgba(201,113,79,0.12);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---------- Split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media {
  border-radius: var(--radius);
  min-height: 340px;
  background: linear-gradient(150deg, var(--sand), var(--sage-light));
  box-shadow: var(--shadow-sm);
  display: grid; place-items: center;
  overflow: hidden;
}
.split__media svg { width: 65%; height: 65%; }
.split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split__media--photo { aspect-ratio: 5 / 4; min-height: 0; }
/* Generic photo frame (e.g. Contact page) */
.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 2;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Pillars ---------- */
.pillar { text-align: center; padding: 0 8px; }
.pillar__num {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--terracotta);
  display: block;
  margin-bottom: 6px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 0; }
.timeline::before {
  content: "";
  position: absolute;
  left: 26px; top: 8px; bottom: 8px;
  width: 3px;
  background: linear-gradient(var(--sage), var(--terracotta));
  border-radius: 3px;
}
.tl-item { position: relative; padding: 0 0 34px 74px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute;
  left: 14px; top: 2px;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: var(--terracotta);
  border: 5px solid var(--cream);
  box-shadow: 0 0 0 2px var(--terracotta);
}
.tl-item__year {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--terracotta-dark);
  font-size: 1.25rem;
  display: block;
  margin-bottom: 2px;
}
.tl-item h3 { margin: 0 0 0.2em; font-size: 1.15rem; }
.tl-item p { margin: 0; color: var(--ink-soft); }

/* ---------- Schedule table ---------- */
.table-wrap { overflow-x: auto; }
.sched {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 460px;
}
.sched th, .sched td {
  text-align: left;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(122,139,111,0.16);
}
.sched th {
  background: var(--sage);
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.03em;
}
.sched tr:last-child td { border-bottom: 0; }
.sched td:first-child { font-weight: 800; color: var(--sage-dark); }

/* ---------- Quote ---------- */
.quote {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.quote__mark {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--gold);
  line-height: 0.5;
  display: block;
  margin-bottom: 10px;
}
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
  margin: 0 0 14px;
  color: var(--ink);
}
.quote cite { font-style: normal; font-weight: 800; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.loc-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--terracotta);
}
.loc-card h3 { margin-bottom: 0.4em; }
.loc-card p { margin-bottom: 0.4em; }
.loc-card .label {
  font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sage-dark);
}

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid rgba(122,139,111,0.35);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: #fff;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(150deg, var(--terracotta) 0%, var(--terracotta-dark) 100%);
  color: #fff;
  text-align: center;
  border-radius: 28px;
  padding: 56px 30px;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 560px; margin: 0 auto 26px; }

.badge-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.badge {
  background: #fff;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--sage-dark);
  box-shadow: var(--shadow-sm);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sage-dark);
  color: rgba(255,255,255,0.85);
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 34px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 16px;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-brand__name { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 22px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.7);
}

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.note {
  background: rgba(217,164,65,0.14);
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; padding: 64px 24px; }
  .hero__art { max-width: 380px; margin: 0 auto; width: 100%; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split--reverse .split__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--cream);
    padding: 10px 18px 18px;
    gap: 2px;
    border-bottom: 1px solid rgba(122,139,111,0.2);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 14px; }
  .nav__cta { margin: 8px 0 0; }
  .nav__cta .btn { display: block; text-align: center; }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; }
}
