/* ============================================================
   Montessori, explained — a static family guide
   Design system
   ============================================================ */

:root {
  /* palette tokens */
  --paper: #F7EFDD;        /* warm page field */
  --paper-2: #EFE2C6;      /* slightly deeper panel */
  --ink: #161A26;          /* type, dark shapes */
  --ink-soft: #3E4556;     /* secondary copy */
  --forest: #3F6B4E;       /* the courteous green */
  --forest-deep: #2F503A;
  --gold: #D99E2B;         /* action and focus highlights */
  --gold-soft: #F2C65C;
  --brick: #A93B3F;        /* restrained urgency */
  --slate: #5A6572;        /* quiet structure, captions */

  /* type scale */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  --t-xs: 0.8rem;
  --t-s: 0.95rem;
  --t-m: 1.0625rem;
  --t-l: 1.3rem;
  --t-xl: 1.7rem;
  --t-2xl: 2.35rem;
  --t-3xl: 3.1rem;

  --space: 1rem;
  --radius: 10px;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-soft: 4px 4px 0 rgba(22, 26, 38, 0.16);
  --frame: 2px solid var(--ink);
}

/* ---------- reset & base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--t-m);
  line-height: 1.62;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -10%, rgba(217, 158, 43, 0.16), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(63, 107, 78, 0.14), transparent 42%),
    var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  line-height: 1.12;
  margin: 0 0 0.6em;
  font-weight: 900;
}

p { margin: 0 0 1em; }
a { color: var(--forest-deep); text-underline-offset: 3px; }

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

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

::selection { background: var(--gold); color: var(--ink); }

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 200;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: var(--frame);
  box-shadow: 0 4px 0 rgba(22, 26, 38, 0.1);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.wordmark-seal {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--forest);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.35rem;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.wordmark-text { line-height: 1.2; }

.nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav a:hover { color: var(--forest); background: var(--paper-2); }

.nav-cta {
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-cta:hover { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }

/* ---------- hero ---------- */
.hero {
  padding: clamp(40px, 7vw, 80px) 0 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.kicker {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--brick);
  margin: 0 0 14px;
}
.display {
  font-size: var(--t-3xl);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.display-h2 { font-size: var(--t-2xl); }
.display-accent {
  color: var(--brick);
  text-decoration: underline wavy var(--gold) 2px;
  text-underline-offset: 10px;
}
.lede {
  font-size: var(--t-l);
  max-width: 52ch;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.btn {
  display: inline-block;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  background: var(--paper);
}
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-gold { background: var(--gold); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--gold-soft); box-shadow: 3px 3px 0 rgba(242, 198, 92, 0.4); }
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-gold:hover { box-shadow: 2px 2px 0 var(--ink); }
.btn-primary:hover { box-shadow: 2px 2px 0 var(--ink); }
.btn-ghost:hover { box-shadow: 1px 1px 0 rgba(242, 198, 92, 0.4); border-color: var(--gold-soft); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-ghost:active { box-shadow: 0 0 0 transparent; }

.hero-facts {
  display: flex;
  gap: 0;
  border: var(--frame);
  box-shadow: var(--shadow-soft);
  background: var(--paper-2);
  max-width: 520px;
}
.hero-facts > div {
  flex: 1 1 0;
  padding: 12px 16px;
}
.hero-facts > div + div { border-left: 2px solid var(--ink); }
.hero-facts dt {
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}
.hero-facts dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--ink);
}

