/* Heritage Oak Education
   Layout concept: a clothbound storybook. A botanical "cover" opens the home page,
   classes sit on the page like a shelf of small books, and a light-green leaf garland frames
   the header and footer. Pale celadon paper by day, evergreen bookcloth by night. */

:root {
  --paper: #ECF0E4;
  --paper-2: #E1E8D6;
  --card: #F7F8F1;
  --ink: #1E2B33;
  --ink-soft: #4B5A5B;
  --line: #C6D1BA;
  --evergreen: #1D4439;
  --gold: #8A6A22;
  --band: #163730;
  --band-fg: #EDE6D4;
  --band-gold: #CBAC63;
  --rose: #A9454F;
  --btn-bg: #173730;
  --btn-fg: #F4EDDF;
  --btn2-fg: #173730;
  --footer-bg: #163730;
  --footer-fg: #EDE6D4;
  --footer-soft: #B9C8B7;
  --focus: #A9454F;
  --stamp: #A9454F;

  --f-display: "Gloock", "Iowan Old Style", Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-body: "Figtree", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4.2vw, 2.6rem);
  --step-4: clamp(2.4rem, 5.6vw, 3.7rem);

  --sketch: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13241F; --paper-2: #1A2F28; --card: #1D342C; --ink: #EEE7D7; --ink-soft: #BAC3B3;
    --line: #2E473D; --evergreen: #2F5E4C; --gold: #D4B66E; --rose: #EBA0A6;
    --btn-bg: #CBAC63; --btn-fg: #13241F; --btn2-fg: #EEE7D7;
    --footer-bg: #0F2A24; --footer-fg: #EEE7D7; --footer-soft: #A9B8A6; --focus: #EBA0A6; --stamp: #EBA0A6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13241F; --paper-2: #1A2F28; --card: #1D342C; --ink: #EEE7D7; --ink-soft: #BAC3B3;
  --line: #2E473D; --evergreen: #2F5E4C; --gold: #D4B66E; --rose: #EBA0A6;
  --btn-bg: #CBAC63; --btn-fg: #13241F; --btn2-fg: #EEE7D7;
  --footer-bg: #0F2A24; --footer-fg: #EEE7D7; --footer-soft: #A9B8A6; --focus: #EBA0A6; --stamp: #EBA0A6;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: .005em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0; }
.prose { max-width: 62ch; display: grid; gap: 1em; }
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--ink-soft); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 12px; }

/* ---------- header: the banner, a nav band, and a leaf garland ---------- */
.site-header { background: var(--band); color: var(--band-fg); }
.banner { display: block; max-width: 1584px; margin: 0 auto; }
.banner img { width: 100%; height: clamp(140px, 25vw, 396px); object-fit: cover; object-position: center; }
@media (min-width: 1600px) {
  .banner img { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
}
.site-nav { border-top: 1px solid rgba(203,172,99,.28); }
.site-nav ul { list-style: none; margin: 0; padding: 10px 0 4px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 30px; }
.site-nav a { color: var(--band-fg); text-decoration: none; font-weight: 500; letter-spacing: .01em; padding: 6px 0 4px; display: inline-block; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--band-gold); }
.site-nav a[aria-current="page"] { color: var(--band-gold); border-bottom-color: var(--band-gold); }
.site-nav a:focus-visible { outline-color: var(--band-gold); }
.garland { height: 40px; background: url("images/leaf-garland.svg") left center / auto 40px repeat-x; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  padding: 12px 24px; border: 2px solid var(--btn-bg); border-radius: var(--sketch);
  background: var(--btn-bg); color: var(--btn-fg); transition: transform .15s ease;
}
.btn:hover { color: var(--btn-fg); transform: rotate(-1deg); }
.btn.ghost { background: transparent; color: var(--btn2-fg); }
.btn.ghost:hover { color: var(--btn2-fg); }

/* ---------- sections ---------- */
main > section { padding-block: clamp(48px, 8vw, 88px); }
main > section.tight { padding-block: 24px; }
.sec-head { display: grid; gap: 14px; margin-bottom: 32px; justify-items: start; }
.vine { width: 220px; height: auto; opacity: .95; }
.band { background: var(--paper-2); }

