/* ══════════════════════════════════════════════════════════════
   Grace Montessori School — site styles
   Same fonts and colors as gracetheplains.org, plus a school accent.
   To try a different accent, change --accent below.
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #fffefc;
  --cream: #F5F3EB;
  --cream-line: #e2ddcd;
  --photo-bg: #E7E2D3;
  --navy: #1c3144;
  --muted: #4d5866;
  --red: #CC1939;
  --red-hover: #DD183B;
  --red-dark: #790D20;
  --accent: #790D20;          /* Grace's deep red, used for the school bar and labels */
  --white: #ffffff;
  --font-body: 'EB Garamond', Georgia, serif;
  --font-ui: 'Roboto', Arial, sans-serif;
  --max-w: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-gap: clamp(56px, 7vw, 96px);
  --shadow: 0 0 10px -3px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0; }
h2 { font-size: clamp(30px, 3.6vw, 40px); }
p { margin: 0; }
p + p { margin-top: 14px; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; font-family: var(--font-ui);
}
.skip-link:focus { left: 8px; }

/* Small uppercase labels */
.eyebrow {
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase; color: var(--red);
}
.label {
  font-family: var(--font-ui); font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
}
.center { text-align: center; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-hover); color: var(--white); }
.btn-white { background: var(--white); color: var(--red); }
.btn-white:hover { color: var(--red-dark); }
.btn-outline-white { border-color: var(--white); color: var(--white); letter-spacing: 1px; }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-outline-accent { border-color: var(--accent); color: var(--accent); min-height: 44px; padding: 0 18px; font-size: 13px; letter-spacing: 1.5px; }
.btn-outline-accent:hover { background: var(--accent); color: var(--white); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ── Utility bar ── */
.utility-bar { background: #F4EEE3; color: #7A5A3A; border-bottom: 1px solid #E8DFCF; }
.utility-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-block: 8px;
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 0.5px;
}
.church-button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px;
  border: 1px solid #B8A285; color: #7A5A3A; text-decoration: none;
  text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 500;
}
.church-button:hover { background: #EAE1D1; color: #5E4329; }

/* ── Header ── */
.site-header { background: var(--white); box-shadow: 0 1px 0 rgba(28,49,68,0.08); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--red); }
.logo:hover { color: var(--red); }
.logo-words { display: flex; flex-direction: column; line-height: 1; }
.logo-img { display: block; height: 64px; width: auto; max-width: 100%; }
.logo-fallback { display: flex; align-items: center; gap: 14px; }
.logo-fallback[hidden] { display: none; }
.logo-grace { font-size: 44px; font-weight: 500; }
.logo-sub { font-size: 14px; letter-spacing: 4px; margin-top: 4px; }

/* Book a Tour + hamburger, top right */
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-tour { min-height: 44px; padding: 0 22px; }
.menu-toggle {
  display: inline-flex; width: 48px; height: 48px; padding: 0; border: 0; background: transparent;
  color: var(--navy); align-items: center; justify-content: center; cursor: pointer;
}
.menu-toggle:hover, .menu-toggle[aria-expanded="true"] { color: var(--red); }

