/* Layout idea: the school crest sets the look. Navy carries the first screen, maroon marks
   the facts, cream holds the reading. Gold appears only on things a parent can press.
   One light theme on purpose: these are the school's own colors. */
:root {
  --navy: #20245A;
  --navy-deep: #161944;
  --maroon: #8A1F2D;
  --cream: #FBF6EA;
  --sand: #F1E7D0;
  --paper: #FFFFFF;
  --ink: #1C1F3F;
  --muted: #5B5F78;
  --line: #E3D8BF;
  --gold: #F0B13C;
  --gold-ink: #2B1C00;
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Albert Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--maroon); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.block { padding: 76px 0; }
.lede { color: var(--muted); max-width: 58ch; font-size: 1.1rem; }
.head { display: grid; gap: 12px; margin-bottom: 36px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 26px; border-radius: 14px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 3px 0 #B07A12; }
.btn-gold:hover { background: #F6BE55; }
.btn-ghost { border-color: currentColor; color: var(--cream); background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--sand); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 68px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; }
.brand-name span { display: block; font-family: var(--font-body); font-weight: 600; font-size: 0.86rem; color: var(--muted); }
.nav { display: flex; gap: 24px; align-items: center; white-space: nowrap; }
.nav a.link { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a.link:hover { color: var(--maroon); }
.nav .btn { padding: 11px 18px; font-size: 1rem; }

/* Hero */
.hero { background: var(--navy); color: var(--cream); padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 52px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.enrolling { display: inline-flex; align-items: center; gap: 10px; background: var(--maroon); color: #fff; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.enrolling i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: block; }
.hero-copy p { font-size: 1.2rem; color: #DADCEE; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { font-size: 1rem; color: #C5C8E0; }
.hero-photo { margin: 0; position: relative; }
.hero-photo::before { content: ""; position: absolute; inset: 18px -14px -14px 18px; border: 3px solid var(--gold); border-radius: 22px; }
.hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 30% 35%; border-radius: 22px; }

/* Facts band */
.facts-band { background: var(--maroon); color: #fff; }
.facts-band ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-band li { padding: 22px 20px; display: grid; gap: 2px; }
.facts-band li + li { border-left: 1px solid rgba(255,255,255,0.25); }
.facts-band strong { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; line-height: 1.2; }
.facts-band span { color: #F4D9DC; font-size: 0.98rem; }

/* Flexible care */
.flexible { background: var(--paper); border-bottom: 1px solid var(--line); }
.flex-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.flex-list li { border-top: 4px solid var(--maroon); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.flex-list p { color: var(--muted); }
.flex-list a { font-weight: 700; }
.hero-note a { color: var(--gold); font-weight: 600; }

/* Reasons */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.reason { display: grid; gap: 14px; align-content: start; }
.reason img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; }
.reason p { color: var(--muted); }

/* Safety */
.safety { background: var(--sand); }
.safety-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 52px; align-items: start; }
.safety .head { margin-bottom: 0; }
.safety .licence { margin-top: 8px; padding: 14px 16px; border-left: 5px solid var(--maroon); background: var(--paper); border-radius: 0 12px 12px 0; font-weight: 600; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.promises li { padding: 20px 0 22px; border-top: 3px solid var(--navy); }
.promises h3 { margin-bottom: 6px; }
.promises p { color: var(--muted); }

/* Programs */
.programs { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 4px solid var(--navy); }
.ages li { padding: 22px 20px 24px 0; }
.ages li + li { border-left: 1px solid var(--line); padding-left: 20px; }
.ages h3 { margin-bottom: 6px; }
.ages p { color: var(--muted); font-size: 1rem; }
.also { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.also b { font-weight: 700; margin-right: 4px; }
.also span { background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-weight: 600; font-size: 0.97rem; }

/* Tour request */
.tour { background: var(--sand); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.tour-copy { display: grid; gap: 18px; }
.steps { counter-reset: s; list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.steps li::before { content: counter(s); font-family: var(--font-display); font-size: 1.2rem; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--cream); display: grid; place-items: center; }
.steps b { display: block; font-size: 1.08rem; }
.steps span { color: var(--muted); }
.card { background: var(--paper); border-radius: 22px; padding: 30px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(32, 36, 90, 0.10); }
.card h3 { margin-bottom: 6px; }
.card > p { color: var(--muted); margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 0.98rem; }
.field input, .field select { font: inherit; padding: 13px 14px; border-radius: 12px; border: 1.5px solid #C9BFA6; background: #fff; color: var(--ink); width: 100%; }
.card .btn { width: 100%; }
.or-call { margin-top: 14px; text-align: center; color: var(--muted); }
.or-call a { font-weight: 700; }
.result { display: none; margin-top: 18px; padding: 18px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line); }
.result.show { display: grid; gap: 12px; }
.result pre { margin: 0; white-space: pre-wrap; font: inherit; font-weight: 600; }
.result small { color: var(--muted); }

/* Life at Berea */
.life-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; }
.life-grid figure { margin: 0; position: relative; }
.life-grid img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 20px; }
.life-grid figure:last-child img { aspect-ratio: auto; object-position: 50% 40%; }
.life-grid figcaption { position: absolute; left: 14px; bottom: 14px; background: var(--navy); color: var(--cream); font-weight: 600; font-size: 0.95rem; padding: 6px 14px; border-radius: 999px; }

/* Director and licence */
.about { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.about-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 60%; border-radius: 22px; }
.about-copy { display: grid; gap: 16px; }
.about-copy p { color: var(--muted); max-width: 60ch; }
.licence { margin-top: 6px; padding: 16px 18px; border-left: 5px solid var(--maroon); background: var(--cream); border-radius: 0 12px 12px 0; color: var(--ink); font-weight: 600; }

/* Questions */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 12px; font-size: 1.6rem; font-weight: 400; color: var(--maroon); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 62ch; }

/* Visit */
.visit { background: var(--navy); color: var(--cream); }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: start; }
.visit-copy { display: grid; gap: 18px; justify-items: start; }
.visit-copy address { font-style: normal; font-size: 1.2rem; line-height: 1.5; }
.visit-copy p { color: #DADCEE; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 12px; }
table.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.hours th, table.hours td { text-align: left; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.2); font-weight: 500; }
table.hours td { text-align: right; }
table.hours tr.closed th, table.hours tr.closed td { color: #A9ADCB; }
table.hours tr.is-today th, table.hours tr.is-today td { font-weight: 700; color: var(--gold); }

footer { background: var(--navy-deep); color: #C5C8E0; padding: 28px 0 32px; font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }
footer a { color: #C5C8E0; }

/* Phone call bar */
.callbar { display: none; }

@media (max-width: 920px) {
  .block { padding: 54px 0; }
  .nav a.link { display: none; }
  .hero { padding: 40px 0 56px; }
  .hero-grid, .tour-grid, .visit-grid, .safety-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-photo::before { inset: 12px -8px -8px 12px; }
  .facts-band ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-band li:nth-child(3) { border-left: 0; }
  .facts-band li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.25); }
  .reasons { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .flex-list { grid-template-columns: minmax(0, 1fr); }
  .reason img { aspect-ratio: 4 / 3; }
  .ages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ages li:nth-child(3) { border-left: 0; padding-left: 0; }
  .ages li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .life-grid { grid-template-columns: minmax(0, 1fr); }
  .life-grid figure:last-child img { aspect-ratio: 4 / 3; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .brand img { width: 48px; }
  .brand-name { font-size: 1.15rem; }
  .site-header .nav .btn { display: none; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
  .card { padding: 22px; }
  .promises { grid-template-columns: minmax(0, 1fr); }
  .callbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--navy-deep); border-top: 2px solid var(--gold); }
  .callbar .btn { padding: 13px 10px; font-size: 1rem; }
}