/* ---------- hero ---------- */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero-copy .lede { font-size: 1.22rem; }
.cover {
  position: relative; aspect-ratio: 3 / 4; width: 100%; max-width: 440px; justify-self: center;
  background: #173730 url("images/cover-frame.svg") center / cover no-repeat;
  border-radius: 6px 12px 12px 6px;
  box-shadow: 0 1px 0 rgba(0,0,0,.25), 10px 14px 0 -4px rgba(31,61,53,.18), 0 22px 40px -18px rgba(18,36,30,.55);
  display: grid; place-content: center; text-align: center; gap: 6px; padding: 18%;
  transform: rotate(1.2deg);
}
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 16px; border-radius: 6px 0 0 6px;
  background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.07) 55%, rgba(0,0,0,.12));
}
.foil {
  background: linear-gradient(100deg, #B8892F 0%, #F1D58A 32%, #C99A3E 52%, #F6E2A4 70%, #B8892F 100%);
  -webkit-background-clip: text; background-clip: text; color: #E2BF6A; -webkit-text-fill-color: transparent;
}
.cover-script { font-family: var(--f-script); font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.05; }
.cover-sub { font-family: var(--f-display); font-size: clamp(1rem, 2vw, 1.25rem); letter-spacing: .3em; color: #E2C47A; padding-left: .3em; }
.cover-small { font-size: .92rem; color: #D9D2BE; margin-top: 10px; line-height: 1.45; }

/* ---------- notice ---------- */
.notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--sketch); padding: 18px 26px;
}
.notice p { max-width: 62ch; }
.notice strong { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; display: block; }

/* ---------- steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { display: grid; gap: 8px; align-content: start; counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: var(--gold); }
.steps h3 { font-size: 1.25rem; }

/* ---------- book shelf ---------- */
.shelf { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px 20px; }
.book {
  --c: #2B3A67; --t: #F2E7CF;
  position: relative; display: grid; grid-template-rows: 1fr auto; aspect-ratio: 3 / 4.15; max-width: 100%;
  background: var(--c); color: var(--t); text-decoration: none; padding: 18px 18px 20px 26px;
  border-radius: 4px 10px 10px 4px;
  box-shadow: 6px 8px 0 -3px color-mix(in srgb, var(--c) 35%, transparent), 0 14px 24px -16px rgba(0,0,0,.5);
  transition: transform .18s ease;
}
.book::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 11px; border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(255,255,255,.1) 60%, rgba(0,0,0,.08));
}
.book::after { content: ""; position: absolute; inset: 9px 9px 9px 18px; border: 1px solid color-mix(in srgb, var(--t) 45%, transparent); border-radius: 3px 7px 7px 3px; pointer-events: none; }
.book img { width: 78%; margin: 4px auto 0; align-self: center; }
.book h3 { font-size: 1.22rem; color: var(--t); }
.book p { font-size: .9rem; opacity: .9; margin-top: 4px; line-height: 1.35; }
a.book:hover { color: var(--t); transform: translateY(-4px) rotate(-.6deg); }
.b-felt { --c: #2B3A67; --t: #F2E7CF; }
.b-color { --c: #F2C4C0; --t: #3B1E22; }
.b-light { --c: #22433A; --t: #F1D58A; }
.b-sheep { --c: #A9C3A0; --t: #1E2B22; }
.b-weave { --c: #6E2834; --t: #F4E6D6; }
.b-camp { --c: #9DBDE0; --t: #17263A; }

/* ---------- class detail rows ---------- */
.class-list { display: grid; gap: clamp(36px, 6vw, 60px); }
.class-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; scroll-margin-top: 24px; }
.class-row .book { width: 210px; }
.class-row .info { display: grid; gap: 14px; min-width: 0; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-soft); }
.tbd { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--rose); border: 1.5px dashed currentColor; border-radius: var(--sketch); padding: 2px 12px; }

/* ---------- library card (waitlist / forms) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.card {
  position: relative; background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; padding: 28px 26px 26px;
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, color-mix(in srgb, var(--line) 32%, transparent) 35px 36px);
  background-position: 0 64px;
}
.card h3 { margin-bottom: 6px; }
.stamp {
  position: absolute; top: 18px; right: 18px; transform: rotate(8deg);
  font-family: var(--f-display); font-size: .95rem; color: var(--stamp); border: 2px solid var(--stamp); border-radius: var(--sketch);
  padding: 4px 12px; background: var(--card);
}
form { display: grid; gap: 16px; margin-top: 16px; }
.field { display: grid; gap: 6px; }
label, legend { font-weight: 600; font-size: .98rem; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: .9rem; }
input[type="text"], input[type="email"], select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 13px; width: 100%;
}
textarea { min-height: 140px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.checks label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--evergreen); }
.form-note { font-size: .9rem; color: var(--ink-soft); }
.form-msg { font-weight: 600; color: var(--evergreen); }
:root[data-theme="dark"] .form-msg { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .form-msg { color: var(--gold); } }

/* ---------- growing list ---------- */
.growing { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 40px; }
.growing li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: start; }
.growing svg { width: 52px; height: 52px; color: var(--evergreen); }
:root[data-theme="dark"] .growing svg { color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .growing svg { color: var(--gold); } }
.growing h3 { font-size: 1.2rem; margin-bottom: 4px; }
.soon { font-size: .88rem; color: var(--rose); font-weight: 600; }

/* ---------- principles, days, faq ---------- */
.leaf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; max-width: 70ch; }
.leaf-list li { padding-left: 38px; position: relative; }
.leaf-list li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 18px; height: 18px; border-radius: 0 100% 0 100%;
  background: var(--evergreen); transform: rotate(-12deg);
}
:root[data-theme="dark"] .leaf-list li::before { background: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaf-list li::before { background: var(--gold); } }
.leaf-list h3 { margin-bottom: 4px; }
.days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.days li { border-top: 2px solid var(--line); padding-top: 14px; display: grid; gap: 6px; }
.days .day { font-family: var(--f-script); font-size: 2rem; line-height: 1; color: var(--gold); }
.modules { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; max-width: 64ch; }
.modules li::marker { font-family: var(--f-display); color: var(--gold); }
.modules strong { font-weight: 600; }
.faq { display: grid; gap: 10px; max-width: 72ch; }
.faq details { border-bottom: 1.5px solid var(--line); padding: 6px 0 12px; }
.faq summary { cursor: pointer; font-family: var(--f-display); font-size: 1.18rem; padding: 6px 0; }
.faq details p { color: var(--ink-soft); margin-top: 6px; }

