:root {
  --radius: 0.5rem;
  /* Fallback hex values for older browsers */
  --background: #faf7f1;
  --foreground: #38312a;
  --card: #fdfbf7;
  --primary: #8a6a55;
  --primary-foreground: #fdfbf6;
  --secondary: #efe9df;
  --muted: #f2ede4;
  --muted-foreground: #7b7166;
  --accent: #e6d5c2;
  --border: #e5ddd2;
  --font-serif: "Cormorant Garamond", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-h: 4.5rem;
}

@supports (color: oklch(0.5 0.05 60)) {
  :root {
    --background: oklch(0.985 0.008 85);
    --foreground: oklch(0.28 0.02 60);
    --card: oklch(0.995 0.005 85);
    --primary: oklch(0.55 0.06 55);
    --primary-foreground: oklch(0.99 0.005 85);
    --secondary: oklch(0.94 0.02 80);
    --muted: oklch(0.95 0.015 80);
    --muted-foreground: oklch(0.5 0.02 60);
    --accent: oklch(0.88 0.05 75);
    --border: oklch(0.9 0.015 75);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  font-weight: 600;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
p, li, a { overflow-wrap: break-word; word-wrap: break-word; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
button { font: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-left: calc(1.5rem + env(safe-area-inset-left));
  padding-right: calc(1.5rem + env(safe-area-inset-right));
}
.section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .section { padding-top: 6rem; padding-bottom: 6rem; } }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.875rem; }
.mt { margin-top: 1rem; }
.eyebrow { font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted-foreground); }
.eyebrow.light { color: rgba(255,255,255,0.85); }
.eyebrow.on-primary { color: rgba(255,255,255,0.7); }

/* Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top);
}
.header-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  color: #fff;
}
.header-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0,0,0,.45);
  white-space: nowrap;
}

/* Hamburger */
.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  flex: 0 0 auto;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
  will-change: transform;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 768px) { .burger { display: none; } }

.nav { display: none; gap: 2rem; font-size: 0.875rem; }
.nav a:hover { opacity: 0.8; }
@media (min-width: 768px) { .nav { display: flex; } }

/* Mobile menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: calc(1rem + env(safe-area-inset-left));
  right: calc(1rem + env(safe-area-inset-right));
  max-width: 20rem;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -8px, 0);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  will-change: transform, opacity;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translate3d(0, 0, 0); }
.mobile-menu a {
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:active { background: var(--secondary); }
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-desktop { display: none; }
.hero-mobile { display: block; }
@media (min-width: 768px) { .hero-desktop { display: block; } .hero-mobile { display: none; } }
.hero-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.3) 45%, rgba(0,0,0,.6));
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 88vh;
  padding-top: calc(7rem + env(safe-area-inset-top));
  padding-bottom: 4rem;
  color: #fff;
}
@supports (min-height: 88svh) { .hero-content { min-height: 88svh; } }
.hero-content h1 {
  max-width: 48rem;
  margin-top: 1rem;
  font-size: clamp(2rem, 8vw, 4.5rem);
  line-height: 1.08;
  -webkit-hyphens: none;
  hyphens: none;
}
@media (min-width: 768px) { .hero-content h1 { font-size: clamp(3rem, 5.5vw, 4.5rem); } }
.hero-lead { margin-top: 1.25rem; max-width: 36rem; font-size: 1.05rem; color: rgba(255,255,255,.92); }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 44px;
  transition: background-color .2s, color .2s;
}
.btn-solid { background: #fff; color: #38312a; }
.btn-solid:hover { background: rgba(255,255,255,.9); }
.btn-outline { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }

/* Trust */
.trust { border-bottom: 1px solid var(--border); background: var(--secondary); }
.trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; text-align: center; }
@media (min-width: 768px) { .trust-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stat { font-family: var(--font-serif); font-size: 2.25rem; color: var(--primary); }
.stat-label { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* Services */
.section-head { max-width: 42rem; }
.section-head h2, .gallery-head h2, .about h2, .contact h2 { margin-top: 0.75rem; font-size: clamp(1.75rem, 5.5vw, 3rem); line-height: 1.15; }
.section-head .muted { margin-top: 1rem; }
.services-grid { margin-top: 3rem; display: grid; grid-template-columns: minmax(0,1fr); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.service { background: var(--card); padding: 2rem; transition: background-color .2s; }
.service:hover { background: var(--accent); }
.service-mark { display: block; margin-bottom: 1rem; height: 2rem; width: 2rem; border-radius: 2px; background: rgba(138,106,85,.12); box-shadow: inset 0 0 0 1px rgba(138,106,85,.3); }
.service h3 { font-size: 1.5rem; }
.service p { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.7; color: var(--muted-foreground); }

/* About */
.about { background: var(--secondary); }
.about-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 3rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(2, minmax(0,1fr)); align-items: center; padding-top: 6rem; padding-bottom: 6rem; } }
.checklist { margin-top: 2rem; list-style: none; font-size: 0.9rem; }
.checklist li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 6px; height: 6px; border-radius: 999px; background: var(--primary); }
.about-media { position: relative; }
.about-media img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); object-fit: cover; box-shadow: 0 10px 25px rgba(0,0,0,.12); }
.badge { display: none; position: absolute; bottom: -1.5rem; left: -1.5rem; width: 12rem; border-radius: var(--radius); background: var(--card); padding: 1.25rem; box-shadow: 0 20px 40px rgba(0,0,0,.15); border: 1px solid var(--border); }
@media (min-width: 768px) { .badge { display: block; } }
.badge-num { font-family: var(--font-serif); font-size: 1.875rem; color: var(--primary); }
.badge-text { font-size: 0.75rem; color: var(--muted-foreground); }

/* Gallery */
.gallery-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.gallery-head p { max-width: 24rem; }
.gallery-grid { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.75rem; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-top: 3rem; } }
.gallery-item { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: calc(var(--radius) - 2px); background: var(--muted); border: 0; padding: 0; cursor: pointer; }
@supports not (aspect-ratio: 1 / 1) {
  .gallery-item { height: 0; padding-bottom: 100%; }
  .gallery-item img { position: absolute; top: 0; left: 0; }
}
.gallery-item img { height: 100%; width: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.05); }

/* Contact */
.contact { background: var(--primary); color: #fff; }
.contact-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 2.5rem; padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(2, minmax(0,1fr)); padding-top: 6rem; padding-bottom: 6rem; } }
.contact-lead { margin-top: 1.5rem; max-width: 28rem; color: rgba(255,255,255,.85); }
.contact-info { display: grid; gap: 1.5rem; font-size: 0.875rem; }
.contact-label { color: rgba(255,255,255,.65); }
.contact-info a { display: inline-block; margin-top: 0.25rem; font-family: var(--font-serif); font-size: clamp(1.25rem, 5vw, 1.5rem); }
.contact-plain { margin-top: 0.25rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--background); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2rem; padding-bottom: calc(2rem + env(safe-area-inset-bottom)); font-size: 0.875rem; color: var(--muted-foreground); }

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(0,0,0,.92);
  opacity: 0;
  transition: opacity .3s ease;
}
.lightbox.is-visible { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(4.5rem + env(safe-area-inset-top)) 1rem calc(3rem + env(safe-area-inset-bottom));
}
.lb-slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}
.lb-close {
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top));
  right: calc(1rem + env(safe-area-inset-right));
  z-index: 10;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,.25); }
.lb-counter {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  text-align: center;
  color: rgba(255,255,255,.8);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  pointer-events: none;
}
