/* ==========================================================================
   Oaktree Children's Academy
   Palette and type are taken from the brand: ink #2F3614, leaf #7E9440,
   cream #F8F0E2 (the logo's original background, now the page ground).
   Fonts are system stacks on purpose — this site is served locally and must
   render identically with no network, so no webfont CDN.
   ========================================================================== */

:root {
  --ink:        #2f3614;
  --ink-soft:   #4a5426;
  --leaf:       #7e9440;
  --leaf-dark:  #5e702e;   /* darkened from #667a32: that failed WCAG AA on cream (4.22) and on leaf-pale (4.06). Now 4.84 / 4.65. */
  --leaf-pale:  #eceedd;
  --cream:      #f8f0e2;
  --cream-deep: #f0e5d1;
  --paper:      #fffdf8;
  --rule:       #ddd2ba;
  --muted:      #6b6a58;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gap: clamp(1.5rem, 4vw, 3.5rem);
}

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

/* Skip link — visible only once focused. */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: .7rem 1.1rem; border-radius: 0 0 4px 0;
  font-family: var(--sans); font-size: .95rem; font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

/* scroll-padding keeps in-page anchor targets clear of the sticky header;
   without it #philosophy and #stages land with their eyebrow hidden. */
html { scroll-behavior: smooth; scroll-padding-top: 7rem; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1.1em; }
a  { color: var(--leaf-dark); }

/* Keyboard focus. Form fields set their own below; this covers links and buttons. */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--leaf-dark); outline-offset: 3px; border-radius: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gap); }

/* Small caps label above a section heading. */
.eyebrow {
  font-family: var(--sans);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--leaf-dark);
  margin: 0 0 .7rem;
}

.lede { font-size: 1.16rem; color: var(--ink-soft); }

/* ---------- header ---------------------------------------------------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 88px; padding-top: .6rem; padding-bottom: .6rem;
}
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 58px; height: 58px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
/* -.028em cancels the serif O's side bearing so the wordmark's ink lines up
   flush left with the sans sub-line below it, which has almost none. */
.brand-name { font-family: var(--serif); font-size: 3.96rem; font-weight: 600; letter-spacing: .01em; text-indent: -.028em; }
.brand-sub  { font-size: 1.02rem; letter-spacing: .17em; text-transform: uppercase; color: var(--leaf-dark); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1rem;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--leaf); }
.nav a[aria-current="page"] { border-bottom-color: var(--leaf); }

.pill {
  display: inline-block; background: var(--leaf-dark); color: #fff;  /* was --leaf: white on it measured 3.39, below AA */
  font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: .42rem .85rem; border-radius: 999px; white-space: nowrap;
}

/* ---------- buttons --------------------------------------------------- */

.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-size: 1rem; font-weight: 700;
  padding: .82rem 1.6rem; border-radius: 4px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--cream);
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--leaf-dark); border-color: var(--leaf-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---------- hero ------------------------------------------------------ */

.hero { background: var(--paper); border-bottom: 1px solid var(--rule); }
/* Full-bleed banner: the figure sits outside .wrap so it spans the viewport.
   object-fit keeps the 1300x420 crop filling the bar at any width. */
.hero-banner { margin: 0; }
.hero-banner img {
  width: 100%; height: clamp(150px, 20vw, 240px); /* matches .divider */
  object-fit: cover; display: block;
}
.hero-copy {
  text-align: center;
  padding-top: clamp(2.6rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem);
}
.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--leaf-dark); }
/* 2x2 grid so every hero button is the same width; 1fr columns make them equal
   regardless of label length. Capped so they don't stretch when the hero stacks. */
.hero-actions {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: .8rem; margin-top: 1.8rem; max-width: 430px;
  margin-left: auto; margin-right: auto;
}
.hero-actions .btn { text-align: center; }
.hero-copy .lede { max-width: 620px; margin-left: auto; margin-right: auto; }

/* ---------- fact strip ------------------------------------------------ */