/* ---------- page header (inner pages) ---------- */
.page-head { padding-block: clamp(40px, 7vw, 72px) 8px !important; }
.page-head .wrap { display: grid; gap: 18px; justify-items: start; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); margin-top: 24px; }
.site-footer .wrap { padding-block: 32px 28px; display: grid; gap: 32px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-mark { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.15; color: var(--band-gold); text-decoration: none; }
.foot-mark:hover { color: #E6C877; }
.site-footer h2 { font-size: 1.1rem; margin-bottom: 10px; color: var(--band-gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration-color: rgba(226,196,122,.6); }
.site-footer a:hover { color: #F1D58A; }
.site-footer p { color: var(--footer-soft); font-size: .95rem; }
.fine { border-top: 1px solid rgba(237,230,212,.18); padding-top: 18px; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book p { display: block; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .cover { max-width: 360px; order: -1; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .days { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .cover { order: 0; max-width: 290px; }
  .site-nav ul { gap: 0 18px; padding-top: 6px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .book { padding: 12px 12px 14px 20px; }
  .book h3 { font-size: 1.05rem; }
  .book p { display: none; }
  .class-row { grid-template-columns: minmax(0, 1fr); }
  .class-row .book { width: 170px; }
  .class-row .book p { display: block; }
  .growing { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .notice { padding: 16px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .book { transition: none; }
  .btn:hover, a.book:hover { transform: none; }
}
