:root {
  --color-primary: #234a3c;
  --color-primary-strong: #18362c;
  --color-accent: #c79343;
  --color-ink: #24312d;
  --color-muted: #66716d;
  --color-surface: #ffffff;
  --color-soft: #f4f5f1;
  --color-dark: #1e2a26;
  --color-border: #dfe4df;
  --radius: 18px;
  --shadow: 0 16px 45px rgba(26, 47, 39, .10);
  --shell: 1180px;
  --text-width: 760px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-surface);
  font: 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-strong); }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }
.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; left: 12px; top: -60px; z-index: 9999; padding: 10px 14px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(0,0,0,.06); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--color-ink); text-decoration: none; font-weight: 750; line-height: 1.15; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--color-primary); color: white; font-size: 12px; letter-spacing: .05em; }
.brand-text { max-width: 230px; }
.primary-nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 13px 11px; color: var(--color-ink); text-decoration: none; font-weight: 650; font-size: 15px; border-radius: 8px; }
.nav-item > a:hover { background: var(--color-soft); }
.nav-submenu { display: none; position: absolute; top: calc(100% - 2px); left: 0; width: 220px; padding: 8px; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow); }
.nav-item:hover .nav-submenu, .nav-item:focus-within .nav-submenu { display: grid; }
.nav-submenu a { padding: 9px 10px; text-decoration: none; color: var(--color-ink); border-radius: 7px; }
.nav-submenu a:hover { background: var(--color-soft); }
.nav-toggle { display: none; width: 46px; height: 42px; border: 1px solid var(--color-border); border-radius: 10px; background: #fff; padding: 9px; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; background: var(--color-ink); margin: 5px 0; }

.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #e9eee8, #f7f4ec); }
.hero.has-image { color: #fff; background-image: linear-gradient(rgba(12,27,22,var(--hero-overlay)), rgba(12,27,22,var(--hero-overlay))), var(--hero-image); background-size: cover; background-position: center; }
.hero-inner { min-height: clamp(430px, 62vw, 650px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-block: 80px; }
.hero-align-center .hero-inner { align-items: center; text-align: center; }
.hero h1 { max-width: 820px; margin: 0; font: 700 clamp(44px, 7vw, 78px)/1.02 var(--font-heading); letter-spacing: -.035em; }
.hero-lead { max-width: 720px; margin: 22px 0 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; }
.eyebrow { margin: 0 0 12px; color: var(--color-accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.hero.has-image .eyebrow { color: #f4d59e; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 999px; background: var(--color-primary); color: #fff; text-decoration: none; font-weight: 750; border: 2px solid var(--color-primary); }
.button:hover { background: var(--color-primary-strong); color: #fff; border-color: var(--color-primary-strong); }
.button-secondary { background: rgba(255,255,255,.94); border-color: rgba(255,255,255,.94); color: var(--color-primary); }
.button-secondary:hover { background: #fff; color: var(--color-primary-strong); border-color: #fff; }

.site-section { padding-block: 72px; }
.section-space-compact { padding-block: 40px; }
.section-space-normal { padding-block: 72px; }
.section-space-spacious { padding-block: 105px; }
.section-bg-default { background: var(--color-surface); }
.section-bg-light { background: var(--color-soft); }
.section-bg-dark { background: var(--color-dark); color: #fff; }
.section-bg-accent { background: #f3eadb; }
.section-width-standard .prose { max-width: var(--text-width); }
.section-width-wide .prose { max-width: 960px; }
.prose h1, .prose h2, .prose h3 { color: inherit; font-family: var(--font-heading); line-height: 1.12; letter-spacing: -.02em; }
.prose h1 { font-size: clamp(40px, 5vw, 62px); }
.prose h2 { margin: 0 0 22px; font-size: clamp(34px, 4vw, 48px); }
.prose h3 { font-size: 26px; }
.prose p { margin: 0 0 1.1em; }
.centered { margin-inline: auto; text-align: center; }
.section-heading { margin-bottom: 32px; }

.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(36px, 6vw, 78px); align-items: center; }
.split-image-right .split-media { order: 2; }
.split-media img, .image-placeholder { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.image-placeholder { display: grid; place-items: center; background: #dde4df; color: var(--color-muted); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.info-card { padding: 28px; border: 1px solid var(--color-border); background: #fff; border-radius: var(--radius); box-shadow: 0 8px 25px rgba(26,47,39,.05); }
.info-card h3 { margin: 8px 0 8px; font: 700 25px/1.2 var(--font-heading); }
.info-card p { margin: 0; color: var(--color-muted); }
.card-icon { font-size: 28px; }

.callout { max-width: 920px; margin-inline: auto; padding: clamp(28px, 5vw, 54px); border-radius: calc(var(--radius) + 6px); background: var(--color-primary); color: #fff; box-shadow: var(--shadow); text-align: center; }
.callout .button { background: #fff; border-color: #fff; color: var(--color-primary); }
.spacer-small { height: 24px; } .spacer-medium { height: 48px; } .spacer-large { height: 86px; }

.site-footer { padding-block: 45px; background: #17231f; color: rgba(255,255,255,.78); }
.site-footer a { color: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; }
.footer-grid p { margin: 5px 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 78px; left: 0; right: 0; padding: 12px 20px 24px; background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: 0 20px 30px rgba(0,0,0,.08); align-items: stretch; }
  .primary-nav.is-open { display: grid; }
  .nav-item > a { padding: 11px 5px; }
  .nav-submenu { position: static; display: grid; width: auto; padding: 0 0 8px 16px; box-shadow: none; border: 0; }
  .split { grid-template-columns: 1fr; }
  .split-image-right .split-media { order: 0; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .brand-text { font-size: 14px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  .hero-inner { min-height: 500px; padding-block: 58px; }
  .site-section { padding-block: 52px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { display: grid; }
}

/* CMS draft preview */
.draft-preview-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 8px 14px;
  background: #fff3cd;
  border-bottom: 1px solid #e7c75c;
  color: #5f4b00;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .01em;
}
.is-draft-preview .site-header { top: 35px; }

/* ===== Image + Gallery sections — Website Editor v0.3 ===== */
.single-image-figure { margin: 0 auto; max-width: 980px; }
.single-image-figure img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.single-image-landscape img { aspect-ratio: 16/9; object-fit: cover; }
.single-image-square { max-width: 760px; }
.single-image-square img { aspect-ratio: 1/1; object-fit: cover; }
.single-image-figure figcaption,
.gallery-grid-item figcaption,
.gallery-slide figcaption { margin-top: 10px; color: var(--color-muted); font-size: .92rem; line-height: 1.45; }
.section-bg-dark .single-image-figure figcaption,
.section-bg-dark .gallery-grid-item figcaption,
.section-bg-dark .gallery-slide figcaption { color: rgba(255,255,255,.76); }

.image-zoom-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; text-align: inherit; }
.image-zoom-button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; border-radius: var(--radius); }

.gallery-grid { display: grid; grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0,1fr)); gap: 18px; }
.gallery-grid-item { margin: 0; min-width: 0; }
.gallery-grid-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: calc(var(--radius) - 4px); box-shadow: 0 8px 25px rgba(26,47,39,.08); }

.gallery-carousel { position: relative; max-width: 1040px; margin-inline: auto; padding-bottom: 34px; }
.gallery-carousel-viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: #e9eeea; }
.gallery-carousel-track { display: flex; transition: transform .42s ease; will-change: transform; }
.gallery-slide { flex: 0 0 100%; margin: 0; min-width: 0; }
.gallery-slide img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.gallery-slide figcaption { padding: 0 14px 12px; background: #fff; margin-top: 0; padding-top: 10px; }
.section-bg-dark .gallery-slide figcaption { background: #24312d; }
.gallery-arrow {
  position: absolute;
  top: calc(50% - 26px);
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(20,30,26,.72);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(20,30,26,.9); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: center; gap: 8px; }
.gallery-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: #b8bfbb; cursor: pointer; }
.gallery-dots button.is-active { background: var(--color-primary); transform: scale(1.25); }
.gallery-empty { border: 1px dashed var(--color-border); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--color-muted); }

.site-image-dialog { width: min(94vw, 1200px); max-height: 94vh; padding: 0; border: 0; border-radius: 16px; background: #111; color: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.site-image-dialog::backdrop { background: rgba(0,0,0,.78); }
.image-dialog-body { padding: 16px; }
.image-dialog-body img { max-width: 100%; max-height: 78vh; margin: 0 auto; object-fit: contain; }
.image-dialog-caption { margin: 12px 8px 2px; text-align: center; color: rgba(255,255,255,.86); }
.image-dialog-close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 42px; height: 42px; border: 0; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }

@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-slide img { aspect-ratio: 4/3; }
  .gallery-arrow { width: 40px; height: 40px; font-size: 29px; }
  .gallery-prev { left: 8px; }
  .gallery-next { right: 8px; }
}