.facts { background: var(--ink); color: var(--cream); }
.facts .wrap {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; padding-top: 1.9rem; padding-bottom: 1.9rem;
}
.fact { text-align: center; }
.fact dt { font-size: .82rem; letter-spacing: .15em; text-transform: uppercase; color: #b9c489; font-weight: 700; margin-bottom: .3rem; }
.fact dd { margin: 0; font-family: var(--serif); font-size: 1.28rem; line-height: 1.25; }
.fact dd small { display: block; font-family: var(--sans); font-size: .9rem; color: #cfd6b0; margin-top: .25rem; line-height: 1.4; }

/* ---------- generic section ------------------------------------------- */

section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; }
.section-narrow { max-width: 720px; }

/* Two-column text + image panel; .flip puts the image first. */
.panel { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.panel + .panel { margin-top: clamp(3rem, 6vw, 4.5rem); }
.panel img { width: 100%; height: auto; display: block; border-radius: 6px; }
.panel.flip .panel-media { order: -1; }

.quote {
  border-left: 4px solid var(--leaf);
  padding: .2rem 0 .2rem 1.4rem;
  margin: 1.8rem 0;
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- mission band ---------------------------------------------- */

.band-leaf { background: var(--leaf-pale); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.band-leaf .mission {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
  line-height: 1.5;
  max-width: 860px;
}

/* ---------- stage cards ----------------------------------------------- */

/* The five stages hang off one branch. The stem runs along the bottom and each
   leaf drops a twig to it. align-items:stretch equalises the leaf heights so
   every leaf bottom -- and so every twig -- lands on the same line; the even
   leaves get a top margin for an organic stagger without breaking that. */
.branch { position: relative; margin-top: 2.6rem; padding-bottom: 95px; }
.branch-stem {
  position: absolute; left: 0; bottom: 5px;
  width: 100%; height: 90px; fill: var(--leaf-dark); opacity: .75;
}
.stages {
  --twig: 50px;
  display: flex; align-items: stretch; gap: 1.1rem;
  position: relative; z-index: 1;
}
.stage {
  flex: 1 1 0; position: relative;
  background: var(--paper); border: 1px solid var(--leaf);
  border-radius: 6px 44% 6px 44%;   /* leaf: pointed at two opposite corners */
  padding: 1.6rem 1.55rem 1.9rem;
}
.stage:nth-child(even) { margin-top: 30px; }
/* twig joining each leaf down to the stem */
.stage::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 3px;
  height: var(--twig); border-radius: 2px;
  background: var(--leaf-dark); opacity: .75;
}
.stage h3 { margin-bottom: .12rem; }
.stage .ages { font-size: .86rem; letter-spacing: .09em; text-transform: uppercase; color: var(--leaf-dark); font-weight: 700; margin-bottom: .7rem; }
.stage p { font-size: 1rem; color: var(--ink-soft); margin: 0 0 .8rem; }
.stage .tagline { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink); margin: 0; }

/* ---------- divider image --------------------------------------------- */

.divider { height: clamp(150px, 20vw, 240px); background: url("../img/leaves-sun.jpg") center 55% / cover no-repeat; }

/* ---------- contact page ---------------------------------------------- */

.page-head { background: var(--paper); border-bottom: 1px solid var(--rule); padding: clamp(2.6rem, 6vw, 4rem) 0 clamp(2.2rem, 5vw, 3rem); }
.page-head p { max-width: 620px; margin-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }

.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(1.5rem, 3vw, 2.2rem); }

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 4px;
  padding: .68rem .8rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--leaf); outline-offset: 1px; border-color: var(--leaf);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }

.form-note { font-size: .95rem; color: var(--muted); margin: 1.2rem 0 0; }
.form-note.is-error { color: #8a2b1f; font-weight: 600; }

.mt-lg { margin-top: 1.6rem; }

/* Honeypot — a bot fills this, a human never sees it. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.aside-photo { width: 100%; height: auto; display: block; border-radius: 6px; margin-bottom: 1.6rem; }

/* Logo in the contact sidebar. Deliberately not .aside-photo: a mark needs
   whitespace around it, not edge-to-edge bleed or rounded photo corners. */
.aside-logo {
  display: block; width: 100%; max-width: 170px; height: auto;
  margin: .5rem auto 2rem;
}

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.info-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.info-list dt, .info-list .k {
  display: block; font-size: .82rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--leaf-dark); font-weight: 700; margin-bottom: .2rem;
}
.info-list a { text-decoration: none; }
.info-list a:hover { text-decoration: underline; }

.notice {
  background: var(--leaf-pale); border: 1px solid var(--rule); border-left: 4px solid var(--leaf);
  border-radius: 4px; padding: 1rem 1.15rem; font-size: 1rem; color: var(--ink-soft);
}
.notice strong { color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }

/* ---------- footer ---------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--cream); padding: 2.8rem 0 2.2rem; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: baseline; }
.site-footer a { color: #c8d29a; }
.site-footer .foot-name { font-family: var(--serif); font-size: 1.1rem; color: #fff; margin-right: auto; }
.site-footer .fine { width: 100%; color: #a3ab7e; font-size: .9rem; border-top: 1px solid #4a5426; padding-top: 1.3rem; margin-top: .6rem; }

/* ---------- responsive ------------------------------------------------ */

@media (max-width: 860px) {
  .facts .wrap { gap: 1.4rem 1.5rem; }
  .panel { grid-template-columns: 1fr; }
  .panel.flip .panel-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  /* Narrow: the branch turns vertical -- stem down the left, leaves to its
     right, twigs horizontal. Alternating offsets are reset. */
  .branch { padding-bottom: 0; }
  .stages { flex-direction: column; align-items: stretch; gap: 1.6rem; padding-left: 2.2rem; }
  .stage:nth-child(odd), .stage:nth-child(even) { margin: 0; }
  .branch-stem { display: none; }
  .branch::before {
    content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
    width: 3px; background: var(--leaf-dark); opacity: .5; border-radius: 2px;
  }
  .stage::after { left: auto; right: 100%; top: 2.1rem;
    width: 1.5rem; height: 3px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header .wrap { min-height: 0; flex-wrap: wrap; gap: .8rem 1.2rem; }
  .brand { margin-right: 0; width: 100%; }
  .nav { gap: 1.2rem; }
  .facts .wrap { grid-template-columns: 1fr; }
  .hero-actions { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  /* Keep the footer: it carries the address, phone, email and the licensing
     notice. A printed page without that notice is the one thing this site
     must never produce. Only navigation and decoration are dropped. */
  .site-header, .divider, .hero-actions, .skip { display: none; }
  body { background: #fff; color: #000; }
  .site-footer { background: #fff; color: #000; border-top: 1px solid #999; padding-top: 1.4rem; }
  .site-footer a, .site-footer .foot-name, .site-footer .fine { color: #000; }
  .site-footer .fine { border-top-color: #999; }
  .facts { background: #fff; color: #000; }
  .fact dd small { color: #333; }
  a { text-decoration: underline; }
  .panel, .stage, .card { break-inside: avoid; }
  .branch-stem, .branch::before, .stage::after { display: none; }
  .stages { display: block; padding-left: 0; }
  .stage { margin: 0 0 .6rem !important; border-radius: 4px; }
}
