:root {
  --navy: #033466;
  --navy-deep: #02264b;
  --ink: #16202b;
  --muted: #55606d;
  --paper: #fbfaf7;
  --tint: #f1eee7;
  --line: #ddd8cc;
  --accent: #c8501e;
  --accent-deep: #a63f14;
  --ok: #1d7a4f;
  --white: #fff;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
}

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

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); color: var(--navy); }
h3 { font-size: 1.3rem; color: var(--navy); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-deep); margin: 0 0 10px;
}

.fineprint { font-size: 0.88rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-small { min-height: 40px; padding: 6px 18px; font-size: 0.95rem; }
.btn-block { display: flex; width: 100%; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: var(--accent-deep); color: var(--white); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); color: var(--white); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--tint); color: var(--navy); }

.stack { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.book-card .stack { align-items: stretch; margin-top: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,247,.96); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font: 600 1.25rem/1 var(--serif); white-space: nowrap; }
.brand-light { font-weight: 400; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--accent-deep); }
.site-nav .nav-phone { font-weight: 700; color: var(--navy); white-space: nowrap; }
.nav-toggle { display: none; }

/* Hero */
.hero { background: var(--navy); color: var(--white); padding: 64px 0; }
.hero h1 { color: var(--white); }
.hero .eyebrow { color: #f3b48f; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 48px; align-items: center; }
.hero-equation {
  display: flex; flex-wrap: wrap; align-items: center; gap: .15em .5em;
  margin: 24px 0 0;
  font: italic 400 clamp(1.25rem, 2.5vw, 1.7rem)/1.25 var(--serif); color: #f3b48f;
}
.hero-equation .equation-mark {
  display: inline-grid; place-items: center; flex: none; width: 1.7em; height: 1.7em;
  border: 1px solid rgba(243,180,143,.55); border-radius: 50%;
  color: var(--white); font: normal 600 .8em/1 var(--sans);
}
.lead { font-size: 1.2rem; max-width: 34em; margin: 20px 0 28px; color: #dbe5f0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.visit-card { background: var(--navy-deep); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 24px; }
.visit-card .status { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.16); }
.visit-card .status::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #9fb3c8; }
.visit-card .status.is-open::before { background: #58d394; }
.visit-card dl { margin: 0 0 20px; display: grid; gap: 14px; }
.visit-card dt { font-size: 0.75rem; letter-spacing: .1em; text-transform: uppercase; color: #9fb3c8; }
.visit-card dd { margin: 2px 0 0; }
.visit-card a:not(.btn) { color: var(--white); font-weight: 700; }

/* Sections */
.section { padding: 80px 0; }
.section-tint { background: var(--tint); }
.section-intro { max-width: 40em; margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

/* Creed */
.creed-band { background: var(--navy-deep); border-top: 1px solid rgba(255,255,255,.12); }
.services-head { max-width: 760px; }
.creed {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center;
  list-style: none; margin: 0; padding: 20px 0; font-family: var(--serif); line-height: 1.3; color: var(--white);
}
.creed li { padding: 4px 12px; text-align: center; font-size: clamp(1.05rem, 2vw, 1.4rem); }
.creed li + li { border-left: 1px solid rgba(255,255,255,.18); }
.creed b { font-weight: 600; letter-spacing: -0.01em; }
.creed span { font-style: italic; color: #f3b48f; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.pillar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.pillar-feature { border-color: var(--navy); box-shadow: inset 0 4px 0 var(--navy); }
.pillar-num { display: block; font: 600 0.95rem/1 var(--serif); color: var(--accent-deep); margin-bottom: 12px; }
.pillar h3 { margin-bottom: 10px; }
.pillar p { font-size: 0.98rem; }
.pillar ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; color: var(--muted); }
.pillar-label { margin: 0 0 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.pillar ul.chips { padding: 0; }
.chips li { margin: 0; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; font-weight: 600; color: var(--navy); background: var(--paper); }
.pillar li { margin-bottom: 4px; }
.pillar > .pillar-label { color: var(--accent-deep); }
.tech-portal { display: flex; flex-direction: column; align-items: flex-start; }
.tech-portal .btn { margin-top: auto; }
.pillar-foot { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Conditions */
.section-dark { background: var(--navy); color: #dbe5f0; }
.section-dark h2 { color: var(--white); }
.section-dark .eyebrow { color: #f3b48f; }
.section-dark .section-intro { color: #dbe5f0; }
.conditions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 36px; align-items: start; }
.condition-group { background: var(--navy-deep); border: 1px solid rgba(255,255,255,.16); border-radius: var(--radius); padding: 26px 22px 10px; }
.condition-group h3 { color: var(--white); }
.group-note { margin: 6px 0 0; font: italic 0.98rem/1.4 var(--serif); color: #9fb3c8; }
.condition-group .chips { margin: 18px 0 16px; }
.condition-group .chips li { border-color: rgba(255,255,255,.28); background: transparent; color: var(--white); }
.condition-group > p:last-child { font-size: 0.95rem; }
.family-care { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px 40px; padding-bottom: 26px; }
.family-care .chips { margin-bottom: 0; }
.family-copy p { font-size: 0.95rem; }
.family-copy p:last-child { margin-bottom: 0; }
.conditions-note { margin: 28px 0 0; max-width: 46em; font-size: 0.92rem; color: #9fb3c8; }

/* Booking */
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; max-width: 760px; }
.book-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.book-card h3 { margin-bottom: 8px; }
.book-card p { color: var(--muted); font-size: 0.98rem; }

.notice-dialog {
  width: min(460px, calc(100vw - 32px)); padding: 28px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.notice-dialog::backdrop { background: rgba(2, 24, 45, .72); }
.notice-dialog h3 { font-size: 1.5rem; margin: 0 44px 12px 0; }
.notice-dialog .stack { align-items: stretch; margin-top: 20px; }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--paper);
  color: var(--navy); font: 400 1.6rem/1 var(--sans); cursor: pointer;
}
.dialog-close:hover { background: var(--tint); }

/* Visit */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; margin-top: 28px; }
address { font-style: normal; font-size: 1.15rem; line-height: 1.5; margin-bottom: 24px; }
.visit-details h3 { margin-bottom: 8px; }
.landmarks { margin: 0 0 22px; padding-left: 1.1em; color: var(--muted); }
.map iframe { width: 100%; height: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); display: block; }

.hours { margin-top: 36px; }
.hours table { width: 100%; max-width: 360px; border-collapse: collapse; margin: 8px 0 10px; }
.hours th, .hours td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours .closed { color: var(--muted); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--navy); }

/* Fees */
.fees-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.ticks { list-style: none; margin: 20px 0; padding: 0; }
.ticks li { position: relative; padding: 8px 0 8px 30px; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.family { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.family h3 { margin-bottom: 8px; }
.family img { margin-top: 16px; border-radius: 6px; }

/* Team */
.lead-person { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; max-width: 820px; }
.lead-person img, .staff img { border-radius: var(--radius); background: var(--tint); }
.role { color: var(--muted); font-size: 0.95rem; margin-bottom: 12px; }
.staff { list-style: none; display: flex; flex-wrap: wrap; gap: 28px; margin: 40px 0 0; padding: 32px 0 0; border-top: 1px solid var(--line); }
.staff li { width: 150px; }
.staff img { width: 110px; margin-bottom: 12px; }
.staff h3 { font-size: 1.05rem; }
.staff .role { margin: 4px 0 0; }

/* FAQ */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 24px; border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 18px 34px 18px 0; position: relative; list-style: none; font: 600 1.12rem/1.3 var(--serif); color: var(--navy); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.6rem/1 var(--sans); color: var(--accent-deep); }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 18px; max-width: 42em; }

/* Footer */
.site-footer { background: var(--navy-deep); color: #c9d6e4; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer a { color: var(--white); }
.site-footer h2 { font: 700 0.78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #9fb3c8; margin-bottom: 12px; }
.site-footer p { margin-bottom: 6px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font: 600 1.2rem/1 var(--serif); color: var(--white); margin-bottom: 12px; }
.copyright { margin: 40px 0 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 0.85rem; color: #9fb3c8; }

/* Mobile quick actions */
.action-bar { display: none; }

/* keep the desktop menu on one line */
@media (min-width: 1001px) {
  .site-nav { gap: 16px; }
  .site-nav a { white-space: nowrap; }
}
@media (max-width: 1140px) {
  .site-nav .nav-phone { display: none; }
}

@media (max-width: 1000px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav { gap: 14px; }
  .site-nav a:not(.btn) { font-size: 0.9rem; }
  .site-nav .nav-phone { display: none; }
}

@media (max-width: 860px) {
  body { padding-bottom: 64px; }
  html { scroll-padding-top: 72px; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0; }
  .hero-grid, .visit-grid, .fees-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .conditions { grid-template-columns: minmax(0, 1fr); }
  .family-care { grid-template-columns: minmax(0, 1fr); }
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .map iframe { min-height: 320px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; content: ""; position: relative;
  }
  .nav-toggle-bars::before { position: absolute; top: -7px; }
  .nav-toggle-bars::after { position: absolute; top: 7px; }

  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .site-nav .nav-phone { display: block; }
  .site-nav .btn { margin-top: 16px; }

  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.2fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--white); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .action-bar a { display: flex; align-items: center; justify-content: center; min-height: 56px; font-weight: 700; text-decoration: none; color: var(--navy); border-right: 1px solid var(--line); }
  .action-bar .action-primary { background: var(--accent); color: var(--white); border-right: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .lead-person { grid-template-columns: minmax(0, 1fr); }
  .lead-person img { width: 130px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .staff { gap: 20px; }
  .staff li { width: calc(50% - 10px); }
  .creed { padding: 16px 0; }
  .creed li { padding: 2px 6px; font-size: 1rem; }
  .creed b { display: block; }
}

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

@media print {
  .site-header, .action-bar, .map, .hero-actions, .notice-dialog { display: none; }
  .hero { background: none; color: #000; }
  .hero h1 { color: #000; }
  .creed-band { background: none; }
  .creed, .creed span, .hero-equation, .hero-equation .equation-mark { color: #000; }
}
