:root {
  --color-bg: #f6f2e9;
  --color-surface: #fffdf8;
  --color-soft: #ece6d7;
  --color-text: #1b241f;
  --color-muted: #66706a;
  --color-primary: #315845;
  --color-primary-dark: #17382a;
  --color-accent: #c8945d;
  --color-border: rgba(27, 36, 31, 0.12);

  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", Arial, sans-serif;

  --container: 1180px;
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 36px;

  --section-space: clamp(5rem, 8vw, 8rem);
  --shadow-soft: 0 20px 60px rgba(31, 48, 38, 0.08);

  --transition-fast: 180ms ease;
  --transition-normal: 320ms cubic-bezier(.2,.7,.2,1);
}

/* Theme hooks populated from config.js */
html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  padding: .75rem 1rem;
  background: #fff;
  border-radius: 999px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 233, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.nav-wrap {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  letter-spacing: -.03em;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: .98rem;
}

.brand-copy small {
  margin-top: .25rem;
  color: var(--color-muted);
  font-size: .76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav > a:not(.button) {
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  position: relative;
}

.site-nav > a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -.35rem;
  height: 1px;
  background: currentColor;
  transition: right var(--transition-fast);
}

.site-nav > a:not(.button):hover::after,
.site-nav > a:not(.button):focus-visible::after {
  right: 0;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
}

.menu-button span:not(.sr-only) {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px auto;
  transition: transform var(--transition-fast);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--color-primary);
  transition:
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.button:hover {
  transform: translateY(-2px);
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 10px 24px rgba(23, 56, 42, .15);
}

.button-small {
  min-height: 42px;
  padding-inline: 1rem;
  font-size: .9rem;
}

.button-ghost {
  background: transparent;
  color: var(--color-primary);
}

.text-link {
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: .25rem;
}

/* Hero */
.hero {
  padding: clamp(4rem, 8vw, 7rem) 0 var(--section-space);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(3rem, 6vw, 6rem);
}

.eyebrow {
  margin: 0 0 1rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 800;
  color: var(--color-primary);
}

.hero h1,
.section h2 {
  font-family: var(--font-heading);
  letter-spacing: -.04em;
  line-height: .98;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7vw, 6.6rem);
  max-width: 10ch;
}

.hero-lead {
  max-width: 38rem;
  margin: 1.7rem 0 0;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: 2.2rem;
  color: var(--color-muted);
  font-size: .92rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 5px rgba(200, 148, 93, .14);
  flex: 0 0 auto;
}

.hero-visual {
  position: relative;
}

.image-panel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: var(--color-soft);
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 620px;
  object-fit: cover;
}

.image-card {
  position: absolute;
  left: 1.3rem;
  right: 1.3rem;
  bottom: 1.3rem;
  display: grid;
  gap: .15rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(12px);
}

.image-card-label {
  color: var(--color-primary);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.image-card strong {
  font-family: var(--font-heading);
  font-size: 1.25rem;
}

/* Sections */
.section {
  padding: var(--section-space) 0;
}

.section-soft {
  background: var(--color-surface);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 3rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
}

.section-heading > p:last-child,
.visit-copy > p:last-child,
.contact-wrap > p {
  max-width: 44rem;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.service-card {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-soft);
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.service-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1);
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 22, 16, .82), rgba(9, 22, 16, .06) 65%);
  z-index: -1;
}

.service-card:hover img {
  transform: scale(1.035);
}

.service-card-copy {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.4rem;
  color: white;
}

.service-card-copy span {
  display: inline-flex;
  margin-bottom: .7rem;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  opacity: .8;
}

.service-card h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.03em;
}

.service-card p {
  margin: .75rem 0 0;
  max-width: 33rem;
  color: rgba(255,255,255,.86);
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: start;
}

.large-copy {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  max-width: 36rem;
}

.split-copy > p:last-child {
  max-width: 36rem;
  color: var(--color-muted);
}

.values-panel {
  border-top: 1px solid var(--color-border);
}

.value-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.value-item > span {
  color: var(--color-accent);
  font-weight: 800;
}

.value-item strong {
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.value-item p {
  margin: .3rem 0 0;
  color: var(--color-muted);
}

.section-dark {
  background: var(--color-primary-dark);
  color: #fff;
}

.visit-grid {
  display: grid;
  grid-template-columns: 1fr .95fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.eyebrow-light {
  color: #d9b887;
}

.section-dark .visit-copy > p:last-child {
  color: rgba(255,255,255,.7);
}

.visit-card {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.visit-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.visit-row:last-child {
  border-bottom: 0;
}

.visit-row span {
  color: rgba(255,255,255,.58);
}

.visit-row strong {
  font-weight: 600;
}

.contact-section {
  text-align: center;
}

.contact-wrap {
  max-width: 860px;
}

.contact-wrap > p {
  margin-inline: auto;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: start;
}

.footer-grid p {
  color: var(--color-muted);
  margin: .4rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-muted);
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 650ms cubic-bezier(.2,.7,.2,1),
    transform 650ms cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .split-layout,
  .visit-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-copy {
    max-width: 720px;
  }

  .image-panel,
  .image-panel img {
    min-height: 520px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    position: relative;
  }

  .brand-copy small {
    display: none;
  }

  .menu-button {
    display: block;
    position: relative;
    z-index: 202;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
  }

  /*
    Simple mobile dropdown:
    - anchored directly under the header
    - content-sized
    - no full-screen overlay
    - no internal scrolling
    - grows naturally if links are added
  */
  .site-nav {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    left: auto;

    width: min(320px, calc(100vw - 2rem));
    padding: .65rem;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(23, 56, 42, .14);

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .15rem;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.985);
    transform-origin: top right;

    transition:
      opacity var(--transition-fast),
      transform var(--transition-fast),
      visibility 0s linear var(--transition-fast);

    z-index: 201;
  }

  .site-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }

  .site-nav > a:not(.button) {
    display: block;
    width: 100%;
    padding: .9rem 1rem;

    border-radius: 12px;
    text-decoration: none;
    font-size: 1.05rem !important;
    line-height: 1.2;
  }

  .site-nav > a:not(.button):hover,
  .site-nav > a:not(.button):focus-visible {
    background: var(--color-soft);
  }

  .site-nav > a:not(.button)::after {
    display: none;
  }

  .site-nav .button {
    width: 100%;
    margin-top: .35rem;
    min-height: 46px;
  }

  .menu-button[aria-expanded="true"] span:nth-of-type(2) {
    transform: translateY(3.5px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:nth-of-type(3) {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero h1 {
    max-width: 9ch;
  }

  .image-panel,
  .image-panel img {
    min-height: 430px;
  }

  .image-card {
    left: .9rem;
    right: .9rem;
    bottom: .9rem;
  }

  .service-card {
    min-height: 360px;
  }

  .visit-row {
    grid-template-columns: 1fr;
    gap: .2rem;
  }

  .footer-grid,
  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(calc(100% - 1.2rem), var(--container));
  }

  .nav-wrap {
    min-height: 74px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .hero-actions .text-link {
    width: 100%;
    text-align: center;
  }

  .contact-actions {
    flex-direction: column;
  }
}
