html { scroll-behavior: smooth; }
body {
  background: #F4EFE8;
  color: #1F1B17;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero gradient placeholder */
.hero-bg {
  background:
    linear-gradient(180deg, rgba(31,27,23,0) 0%, rgba(31,27,23,.55) 70%, rgba(31,27,23,.85) 100%),
    linear-gradient(135deg, #c9a282 0%, #8b6f5c 35%, #3e5c4b 70%, #1f1b17 100%);
}

/* Img placeholder block — used everywhere a real photo will go */
.img-slot {
  position: relative;
  background:
    linear-gradient(135deg, rgba(161,74,42,.08), rgba(62,92,75,.10)),
    repeating-linear-gradient(45deg, #ece5da 0 14px, #e3dccf 14px 28px);
  overflow: hidden;
}
.img-slot::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: .05em;
  color: rgba(31,27,23,.55);
  text-transform: uppercase;
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-slot:has(img)::after { display: none; }

/* Pill bar */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .01em;
  transition: all .2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: #A14A2A; color: #fff; }
.btn-primary:hover { background: #8A3E22; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-secondary:hover { background: #fff; color: #1F1B17; }
.btn-dark { background: #1F1B17; color: #F4EFE8; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: #1F1B17; border-color: #1F1B17; }
.btn-outline:hover { background: #1F1B17; color: #F4EFE8; }

/* Card */
.card {
  background: #fff;
  border: 1px solid #D9D2C7;
  border-radius: 10px;
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: #A14A2A;
  box-shadow: 0 1px 0 #D9D2C7, 0 12px 32px -16px rgba(31,27,23,.18);
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #A14A2A;
}

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -.01em; }

/* Before / after slider */
.compare {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  user-select: none;
  aspect-ratio: 4/3;
}
.compare .layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.compare .after-layer {
  clip-path: inset(0 0 0 50%);
}
.compare .handle {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: #fff; transform: translateX(-1px);
  pointer-events: none;
  z-index: 5;
}
.compare .handle::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.compare .handle::after {
  content: '⇆';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #1F1B17; font-size: 16px; font-weight: 700;
}
.compare .tag {
  position: absolute;
  top: 14px;
  padding: 6px 12px;
  background: rgba(31,27,23,.78);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  z-index: 10;
  pointer-events: none;
}
.compare .tag-before { left: 14px; }
.compare .tag-after { right: 14px; }

/* Render watermark */
.render-mark {
  position: absolute;
  bottom: 12px; right: 12px;
  padding: 6px 10px;
  background: rgba(255,255,255,.85);
  color: #1F1B17;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 3px;
}

/* FAQ */
details.faq-item {
  border-bottom: 1px solid #D9D2C7;
  padding: 22px 0;
}
details.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: #1F1B17;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary .icon { transition: transform .2s; flex-shrink: 0; }
details.faq-item[open] summary .icon { transform: rotate(45deg); }
details.faq-item .answer {
  margin-top: 14px;
  color: #4a4640;
  line-height: 1.7;
  max-width: 720px;
}

/* Tabs */
.tab-btn {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #D9D2C7;
  background: transparent;
  color: #1F1B17;
  cursor: pointer;
  transition: all .2s;
}
.tab-btn.active { background: #1F1B17; color: #F4EFE8; border-color: #1F1B17; }

/* Map placeholder */
.map-bg {
  background:
    radial-gradient(circle at 50% 50%, rgba(161,74,42,.18), transparent 55%),
    repeating-linear-gradient(0deg, rgba(31,27,23,.05) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(31,27,23,.05) 0 1px, transparent 1px 80px),
    #efe9df;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,12,10,.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 4px; }
.lb-btn {
  position: absolute;
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.28); }
.lb-close { top: 20px; right: 20px; font-size: 20px; }
.lb-prev  { top: 50%; left: 20px;  transform: translateY(-50%); }
.lb-next  { top: 50%; right: 20px; transform: translateY(-50%); }
.lb-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; letter-spacing: .1em;
}

/* Form */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D9D2C7;
  border-radius: 6px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: #1F1B17;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #A14A2A;
}
label { display: block; font-size: 13px; font-weight: 500; color: #4a4640; margin-bottom: 6px; }

/* Nav */
.navbar {
  transition: background .25s, backdrop-filter .25s, border-color .25s;
}
.navbar.scrolled {
  background: rgba(244,239,232,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #D9D2C7;
}
.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .nav-brand { color: #fff; }
.navbar.scrolled .nav-link,
.navbar.scrolled .nav-brand { color: #1F1B17; }

/* Hamburger */
.navbar:not(.scrolled) #menu-btn { color: #fff; }
.navbar.scrolled #menu-btn       { color: #1F1B17; }
#mobile-menu.open { display: flex; }
body.menu-open { overflow: hidden; }

/* Floor plan rows */
.plan-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #D9D2C7;
  font-size: 14px;
}
.plan-row:last-child { border-bottom: 0; }
.plan-row .meters { font-family: 'JetBrains Mono', monospace; color: #8C8276; font-size: 13px; }

/* Floating CTA on mobile */
@media (max-width: 768px) {
  .floating-cta {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 50;
    box-shadow: 0 10px 30px rgba(31,27,23,.25);
  }
}
@media (min-width: 769px) {
  .floating-cta { display: none; }
}

/* Plan viewer */
.plan-viewer {
  position: fixed; inset: 0;
  background: rgba(10,8,6,.96);
  z-index: 200;
  display: none;
  flex-direction: column;
}
.plan-viewer.open { display: flex; }
.plan-container {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.plan-container.pv-grabbing { cursor: grabbing; }
#plan-viewer-img {
  position: absolute;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
  max-width: none;
}
.pv-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  line-height: 1;
}
.pv-btn:hover { background: rgba(255,255,255,.25); }