/* The menu itself: a dropdown under the hamburger */
.main-nav {
  display: none; position: absolute; top: 100%; right: max(var(--gutter), calc((100% - var(--max-w)) / 2 + var(--gutter)));
  width: 280px; flex-direction: column; background: var(--white);
  border: 1px solid var(--cream-line); border-top: 3px solid var(--red);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12); padding: 6px 0;
  font-family: var(--font-ui); font-size: 14px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
}
.main-nav.is-open { display: flex; }
.main-nav a:not(.btn) { color: var(--navy); text-decoration: none; padding: 13px 22px; }
.main-nav a:not(.btn) + a:not(.btn) { border-top: 1px solid #efeadc; }
.main-nav a:not(.btn):hover { color: var(--red); background: var(--cream); }
.main-nav a[aria-current="page"] { color: var(--red); }
.nav-tour { display: none; }

/* Narrow screens: Book a Tour moves into the menu, and the menu spans the width */
@media (max-width: 640px) {
  .header-tour { display: none; }
  .nav-tour { display: inline-flex; margin: 10px 22px 12px; }
  .main-nav { left: 0; right: 0; width: auto; border-left: 0; border-right: 0; }
  .logo-grace { font-size: 34px; }
  .logo-sub { font-size: 11px; letter-spacing: 3px; }
  .logo-seal { width: 50px; height: 50px; }
  .logo-img { height: 48px; }
  .utility-text { display: none; }
  .utility-inner { justify-content: flex-end; }
}

/* ── Photos (cream box shows until a photo is added) ── */
.photo { background: var(--photo-bg); aspect-ratio: 4 / 3; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.framed { border: 6px solid var(--white); box-shadow: var(--shadow); }
.photo.square { aspect-ratio: 1 / 1; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center;
  background-color: #2a3a4a; background-size: cover; background-position: center; color: var(--white);
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(28, 49, 68, 0.55); }
.hero-inner { position: relative; max-width: 820px; padding: 72px var(--gutter) 128px; text-align: center; }
.hero { overflow: hidden; isolation: isolate; }
.nowrap { white-space: nowrap; }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.8s ease; pointer-events: none;
}
.hero-video.is-playing { opacity: 1; }
.hero::before { z-index: 1; }
.hero-inner { z-index: 2; }
.hero .hero-eyebrow { font-family: var(--font-ui); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.25; letter-spacing: clamp(2px, 0.4vw, 5px); text-transform: uppercase; }
.hero .hero-lede { margin: 22px auto 0; max-width: 620px; font-size: 21px; line-height: 1.55; }
.hero .button-row { justify-content: center; margin-top: 32px; }

/* At-a-glance box overlapping the hero */
.glance-wrap { display: flex; justify-content: center; padding-inline: var(--gutter); margin-top: -64px; position: relative; }
.glance {
  width: min(100%, 980px); background: var(--cream); box-shadow: var(--shadow);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.glance > div { padding: 26px 28px; border-right: 1px solid var(--cream-line); }
.glance > div:last-child { border-right: 0; }
.glance p:last-child { margin-top: 6px; font-size: 20px; line-height: 1.35; }
@media (max-width: 720px) { .glance > div { border-right: 0; border-bottom: 1px solid var(--cream-line); } .glance > div:last-child { border-bottom: 0; } }

/* ── Sections ── */
.section { padding-top: var(--section-gap); }
.section-cream { margin-top: var(--section-gap); background: var(--cream); }
.section-cream > .wrap { padding-block: clamp(52px, 7vw, 88px); }
.section-head { text-align: center; }
.section-head h2, .section-head h1 { margin-top: 10px; }

.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 420px; min-width: 0; }
.split.reverse { flex-wrap: wrap-reverse; }
.split h2 { margin-top: 10px; }
.split .label + h2 { margin-top: 8px; }
.split p.body { margin-top: 16px; }
.split .btn { margin-top: 26px; }

/* Program cards */
.card-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.program-card { display: flex; flex-direction: column; background: var(--white); box-shadow: var(--shadow); color: var(--navy); text-decoration: none; }
.program-card:hover { color: var(--navy); box-shadow: 0 0 16px -3px rgba(0,0,0,0.5); }
.program-card .card-body { padding: 20px 22px 24px; }
.program-card h3 { margin-top: 6px; font-size: 26px; font-weight: 500; }
.program-card p.blurb { margin-top: 8px; font-size: 17px; line-height: 1.5; }

/* Features */
.features { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px 48px; }
.feature { display: flex; gap: 18px; }
.feature svg { flex: none; color: var(--accent); }
.feature h3 { font-size: 22px; font-weight: 500; }
.feature p { margin-top: 4px; font-size: 17px; line-height: 1.5; }

/* Award */
.award { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; padding-block: clamp(56px, 7vw, 88px); }
.award-badge {
  width: 112px; height: 112px; border-radius: 50%; border: 2px solid var(--accent); flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--accent); font-family: var(--font-ui); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.award-badge strong { font-family: var(--font-body); font-size: 34px; line-height: 1.1; color: var(--navy); font-weight: 400; letter-spacing: 0; }
.award-logo { width: 140px; height: auto; flex: none; }
.award-text { max-width: 560px; }
.award-text h2 { font-size: 28px; line-height: 1.3; }
.award-text p { margin-top: 6px; font-size: 17px; }

/* Red tour band */
.tour-band { background: var(--red); color: var(--white); }
.tour-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding-block: clamp(48px, 6vw, 72px); }
.tour-band-text { max-width: 640px; }
.tour-band-text p { margin-top: 10px; }

