*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: var(--font-display, system-ui, sans-serif);
  line-height: 1.2;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--color-primary-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; height: auto; display: block; }
.muted { color: var(--color-text-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--color-primary); color: #000; padding: .5rem 1rem;
  z-index: 100;
}
.skip-link:focus { top: 0; }

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; }
.section--soft { background: var(--color-surface); border-block: 1px solid var(--color-border); }
.section--narrow { max-width: 520px; }

/* Header / nav */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; gap: 1rem; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--color-text); }
.brand__logo { display: none; } /* Themes opt in */
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.brand__tag { font-size: .8rem; color: var(--color-text-muted); }
.primary-nav ul { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
.primary-nav a { color: var(--color-text); text-decoration: none; padding: .5rem .25rem; }
.primary-nav a[aria-current="page"] { color: var(--color-primary-dark); border-bottom: 2px solid var(--color-primary); }
.nav-cta { background: var(--color-primary); color: #000 !important; padding: .5rem 1rem !important; border-radius: var(--radius-pill); }
.nav-cta:hover { background: var(--color-primary-dark); color: #fff !important; }
.nav-secondary { color: var(--color-text-muted) !important; }
.nav-toggle { display: none; background: none; border: 1px solid var(--color-border); padding: .4rem .75rem; border-radius: 6px; cursor: pointer; font-size: 1.25rem; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .site-header__inner { flex-wrap: wrap; }
}

/* Hero */
.hero {
  background-size: cover; background-position: center;
  color: #fff; padding: 5rem 0;
}
.hero__inner { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.hero__title { color: #fff; margin-bottom: .25em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero__subtitle { font-size: 1.15rem; max-width: 50ch; text-shadow: 0 2px 12px rgba(0,0,0,.35); }

/* Buttons */
.btn {
  display: inline-block; padding: .75rem 1.25rem; border-radius: var(--radius-pill);
  font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.btn--primary { background: var(--color-primary); color: #1a1a1a; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: rgba(0,0,0,.05); }

/* Cards / grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  padding: 1.25rem; border-radius: 12px;
}
.card h3 { margin-top: 0; }

.callout {
  background: var(--color-surface); border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem; border-radius: 6px;
}

.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: start; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; }
.gallery-grid img { border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; }

/* Forms */
.form fieldset { border: none; padding: 0; margin: 0 0 1rem; }
.form legend { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-bottom: .75rem; }
.form__row { display: flex; flex-direction: column; gap: .25rem; margin-bottom: 1rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form input[type="password"],
.form textarea, .form select {
  font: inherit; padding: .65rem .75rem;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: #fff; color: var(--color-text);
}
.form input:focus, .form textarea:focus, .form select:focus {
  border-color: var(--color-primary); outline: 2px solid color-mix(in srgb, var(--color-primary) 50%, transparent);
}
.form--inline { display: flex; gap: .5rem; align-items: center; }
.form--inline input { flex: 1; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert--error { background: #FEE2E2; color: #7F1D1D; border: 1px solid #FCA5A5; }
.alert--success { background: #DCFCE7; color: #14532D; border: 1px solid #86EFAC; }

/* Cloudflare Turnstile spacing — keep the widget from crowding the submit button */
.cf-turnstile { margin: 1.25rem 0; min-height: 0; }
.cf-turnstile:empty { margin: 0; }

/* CTA banner */
.cta-banner { background: var(--color-primary); color: #1a1a1a; }
.cta-banner__inner { padding: 3rem 1.25rem; text-align: center; }
.cta-banner__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.cta-banner h2 { color: inherit; }

/* Footer */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); margin-top: 3rem; }
.site-footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; padding: 3rem 1.25rem 1rem;
}
.footer__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer__heading { font-size: 1rem; margin-bottom: .5rem; }
.footer__hours, .footer__social { list-style: none; padding: 0; margin: 0; }
.footer__hours li { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
.site-footer__base { padding: 1rem 1.25rem 2rem; color: var(--color-text-muted); }

/* Prose blocks */
.prose { max-width: 70ch; }
.prose h2, .prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose blockquote {
  margin: 1em 0; padding: .5em 1em;
  border-left: 4px solid var(--color-primary);
  color: var(--color-text-muted);
}

/* Map */
.map-embed { margin-top: 2rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); }

/* Blog */
.post-list { list-style: none; padding: 0; }
.post-list li { display: flex; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--color-border); }
.post-list time { color: var(--color-text-muted); min-width: 10ch; }

.link-arrow { font-weight: 700; text-decoration: none; }
.section-link { margin-top: 1.5rem; }
.map-embed iframe { border: 0; }

/* Admin */
.admin-header { display: flex; justify-content: space-between; align-items: center; }
.admin-logout { margin: 0; }
.admin-section { margin-top: 2.5rem; }
.admin-section h2 { margin-bottom: 1rem; }
.admin-row-actions { display: flex; gap: .75rem; align-items: center; white-space: nowrap; }
.admin-row-actions .inline-form { display: inline; margin: 0; }
.admin-row-actions .link-danger {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #B91C1C; text-decoration: underline; font: inherit;
}
.admin-row-actions .link-danger:hover { color: #7F1D1D; }
.admin-cancel { margin-left: 1rem; }
.form__hint { font-size: .85rem; margin: .25rem 0 0; }
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.admin-gallery-item { display: flex; flex-direction: column; gap: .5rem; align-items: center; margin: 0; }
.admin-gallery-item img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border: 1px solid var(--color-border); border-radius: 6px;
}
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .5rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; padding: .25rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: .5rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.data-table pre { white-space: pre-wrap; word-break: break-word; margin: 0; font-size: .85rem; }

.plain { list-style: none; padding: 0; }
.plain li { padding: .15rem 0; }