.chalkboard {
  margin: 18px 0 0;
  position: relative;
}
.chalkboard-caption {
  font-size: var(--t-s);
  color: var(--ink-soft);
  font-style: italic;
  max-width: 40ch;
  margin: 18px 0 0 auto;
}
.chalkboard-svg {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.board { fill: var(--forest-deep); }
.frame { stroke: var(--gold); stroke-width: 6; }
.scribe { fill: var(--gold); }
.post { fill: var(--gold-soft); }
.post-shade { fill: rgba(0, 0, 0, 0.14); }
.tower-block, .tower-block2, .tower-block3, .tower-block4, .tower-top { fill: var(--gold); }
.shelf-shapes .shape-square { fill: var(--brick); }
.shape-tri { fill: var(--gold-soft); }
.shape-circle { fill: var(--brick); }
.card { fill: var(--paper); stroke: var(--gold-soft); stroke-width: 1.5; }
.card-num { font-family: var(--display); font-weight: 900; font-size: 40px; fill: var(--forest-deep); }

.profile path { fill: var(--paper-2); }
.profile .hair { fill: var(--ink); }
.profile .eye, .profile .smile { stroke: var(--ink); fill: none; stroke-width: 1.6; }
.profile .smile { stroke-linecap: round; }

/* one orchestrated moment: the tower settles into place */
@keyframes settle {
  from { transform: translateY(-30px) scale(0.4); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.tower > rect {
  transform-origin: center bottom;
  animation: settle 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.tower-block2 { animation-delay: 0.08s; }
.tower-block3 { animation-delay: 0.16s; }
.tower-block4 { animation-delay: 0.24s; }
.tower-top { animation-delay: 0.32s; }

/* ---------- shared sections ---------- */
section {
  padding: clamp(48px, 7vw, 92px) 0;
  border-top: 2px solid var(--ink);
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(30px, 5vw, 52px);
}
.section-lede { font-size: var(--t-l); color: var(--ink-soft); margin: 16px 0 0; }

/* ---------- why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 28px);
}
.why-card {
  background: var(--paper-2);
  border: var(--frame);
  border-bottom-width: 6px;
  box-shadow: var(--shadow-soft);
  padding: 26px 24px;
}
.why-card h3 { font-size: 1.25rem; }
.why-card p { margin: 0; color: var(--ink-soft); }

/* ---------- method ---------- */
.method { background: var(--ink); color: var(--paper); border-top-color: var(--ink); }
.method .section-lede { color: #C4CCD6; }
.method .kicker { color: var(--gold); }

.principle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: principle;
}
.principle {
  counter-increment: principle;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid rgba(244, 222, 160, 0.22);
}
.principle:last-child { border-bottom: 1px solid rgba(244, 222, 160, 0.22); }
.principle-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--ink);
  background: var(--gold);
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 3px 3px 0 rgba(244, 222, 160, 0.7);
}
.principle-body h3 { margin-bottom: 6px; }
.principle-body p { margin: 0; color: #C4CCD6; }
.principle-body em { color: var(--gold-soft); }

/* ---------- areas ---------- */
.area-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.area-card {
  background: var(--paper);
  border: var(--frame);
  box-shadow: var(--shadow-soft);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}
.area-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-left: 26px solid transparent;
  border-top: 26px solid var(--brick);
}
.area-shape {
  display: inline-block;
  color: var(--forest);
  margin-bottom: 12px;
}
.area-shape svg { width: 34px; height: 34px; }
.area-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.area-card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

.note {
  margin-top: 34px;
  border-left: 6px solid var(--gold);
  background: var(--paper-2);
  padding: 18px 22px;
}
.note p { margin: 0; color: var(--ink-soft); }

/* ---------- history ---------- */
.history { background: var(--forest); color: var(--paper); border-top-color: var(--forest-deep); }
.history .section-lede { color: rgba(247, 239, 221, 0.92); }
.history .kicker { color: var(--gold); }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 24px 34px;
  color: rgba(247, 239, 221, 0.95);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 2px solid var(--paper);
  border-radius: 50%;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 2px;
  width: 2px;
  background: rgba(247, 239, 221, 0.4);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline time {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.timeline cite, .history-foot cite { font-style: italic; }

.history-foot {
  margin-top: 36px;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.12);
  border-left: 6px solid var(--gold);
  padding: 20px 24px;
}
.history-foot p { margin: 0; max-width: 64ch; color: rgba(247, 239, 221, 0.95); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; }
.faq-item {
  border: var(--frame);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--forest);
  transition: transform 0.15s ease;
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 20px 18px; }
.faq-body p { margin: 0; color: var(--ink-soft); }

/* ---------- CTA ---------- */
.visit { border-top: 2px solid var(--ink); background: var(--gold-soft); }
.visit-inner { display: flex; flex-direction: column; gap: 26px; }
.visit-copy { max-width: 720px; }
.visit-copy p { color: var(--ink-soft); font-size: var(--t-l); margin: 0; }
.visit-copy .kicker { color: var(--brick); }
.visit-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.small-print { color: var(--ink-soft); font-size: var(--t-s); margin: 0; }

/* ---------- footer ---------- */
.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 44px 0 40px;
}
.foot-inner { display: grid; gap: 20px; }
.foot-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.3rem;
  margin: 0;
}
.foot-quote { margin: 0; color: #C4CCD6; font-style: italic; max-width: 64ch; }
.foot-quote cite { color: var(--gold-soft); font-style: italic; }
.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-nav a { color: var(--gold-soft); text-decoration: none; font-weight: 500; }
.foot-nav a:hover { text-decoration: underline; }
.foot-legal { margin: 0; color: #8A94A1; font-size: var(--t-xs); letter-spacing: 0.02em; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .chalkboard { max-width: 520px; margin-inline: auto; }
  .chalkboard-caption { margin-inline: auto; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .area-grid { grid-template-columns: repeat(3, 1fr); }
  .nav { order: 3; width: 100%; margin-left: 0; }
  .nav-cta { order: 4; }
}

@media (max-width: 640px) {
  :root {
    --t-3xl: 2.15rem;
    --t-2xl: 1.6rem;
    --t-xl: 1.25rem;
  }
  .head-inner { justify-content: space-between; }
  .nav { display: none; }
  .nav-cta { display: inline-block; }
  .why-grid { grid-template-columns: 1fr; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .hero-facts { flex-direction: column; }
  .hero-facts > div + div { border-left: 0; border-top: 2px solid var(--ink); }
  .principle { grid-template-columns: 48px 1fr; gap: 14px; }
  .principle-num { width: 44px; height: 44px; font-size: 1.25rem; }
  .timeline li { padding-left: 30px; }
  .visit-actions .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .tower > rect { animation: none; transform: none; }
}
