:root {
  --ink: #16283F;
  --ink-deep: #0E1B2C;
  --brass: #C79A46;
  --brass-light: #E3C284;
  --paper: #F7F4EE;
  --paper-2: #EFEAE0;
  --charcoal: #22262B;
  --sage: #5C7A6E;
  --line: rgba(255,255,255,0.14);
  --line-dark: rgba(22,40,63,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Work Sans', sans-serif;
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.5;
}
h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* NAV */
nav {
  background: var(--ink);
  color: #fff;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px; max-width: 1180px; margin: 0 auto;
}
.nav-name {
  font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 500; color: #fff;
}
.nav-name span { color: var(--brass-light); }
.nav-links { display: flex; gap: 34px; font-size: 0.92rem; }
.nav-links a { opacity: 0.82; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-phone {
  border: 1px solid rgba(255,255,255,0.3); padding: 8px 18px; border-radius: 2px; font-size: 0.88rem;
}

/* HERO */
.hero {
  background: var(--ink);
  background-image: radial-gradient(ellipse at 78% 30%, rgba(199,154,70,0.16), transparent 55%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 88px 40px 100px;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px;
}
.hero-eyebrow {
  font-size: 0.98rem; color: var(--brass-light); margin-bottom: 22px; font-weight: 500;
}
.hero h1 {
  font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  color: #fff;
  max-width: 9.5ch;
}
.hero h1 em { font-style: italic; color: var(--brass-light); }
.hero p.lede {
  font-size: 1.12rem; color: rgba(255,255,255,0.78); max-width: 46ch; margin-top: 22px;
}
.hero-cta { display: flex; gap: 16px; margin-top: 36px; }
.btn {
  display: inline-block; padding: 14px 26px; font-size: 0.94rem; font-weight: 600;
  border-radius: 2px; transition: transform .15s ease, background .15s ease;
}
button.btn { border: none; font-family: inherit; line-height: inherit; cursor: pointer; }
.btn-primary { background: var(--brass); color: var(--ink-deep); }
.btn-primary:hover { background: var(--brass-light); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.hero-photo {
  display: flex;
  flex-direction: column;
  align-self: center;
  justify-self: start;
  width: 100%;
  max-width: 400px;
}
.hero-photo img {
  width: 100%; max-width: 400px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 4px 4px 0 0;
  filter: saturate(1.03);
}
.hero-photo .tag {
  background: var(--paper); color: var(--ink);
  padding: 14px 20px; font-size: 0.86rem; font-weight: 600;
  border-left: 3px solid var(--brass);
  border-radius: 0 0 4px 4px;
}

/* CREDENTIALS STRIP */
.credentials {
  background: var(--ink-deep); color: #fff;
  border-top: 1px solid var(--line);
}
.credentials-inner {
  max-width: 1180px; margin: 0 auto; padding: 30px 40px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.credentials-inner div { border-left: 1px solid var(--line); padding-left: 20px; }
.credentials-inner .num {
  font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--brass-light); display: block;
}
.credentials-inner .label { font-size: 0.86rem; color: rgba(255,255,255,0.68); margin-top: 4px; }

/* SECTION SHARED */
section { padding: 96px 0; }
.section-head { max-width: 60ch; margin-bottom: 52px; }
.section-head h2 { font-size: 2.1rem; color: var(--ink); }
.section-head p { margin-top: 14px; color: #55605c; font-size: 1.02rem; }

/* ABOUT / STORY */
.story { background: var(--paper); }
.story-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: start;
}
.story-grid p { font-size: 1.06rem; color: #3c4340; margin-bottom: 18px; max-width: 54ch; }
.story-grid p:first-child { font-family: 'Fraunces', serif; font-size: 1.3rem; color: var(--ink); line-height: 1.4; }
.story-facts { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line-dark); }
.story-facts div { padding: 20px 0; border-bottom: 1px solid var(--line-dark); display: flex; justify-content: space-between; gap: 20px; }
.story-facts .yr { font-family: 'Fraunces', serif; color: var(--brass); font-size: 1.05rem; white-space: nowrap; }
.story-facts .desc { font-size: 0.95rem; color: #55605c; text-align: right; }

/* LISTINGS GRID (dynamic) */
.listings { background: var(--paper-2); }
.listings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px;
}
.listing-card {
  background: var(--ink);
  color: #fff;
  border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: box-shadow .15s ease;
}
.listing-card:hover { box-shadow: 0 0 0 1px var(--brass); }
.listing-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brass); }
.listing-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.1fr 0.9fr;
}
.listing-photo {
  background-size: cover; background-position: center;
  background-image: linear-gradient(0deg, rgba(14,27,44,0.55), rgba(14,27,44,0.05) 55%), url('../img/listing-placeholder.jpg');
  position: relative; min-height: 220px;
}
.listing-card.featured .listing-photo { min-height: 320px; }
.price-tag {
  position: absolute; bottom: 20px; left: 20px;
  background: var(--brass); color: var(--ink-deep);
  font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 600;
  padding: 8px 16px; border-radius: 2px;
}
.price-tag.reduced::after {
  content: "Price reduced";
  display: block; font-family: 'Work Sans', sans-serif; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px;
}
.listing-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.listing-card.featured .listing-body { padding: 36px; }
.status { color: var(--brass-light); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 8px; }
.listing-body h3 { font-size: 1.4rem; color: #fff; margin-bottom: 4px; }
.listing-card.featured .listing-body h3 { font-size: 1.8rem; }
.listing-body .loc { color: rgba(255,255,255,0.6); font-size: 0.92rem; margin-bottom: 18px; }
.listing-specs { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; font-size: 0.85rem; color: rgba(255,255,255,0.85); }
.listing-specs div strong { display: block; font-family: 'Fraunces', serif; font-size: 1.1rem; color: #fff; }
.listing-body .desc { font-size: 0.92rem; color: rgba(255,255,255,0.72); margin-bottom: 22px; flex: 1; }
.listings-loading, .listings-empty { color: #55605c; font-style: italic; }

/* TESTIMONIAL */
.testimonial { background: var(--paper); }
.testimonial-inner { max-width: 780px; margin: 0 auto; padding: 0 40px; text-align: center; }
.testimonial-inner blockquote {
  font-family: 'Fraunces', serif; font-size: 1.5rem; font-style: italic; color: var(--ink);
  line-height: 1.5; border-left: 3px solid var(--brass); padding-left: 24px; text-align: left;
}
.testimonial-inner cite { display: block; margin-top: 18px; font-style: normal; color: #55605c; font-size: 0.92rem; padding-left: 27px; }

/* PATHS */
.paths { background: var(--ink-deep); }
.paths .section-head { text-align: center; margin: 0 auto 52px; }
.paths-grid {
  max-width: 1180px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.path-card { background: var(--ink); padding: 36px; border-radius: 4px; }
.path-card h3 { color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.path-card p { color: rgba(255,255,255,0.72); font-size: 0.95rem; margin-bottom: 20px; }
.path-card .link { color: var(--brass-light); font-weight: 600; font-size: 0.92rem; }

/* ASSISTANT */
.assistant { background: var(--paper); }
.assistant-box {
  background: var(--paper-2); border-radius: 4px; padding: 44px;
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: center;
}
.assistant-left h3 { font-size: 1.5rem; color: var(--ink); margin-bottom: 12px; }
.assistant-left p { color: #55605c; font-size: 0.98rem; }
.assistant-right { display: flex; flex-direction: column; gap: 12px; }
.bubble { background: #fff; padding: 14px 18px; border-radius: 4px; font-size: 0.92rem; color: var(--charcoal); }
.bubble.q { background: var(--ink); color: #fff; align-self: flex-end; max-width: 85%; }

/* FOOTER */
footer { background: var(--ink-deep); color: rgba(255,255,255,0.7); padding: 60px 0 30px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 0 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-inner h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; font-family: 'Fraunces', serif; }
.footer-inner p, .footer-inner a { font-size: 0.9rem; display: block; margin-bottom: 8px; }
.footer-bottom { max-width: 1180px; margin: 40px auto 0; padding: 20px 40px 0; border-top: 1px solid var(--line); font-size: 0.8rem; }

@media (max-width: 900px) {
  .hero-inner, .story-grid, .listing-card.featured, .paths-grid, .assistant-box, .footer-inner {
    grid-template-columns: 1fr;
  }
  .credentials-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .wrap, .nav-inner, .hero-inner, .credentials-inner, .testimonial-inner, .paths-grid, .footer-inner { padding-left: 20px; padding-right: 20px; }
  .nav-links { display: none; }
  .listings-grid { grid-template-columns: 1fr; }
  .credentials-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  section { padding: 56px 0; }
}

/* CHAT WIDGET */
.chatw { position: fixed; bottom: 24px; right: 24px; z-index: 1000; font-family: 'Work Sans', sans-serif; }
.chatw-toggle {
  width: 60px; height: 60px; border-radius: 50%; border: none;
  background: var(--brass); color: var(--ink-deep); font-size: 1.6rem;
  cursor: pointer; box-shadow: 0 8px 24px rgba(14,27,44,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.chatw-toggle:hover { background: var(--brass-light); transform: scale(1.05); }
.chatw-toggle.is-open { background: var(--ink); color: #fff; }
.chatw-panel {
  position: absolute; bottom: 76px; right: 0;
  width: 340px; max-width: calc(100vw - 48px);
  background: var(--paper); border-radius: 8px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(14,27,44,0.28);
  display: flex; flex-direction: column;
  max-height: min(480px, calc(100vh - 110px));
  max-height: min(480px, calc(100dvh - 110px));
}
.chatw-panel[hidden] { display: none; }
.chatw-header {
  background: var(--ink); color: #fff; padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.chatw-title { font-family: 'Fraunces', serif; font-size: 1rem; }
.chatw-subtitle { font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-top: 2px; }
.chatw-close { background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0; }
.chatw-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chatw-bubble { padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; line-height: 1.4; max-width: 85%; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
.chatw-bubble-assistant { background: var(--paper-2); color: var(--charcoal); align-self: flex-start; border-bottom-left-radius: 2px; }
.chatw-bubble-user { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chatw-thinking { opacity: 0.6; font-style: italic; }
.chatw-form { display: flex; border-top: 1px solid var(--line-dark); padding: 10px; gap: 8px; }
.chatw-input { flex: 1; border: 1px solid var(--line-dark); border-radius: 20px; padding: 10px 14px; font-size: 0.88rem; font-family: inherit; }
.chatw-input:focus { outline: none; border-color: var(--brass); }
.chatw-send { background: var(--brass); color: var(--ink-deep); border: none; border-radius: 20px; padding: 10px 18px; font-weight: 600; font-size: 0.85rem; cursor: pointer; }
.chatw-send:hover { background: var(--brass-light); }

@media (max-width: 480px) {
  .chatw-panel { width: calc(100vw - 32px); right: -8px; }
}

/* Testimonial rotator + path CTA buttons */
.testimonial-inner blockquote, .testimonial-inner cite { transition: opacity .2s ease; }
.testimonial-dots { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.testimonial-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--line-dark); cursor: pointer; padding: 0; }
.testimonial-dot.is-active { background: var(--brass); }
.testimonial-dot:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--brass); }
button.link { background: none; border: none; font-family: inherit; cursor: pointer; padding: 0; }