/* Page title band */
.page-title { background: var(--cream); }
.page-title .wrap { max-width: 900px; padding-block: clamp(52px, 7vw, 84px); text-align: center; }
.page-title h1 { margin-top: 12px; font-size: clamp(32px, 4.6vw, 48px); letter-spacing: clamp(2px, 0.35vw, 4px); text-transform: uppercase; }
.page-title p.lede { margin: 18px auto 0; max-width: 680px; }
.jump-links { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Schedules and tables */
.note-box { margin-top: 20px; background: var(--cream); padding: 16px 20px; font-size: 17px; }
.table-box { margin-top: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 17px; }
caption { text-align: left; padding-bottom: 8px; }
th, td { text-align: left; padding: 10px 14px; }
thead tr { background: var(--cream); }
thead th { font-weight: 500; }
tbody tr { border-bottom: 1px solid var(--cream-line); }
tbody th { font-weight: 400; }
.tuition-table { max-width: 860px; margin: 30px auto 0; background: var(--white); overflow-x: auto; }
.tuition-table table { font-size: 18px; }
.tuition-table thead tr { background: var(--accent); color: var(--white); font-family: var(--font-ui); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.tuition-table th, .tuition-table td { padding: 12px 16px; }
.tuition-table tbody th { font-weight: 500; }

.schedule-chips { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 17px; text-align: center; }
.schedule-chips > div { background: var(--cream); padding: 14px 8px; }
.schedule-chips .label { font-size: 11px; }

.check-list { margin: 16px 0 0; padding-left: 22px; font-size: 18px; }

.mini-cards { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; text-align: center; }
.mini-cards > div { background: var(--white); padding: 22px; }
.mini-cards strong { display: block; font-size: 22px; font-weight: 500; }
.mini-cards span { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.steps li { background: var(--white); box-shadow: var(--shadow); padding: 28px 26px; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--white); font-family: var(--font-ui); font-size: 18px; font-weight: 500;
}
.steps h3 { margin-top: 14px; font-size: 24px; font-weight: 500; }
.steps p { margin-top: 6px; font-size: 17px; line-height: 1.55; }

/* Tour booking + inquiry form */
.tour-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.tour-grid > * { flex: 1 1 440px; min-width: 0; }
.booking-frame { margin-top: 22px; width: 100%; min-height: 640px; border: 0; background: var(--white); }
.booking-fallback {
  margin-top: 22px; min-height: 280px; border: 2px dashed #c9c2ad; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 28px;
}
.form-card { background: var(--white); box-shadow: var(--shadow); padding: 30px 30px 34px; }
.form-card h3 { font-size: 26px; font-weight: 500; }
.form-card > p { margin-top: 6px; font-size: 17px; }
.form { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; font-family: var(--font-ui); font-size: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--navy); }
.form input, .form select, .form textarea {
  min-height: 44px; padding: 0 12px; border: 1px solid #8a94a0; border-radius: 0;
  font: inherit; font-size: 16px; color: var(--navy); background: var(--white); width: 100%;
}
.form textarea { padding: 10px 12px; resize: vertical; min-height: 110px; }
.form .btn { align-self: flex-start; border: 0; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 15px; min-height: 1.4em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--red-dark); }
.form-card .after { margin-top: 18px; font-size: 16px; }

/* FAQ */
.faq { max-width: 860px; margin: 28px auto 0; border-top: 1px solid var(--cream-line); }
.faq details { border-bottom: 1px solid var(--cream-line); padding: 12px 4px; }
.faq summary { cursor: pointer; font-size: 21px; min-height: 44px; display: flex; align-items: center; }
.faq details p { margin: 8px 0 6px; font-size: 18px; }

/* Staff */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.staff-card { background: var(--white); box-shadow: var(--shadow); }
.staff-body { padding: 18px 20px 22px; }
.staff-name { font-size: 24px; font-weight: 500; }
.staff-body .label { margin-top: 4px; }
.staff-bio { margin-top: 10px; font-size: 17px; line-height: 1.5; }

/* Contact */
.contact-grid { display: flex; flex-wrap: wrap; gap: 40px; }
.contact-grid > * { flex: 1 1 380px; min-width: 0; }
.map-frame { width: 100%; height: 380px; border: 0; }

/* Footer */
.site-footer { background: var(--navy); color: var(--white); margin-top: 0; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: #f3d2d8; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; padding-block: 56px 32px; font-size: 17px; }
.footer-label { font-family: var(--font-ui); font-size: 13px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.footer-grid p + p { margin-top: 0; }
.footer-links { display: flex; flex-direction: column; gap: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding-block: 18px 28px; font-size: 15px; color: rgba(255,255,255,0.85); }

.spacer-bottom { padding-bottom: var(--section-gap); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Tour booking pop-up ── */
.tour-modal {
  width: min(960px, calc(100vw - 32px)); height: min(820px, calc(100vh - 48px));
  max-width: none; max-height: none; padding: 0; border: 0;
  background: var(--white); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.tour-modal[open] { display: flex; flex-direction: column; }
.tour-modal::backdrop { background: rgba(28, 49, 68, 0.6); }
.tour-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 28px 18px; background: var(--cream); border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.tour-modal-head h2 { margin-top: 6px; font-size: clamp(24px, 3vw, 32px); }
.tour-modal-sub { margin-top: 6px; font-size: 16px; }
.tour-modal-close {
  flex: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  font-size: 34px; line-height: 1; color: var(--navy);
}
.tour-modal-close:hover { color: var(--red); }
.tour-modal-body { flex: 1; min-height: 0; }
.tour-modal-frame { display: block; width: 100%; height: 100%; border: 0; }
body.modal-open { overflow: hidden; }
@media (max-width: 640px) {
  .tour-modal { width: 100vw; height: 100dvh; }
  .tour-modal-head { padding: 16px 18px 14px; }
  .tour-modal-sub { display: none; }
}
