/* Minimal, warm, high-end palette */
:root {
  --ivory: #f7f4ef;
  --paper: #fdfcfa;
  --stone: #ece6dc;
  --sand: #d9cfc0;
  --accent: #4a6da6;       /* Coldwell Banker-style blue for small labels */
  --accent-deep: #1a3d8f;  /* navy blue, a touch lighter than Coldwell Banker navy */
  --accent-hover: #234aa3;
  --ink: #23262a;
  --charcoal: #2f3331;
  --muted: #6e6a64;
  --line: #ddd5c9;
  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.5rem); font-weight: 500; color: #15171b; font-variation-settings: "opsz" 24; }
h2 { font-weight: 500; font-variation-settings: "opsz" 24; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.75rem; }
em { font-style: italic; color: var(--accent-deep); }
::selection { background: var(--sand); }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.label {
  font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.6em;
}
.muted { color: var(--muted); }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 1.05em 2em;
  font: 500 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 2px;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--accent-deep); color: var(--ivory); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-light { background: var(--ivory); }
.btn-light { color: var(--accent-deep); }
.btn-light:hover { background: #fff; }
.btn-text { padding-inline: 0; color: var(--ink); letter-spacing: .08em; }
.btn-text span, .link span { transition: transform .3s var(--ease); display: inline-block; }
.btn-text:hover span, .link:hover span { transform: translateX(4px); }
.btn-block { width: 100%; }
.link {
  display: inline-flex; gap: .5em; align-items: center;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  padding-bottom: 4px; border-bottom: 1px solid var(--ink);
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,239,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { text-decoration: none; font-family: var(--serif); font-size: 1.4rem; letter-spacing: -.01em; line-height: 1; display: flex; flex-direction: column; gap: 6px; }
.brand small { font-family: var(--sans); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.brand sup { font-size: .6em; }
.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a { text-decoration: none; font-size: .78rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: currentColor; transition: right .35s var(--ease); }
.nav-links a:hover::after { right: 0; }
.nav-cta { padding: .85em 1.5em; border: 1px solid var(--ink); }
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--ivory); }
.nav-toggle { display: none; background: none; border: 0; padding: 12px 4px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .3s var(--ease); }

/* Hero */
.hero { padding: clamp(40px, 7vw, 90px) 0 clamp(70px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.hero h1 em { color: var(--accent-deep); }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--muted); max-width: 470px; margin: 1.6em 0 2.6em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.hero-media { position: relative; }
.hero-caption { display: flex; justify-content: space-between; margin-top: 14px; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* Image placeholders: soft, warm, architectural */
.media-placeholder {
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(160deg, #dfe5ee 0%, #bccadf 55%, #9fb2cf 100%);
}
.media-placeholder::before { /* arched doorway line */
  content: ""; position: absolute; inset: 14% 22% 0;
  border: 1px solid rgba(255,255,255,.55); border-bottom: 0;
  border-radius: 999px 999px 0 0;
}
.media-placeholder::after { /* subtle grain */
  content: ""; position: absolute; inset: 0; opacity: .18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mono { position: relative; z-index: 1; font-family: var(--serif); font-style: italic; font-size: clamp(3.5rem, 7vw, 5.5rem); color: rgba(255,255,255,.85); letter-spacing: .02em; }
.media-hero { aspect-ratio: 4 / 5; }
/* Real photos sit on top of the placeholder; if a file is missing the placeholder shows */
.media-placeholder > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }
.portrait-img { object-position: 50% 20%; }

/* Sections */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section-tint { background: var(--stone); }
.section-head { max-width: 640px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-sub { color: var(--muted); }

/* CTA */
.cta { background: var(--accent-deep); color: var(--ivory); padding: clamp(64px, 8vw, 100px) 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { margin: 0; max-width: 640px; }
.cta em { color: #c9d6ef; }
.cta .label { color: #a9bde3; margin-bottom: 1.2em; }

/* Contact */
.contact > *, .field-row > *, .chips { min-width: 0; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 120px); align-items: start; }
.contact-list { margin: 2.4em 0; border-top: 1px solid var(--line); }
.contact-list div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); padding-top: 4px; }
.contact-list dd { margin: 0; color: var(--muted); }
.contact-list a { color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-list a:hover { color: var(--accent-deep); }
.social { display: flex; flex-wrap: wrap; gap: 28px; }
.social a { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.social a:hover { border-color: var(--ink); }

.contact-form { background: var(--paper); border: 1px solid var(--line); padding: clamp(28px, 4.5vw, 56px); display: grid; gap: 28px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.field { display: grid; gap: 6px; }
.field > span, .chips legend { font-size: .68rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--sand);
  padding: 10px 0; width: 100%; min-width: 0; border-radius: 0; resize: vertical;
  transition: border-color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea::placeholder { color: #aaa49b; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 12px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: block; padding: .6em 1.15em; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--muted); transition: .25s var(--ease); }
.chips span:hover { border-color: var(--sand); color: var(--ink); }
.chips input:checked + span { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--ivory); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-note { font-size: .78rem; color: var(--muted); text-align: center; margin: -10px 0 0; }

/* Footer */
.footer { background: var(--accent-deep); color: #b9c4dc; padding: 72px 0 40px; font-size: .82rem; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 28px; }
.footer-name { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.02em; color: var(--ivory); line-height: 1; margin: 0; }
.footer .link { color: var(--ivory); border-color: rgba(255,255,255,.4); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { margin: 0; }

/* Listings (shown as a list of links) */
.listings-head { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.listings-head h2 { margin-bottom: 0; }
.listings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.listing {
  display: grid; grid-template-columns: 180px 1.3fr 1fr .7fr auto; gap: 28px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line);
  transition: padding .4s var(--ease);
}
.listing:hover { padding-left: 12px; }
.listing-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.listing-photo::before { inset: 18% 30% 0; }
.listing-photo img { transition: transform .6s var(--ease); }
.listing-photo:hover img { transform: scale(1.04); }
.listing-status { display: inline-block; font-size: .64rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.listing-address { font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: 0; font-weight: 400; line-height: 1.1; margin: 0; }
.listing-address a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s var(--ease); }
.listing-address a:hover { background-size: 100% 1px; }
.listing-city { color: var(--muted); font-size: .92rem; margin: 4px 0 0; }
.listing-mls { display: block; font-size: .72rem; letter-spacing: .08em; color: #9a958d; margin-top: 2px; }
.listing-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.listing-price { font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0; line-height: 1; margin: 0; }
.listing-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.link-muted { color: var(--muted); border-color: var(--line); }
button.link { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; cursor: pointer; font-family: inherit; padding: 0 0 4px; }
button.link:hover { color: var(--ink); border-color: var(--ink); }
.listing-map { grid-column: 1 / -1; margin-top: 6px; }
.listing-map iframe { display: block; width: 100%; height: 340px; border: 1px solid var(--line); background: var(--stone); }
.map-open { display: inline-block; margin-top: 10px; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); text-decoration: none; }
.map-open:hover { text-decoration: underline; }
.link-muted:hover { color: var(--ink); border-color: var(--ink); }
.listings-empty { border: 1px solid var(--line); background: var(--paper); padding: clamp(32px, 5vw, 56px); text-align: center; }
.listings-empty p { color: var(--muted); max-width: 560px; margin: 0 auto 1.6em; }

/* Form status */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: .88rem; text-align: center; margin: -8px 0 0; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: var(--accent-deep); font-weight: 500; }
.form-status.error { color: #9a4a3a; }
.btn:disabled { opacity: .6; cursor: progress; }

/* Mobile bar (phones only) */
.mobile-bar { display: none; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .listing { grid-template-columns: 160px 1.3fr 1fr auto; }
  .listing-actions { grid-column: 2 / -1; }
  .listing-actions { flex-direction: row; gap: 24px; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .nav-inner { height: 68px; }
  .brand { font-size: 1.2rem; }
  .brand small { font-size: .55rem; letter-spacing: .16em; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ivory); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .4s var(--ease);
  }
  .nav-links a { padding: 20px; text-align: center; border-top: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-cta { border: 0; border-top: 1px solid var(--line); }
  .nav.open .nav-links { max-height: 400px; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .hero-actions { gap: 20px; }
  .hero-actions .btn-primary { width: 100%; }
  .media-hero { aspect-ratio: 4 / 4.4; }

  .contact { grid-template-columns: 1fr; }
  .label { letter-spacing: .16em; }
  .hero .label { font-size: .64rem; }


  .listing { grid-template-columns: 1fr auto; gap: 14px 16px; padding: 24px 0; }
  .listing:hover { padding-left: 0; }
  .listing-photo { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
  .listing-main { grid-column: 1 / -1; }
  .listing-facts { grid-column: 1; }
  .listing-price { grid-column: 2; grid-row: 3; font-size: 1.3rem; }
  .listing-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 14px 24px; }
  .listing-map iframe { height: 260px; }

  .cta-inner { flex-direction: column; align-items: flex-start; }
  .cta .btn { width: 100%; }

  .field-row { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }

  .footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr 1.4fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(253,252,250,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    transform: translateY(110%); transition: transform .45s var(--ease);
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 6px; text-decoration: none;
    font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    border: 1px solid var(--line); color: var(--ink);
  }
  .mobile-bar a.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--ivory); }
}
