:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --cream: #f7f4ef;
  --sand: #e8e2d8;
  --gold: #b8955a;
  --gold-light: #d4b87a;
  --white: #ffffff;
  --muted: #6b6560;
  --overlay: rgba(8, 8, 8, 0.55);
  --max: 1280px;
  --header-h: 76px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --nav-link-size: 0.75rem;
  --nav-link-spacing: 0.12em;
  --logo-main-size: 1.28rem;
  --logo-sub-size: 0.6rem;
  --nav-cta-size: 0.72rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html.nav-open,
body.nav-open {
  overflow: hidden;
  height: 100%;
}

body.nav-open {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

body.nav-open .site-header,
body.nav-open .site-top {
  z-index: 100010;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

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

/* ── Header ── */
.site-top {
  position: relative;
  z-index: 100;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  transition: background 0.35s, box-shadow 0.35s;
}

.site-top.scrolled .site-header,
.site-header.scrolled,
.site-header {
  background: rgba(10, 10, 10, 0.94);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

@media (min-width: 961px) {
  .site-top,
  .site-top.scrolled {
    background: rgba(10, 10, 10, 0.94);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .site-top .site-header,
  .site-top.scrolled .site-header {
    background: transparent;
    box-shadow: none;
  }
}

.site-header .nav {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
  min-width: 0;
}

.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
}

.nav-shell {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-backdrop {
  position: fixed;
  inset: calc(var(--header-h) + var(--safe-top)) 0 0 0;
  z-index: 100008;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
  touch-action: none;
}

.nav-backdrop[hidden] {
  display: none !important;
}

.logo {
  display: flex;
  flex-direction: column;
  color: var(--white);
  line-height: 1.1;
}

.logo--wordmark {
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  flex-shrink: 0;
}

.logo--footer {
  margin-bottom: 1rem;
}

.logo-main {
  font-family: var(--serif);
  font-size: var(--logo-main-size);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.1;
}

.logo-sub {
  font-family: var(--sans);
  font-size: var(--logo-sub-size);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.nav-links li {
  flex: 0 0 auto;
}

.nav-links a {
  display: block;
  font-family: var(--sans);
  font-size: var(--nav-link-size);
  font-weight: 500;
  color: var(--white);
  letter-spacing: var(--nav-link-spacing);
  text-transform: uppercase;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  line-height: 1.2;
  opacity: 0.9;
  transition: opacity 0.2s, color 0.2s;
}

.nav-links a:hover { opacity: 1; color: var(--gold-light); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.8vw, 1rem);
  flex-shrink: 0;
}

.nav-cta .btn {
  padding: 0.7rem 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-live-chat {
  font-family: var(--sans);
  font-size: var(--nav-cta-size);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover { background: var(--ink-soft); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  margin: -10px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: transparent;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.25s, opacity 0.25s;
}

#navCheck:checked ~ .site-header .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#navCheck:checked ~ .site-header .nav-toggle span:nth-child(2) {
  opacity: 0;
}

#navCheck:checked ~ .site-header .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Cinematic Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide video,
.hero-slide .ken-burns {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide video { z-index: 2; }
.hero-slide .ken-burns { z-index: 1; }

.ken-burns {
  background-size: cover;
  background-position: center;
  animation: kenBurns 18s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.12) translate(-2%, -1%); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.5) 45%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--header-h) + var(--safe-top) + 3rem) 1.5rem 4rem;
  max-width: 920px;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-style: italic;
  opacity: 0.92;
  margin-bottom: 2rem;
}

.hero-location {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 2.5rem;
  min-height: 1.2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-indicators {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-dot {
  width: 36px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  cursor: pointer;
  transition: background 0.3s, width 0.3s;
}

.hero-dot.active {
  background: var(--gold);
  width: 52px;
}

/* ── County Search (Elliman-inspired) ── */
.county-search {
  padding: 5.5rem 0;
  background: var(--ink);
  color: var(--white);
}

.county-search .section-label {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.county-search h2 {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.county-search .lead {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
}

.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.county-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.county-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.county-card:hover img { transform: scale(1.06); }

.county-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.county-card h3 {
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.county-card p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

.county-card.featured {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* ── Sections ── */
section { padding: 5rem 0; }

.section-light { background: var(--white); }
.section-cream { background: var(--cream); }
.section-dark { background: var(--ink); color: var(--white); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-head .label {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  margin-bottom: 1rem;
}

.section-head p { color: var(--muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--sand);
  overflow: hidden;
}

.card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.card-body { padding: 1.5rem; }

.card-price {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
}

.card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
}

.pill {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  background: var(--cream);
  color: var(--ink);
}

/* ── Landmark Films ── */
.films {
  padding: 5rem 0;
  background: var(--ink-soft);
  color: var(--white);
}

.film-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.film-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.film-item video,
.film-item .film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-item video { z-index: 2; }

.film-poster {
  z-index: 1;
  background-size: cover;
  background-position: center;
  animation: kenBurns 14s ease-in-out infinite alternate;
}

.film-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.25rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
}

.film-caption h3 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.film-caption p {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-top: 0.2rem;
}

.film-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--white);
  padding: 0.35rem 0.6rem;
}

/* ── About / Services ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.split img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-header {
  text-align: left;
  max-width: none;
  margin: 0;
}

.about-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: stretch;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  height: 100%;
}

.about-content .agent-bio {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 961px) {
  .about-content .agent-bio {
    justify-content: space-between;
  }

  .about-content .agent-bio p {
    margin-bottom: 0;
  }

  .about-landmark img {
    aspect-ratio: unset;
    height: 100%;
    min-height: 0;
  }
}

.about-agent-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--sand);
}

.about-agent-photo {
  width: 180px;
  flex-shrink: 0;
}

.about-agent-photo .agent-headshot {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  max-height: 240px;
  border-radius: 6px;
  object-fit: cover;
  object-position: center 12%;
  border: 2px solid var(--gold);
  display: block;
  background: var(--white);
}

.about-agent-details {
  min-width: 0;
}

.about-agent-details h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.about-agent-contact {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.about-landmark {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.about-landmark img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 320px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  display: block;
  border: 1px solid var(--sand);
}

.about-landmark figcaption {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.about-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--sand);
}

.about-footer .stats {
  margin-top: 0;
}

.about-cta {
  margin-top: 2rem;
  align-self: flex-start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold);
}

.stat span {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--sand);
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-info p { margin-bottom: 0.75rem; }
.contact-info strong { color: var(--gold); }

/* ── Footer ── */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.5rem; font-size: 0.88rem; }
.footer-grid a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.social { display: flex; gap: 1rem; }
.social a { opacity: 0.7; font-size: 0.8rem; letter-spacing: 0.08em; }
.social a:hover { opacity: 1; color: var(--gold-light); }

/* ── TREC / Fathom disclaimer ── */
.trec-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  padding-top: 2rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.trec-disclaimer a { color: var(--gold-light); text-decoration: underline; }
.trec-title {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
}

.trec-links { margin-top: 1.25rem; }

.trec-agent { margin-top: 1rem; }
.trec-broker { margin-top: 0.75rem; }
.trec-eho, .trec-idx { margin-top: 0.75rem; font-size: 0.68rem; }

/* ── Agent profile (legacy / reusable) ── */
.agent-profile {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--sand);
}

.agent-headshot {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  background: var(--white);
}

.agent-profile h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.agent-title {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.agent-license {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.agent-bio {
  margin-bottom: 1.75rem;
}

.agent-bio p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.85;
}

.about-content .agent-bio p + p {
  margin-top: 0.75rem;
}

.agent-bio p:last-child {
  margin-bottom: 0;
}

.idx-page { padding-bottom: 4rem; min-height: 60vh; }

a.mls-client-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background: var(--gold);
  border: 1.5px solid var(--gold);
  padding: 0.78rem 1.5rem;
  box-shadow: 0 8px 24px rgba(184, 149, 90, 0.35);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

a.mls-client-link:hover,
a.mls-client-link:focus-visible {
  background: var(--gold-light);
  color: var(--white);
  border-color: var(--gold-light);
  box-shadow: 0 12px 30px rgba(184, 149, 90, 0.42);
  transform: translateY(-1px);
}

a.mls-client-link--search {
  margin-top: 0.85rem;
}

a.mls-client-link--hero {
  margin-top: -1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}


.idx-embed {
  width: 100%;
  min-height: min(900px, 82vh);
  background: var(--white);
  border: 1px solid var(--sand);
  box-shadow: 0 12px 40px rgba(10, 10, 10, 0.06);
  overflow: hidden;
}
.idx-embed iframe {
  display: block;
  width: 100%;
  min-height: min(900px, 82vh);
  height: 900px;
  border: 0;
}

.idx-feed-note {
  color: var(--ink-muted, #646970);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 1rem 0 0;
  text-align: center;
}

/* ── xRealty AI chat ── */
.xrealty-ai {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: auto;
  top: auto;
  z-index: 99999;
  font-family: var(--sans);
  pointer-events: none;
}

.xrealty-ai .xrealty-launcher,
.xrealty-ai .xrealty-panel {
  pointer-events: auto;
}

.xrealty-launcher {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  width: max-content;
  min-width: 13.75rem;
  max-width: calc(100vw - 2rem);
  height: auto;
  padding: 0;
  border: 1px solid rgba(184, 149, 90, 0.65);
  border-radius: 10px;
  background: rgba(247, 244, 239, 0.96);
  color: var(--ink);
  font-family: var(--sans);
  text-transform: none;
  font-variant: normal;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: visible;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
}

.xrealty-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  border-color: var(--gold-light);
}

.xrealty-launcher-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  padding: 0.72rem 1.2rem 0.68rem 1.15rem;
  text-align: left;
  flex: 1 1 auto;
  min-width: 11.5rem;
}

.xrealty-launcher-eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.2;
}

.xrealty-launcher-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.xrealty-launcher-title-open {
  display: none;
}

.xrealty-ai.is-open .xrealty-launcher {
  border-color: rgba(184, 149, 90, 0.75);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.xrealty-ai.is-open .xrealty-launcher:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}

.xrealty-ai.is-open .xrealty-launcher-eyebrow {
  display: none;
}

.xrealty-ai.is-open .xrealty-launcher-title-closed {
  display: none;
}

.xrealty-ai.is-open .xrealty-launcher-title-open {
  display: block;
}

.xrealty-ai.is-open .xrealty-launcher-copy {
  padding: 0.62rem 1.2rem 0.58rem 0.95rem;
}

#xrealtyLauncher {
  text-transform: none !important;
  font-variant: normal !important;
}

.xrealty-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  z-index: 1;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 6rem));
  display: none;
  flex-direction: column;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  border: 1px solid var(--sand);
  pointer-events: none;
  visibility: hidden;
}

.xrealty-ai.is-open .xrealty-panel {
  display: flex;
  pointer-events: auto;
  visibility: visible;
}

.xrealty-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--ink);
  color: var(--white);
}

.xrealty-header-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.xrealty-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.xrealty-header-text strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.xrealty-header-text > span {
  font-size: 0.72rem;
  opacity: 0.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.xrealty-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 0.15rem 0.35rem;
}

.xrealty-close:hover { opacity: 1; }

.xrealty-disclaimer-bar {
  padding: 0.6rem 0.75rem 0.7rem;
  background: #faf6ee;
  border-top: 1px solid var(--sand);
}

.xrealty-disclaimer-text {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
}

.xrealty-disclaimer-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.45rem;
  font-size: 0.68rem;
}

.xrealty-disclaimer-label {
  flex: 0 0 100%;
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.xrealty-disclaimer-contacts a {
  color: var(--gold);
  text-decoration: underline;
}

.xrealty-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 200px;
  max-height: 300px;
}

.xrealty-msg {
  max-width: 92%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.xrealty-msg--user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
  border-bottom-right-radius: 3px;
}

.xrealty-msg--assistant {
  align-self: flex-start;
  background: var(--cream);
  color: var(--ink);
  border: 1px solid var(--sand);
  border-bottom-left-radius: 3px;
}

.xrealty-msg--assistant p { margin: 0 0 0.5rem; }
.xrealty-msg--assistant p:last-child { margin-bottom: 0; }
.xrealty-msg--assistant a { color: var(--gold); text-decoration: underline; }

.xrealty-typing {
  font-style: italic;
  opacity: 0.7;
}

.xrealty-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.75rem 0.5rem;
}

.xrealty-prompts button {
  font-size: 0.68rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--sand);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.xrealty-prompts button:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.xrealty-prompts button.xrealty-prompt-live {
  border-color: var(--gold);
  color: var(--ink);
  background: #faf6ee;
  font-weight: 600;
}

.xrealty-prompts button.xrealty-prompt-live:hover {
  background: var(--gold);
  color: var(--white);
}

/* Email verification gate */
.xrealty-verify {
  padding: 0.75rem 0.9rem 0.9rem;
  border-top: 1px solid var(--sand);
  background: var(--cream);
}
.xrealty-verify-intro {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.75rem;
}
.xrealty-verify-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.45rem 0 0.25rem;
}
.xrealty-optional {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.xrealty-verify-input {
  width: 100%;
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--ink);
}
.xrealty-verify-input:focus {
  outline: none;
  border-color: var(--gold);
}
.xrealty-verify-code {
  letter-spacing: 0.35em;
  font-size: 1.15rem;
  text-align: center;
  font-weight: 600;
}
.xrealty-verify-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: var(--gold);
  color: var(--white);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.xrealty-verify-btn:hover { background: var(--gold-light); color: var(--ink); }
.xrealty-verify-btn:disabled { opacity: 0.6; cursor: wait; }
.xrealty-verify-link {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25rem;
}
.xrealty-verify-link:hover { color: var(--ink); }
.xrealty-verify-status {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.xrealty-verify-status.is-error { color: #8b2e2e; }
.xrealty-verify-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.xrealty-chat-unlocked[hidden],
.xrealty-verify[hidden] {
  display: none !important;
}

.xrealty-form {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--sand);
  background: var(--cream);
}

.xrealty-form.is-busy { opacity: 0.7; pointer-events: none; }

.xrealty-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.4;
  min-height: 38px;
  max-height: 100px;
  background: var(--white);
}

.xrealty-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.xrealty-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 8px;
  background: var(--gold);
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.xrealty-send:hover { background: var(--gold-light); color: var(--ink); }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Desktop header — keep all nav links on one line */
@media (min-width: 961px) {
  .site-top {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: calc(var(--header-h) + var(--safe-top));
    padding-top: var(--safe-top);
    display: flex;
    align-items: center;
    width: 100%;
    transition: background 0.35s, box-shadow 0.35s;
  }

  .site-header {
    position: static;
    height: auto;
    padding: 0;
    flex: 0 0 auto;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .nav-check,
  .nav-toggle {
    display: none !important;
  }

  .site-header .nav {
    width: auto;
    margin: 0;
    padding-left: max(0.625rem, var(--safe-left));
    gap: 0.6rem;
  }

  .site-header .nav > .logo--wordmark {
    flex: 0 0 auto;
  }

  .nav-shell {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    position: static;
    padding-right: max(0.625rem, var(--safe-right));
  }

  .nav-links {
    flex: 1 1 auto;
    justify-content: center;
    gap: 0.55rem;
    min-width: 0;
    overflow: visible;
  }

  .nav-cta {
    margin-left: auto;
    flex-shrink: 0;
  }

  .nav-links a {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  .logo-main {
    font-size: 1.12rem;
    letter-spacing: 0.14em;
  }

  .logo-sub {
    font-size: 0.55rem;
    letter-spacing: 0.24em;
  }

  .nav-cta .btn-live-chat {
    font-size: 0.68rem;
    padding: 0.62rem 1rem;
  }

}

@media (min-width: 1280px) {
  .site-header .nav,
  .nav-shell { gap: 0.85rem; }
  .nav-links { gap: 0.85rem; }
  .nav-links a {
    font-size: 0.73rem;
    letter-spacing: 0.11em;
  }
  .logo-main { font-size: 1.2rem; letter-spacing: 0.15em; }
  .logo-sub { font-size: 0.57rem; }
  .nav-cta .btn-live-chat {
    font-size: 0.7rem;
    padding: 0.68rem 1.15rem;
  }
}

@media (min-width: 1440px) {
  .site-top {
    width: min(100% - 2rem, var(--max));
    margin-inline: auto;
    left: 0;
    right: 0;
  }

  .site-header .nav,
  .nav-shell {
    gap: 1rem;
  }
  .nav-links { gap: 1rem; }
  .nav-links a {
    font-size: var(--nav-link-size);
    letter-spacing: var(--nav-link-spacing);
  }
  .logo-main {
    font-size: var(--logo-main-size);
    letter-spacing: 0.16em;
  }
  .logo-sub { font-size: var(--logo-sub-size); }
  .nav-cta .btn-live-chat {
    font-size: var(--nav-cta-size);
    padding: 0.72rem 1.3rem;
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }

  .site-header .nav {
    width: calc(100% - 1.25rem - var(--safe-left) - var(--safe-right));
    gap: 0.5rem;
  }

  .logo-main {
    font-size: 1rem;
    letter-spacing: 0.12em;
  }

  .logo-sub {
    font-size: 0.53rem;
    letter-spacing: 0.22em;
  }

  .site-top.scrolled .site-header,
  .site-header.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-shell {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100020;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem calc(1rem + var(--safe-bottom));
    background: rgba(10, 10, 10, 0.98);
    overflow: hidden;
    min-height: 0;
  }



  #navCheck:checked ~ .nav-shell {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  .nav-links li {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    white-space: normal;
  }

  .nav-cta {
    flex-shrink: 0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
  }

  .nav-cta .btn-live-chat {
    font-size: 0.75rem;
    letter-spacing: 0.03em;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 100011;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  section,
  .county-search,
  .films {
    padding: 3.5rem 0;
  }

  .hero-content {
    padding: calc(var(--header-h) + var(--safe-top) + 2rem) 1.25rem 3rem;
  }

  .hero-eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    line-height: 1.65;
    max-width: 22rem;
    margin-inline: auto;
    white-space: normal;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.75rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
  }

  .hero-tagline {
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    margin-bottom: 1.25rem;
  }

  .hero-location {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    line-height: 1.5;
    margin-bottom: 1.75rem;
    padding-inline: 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 18rem;
    margin-inline: auto;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .hero-indicators {
    gap: 0.35rem;
    padding-inline: 0.5rem;
  }

  .hero-dot {
    width: 28px;
  }

  .hero-dot.active {
    width: 40px;
  }

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

  .grid-3,
  .film-strip {
    grid-template-columns: 1fr;
  }

  .split,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-showcase {
    grid-template-columns: 1fr;
  }

  .about-content {
    height: auto;
  }

  .about-landmark {
    height: auto;
  }

  .about-landmark img {
    aspect-ratio: 4 / 5;
    height: auto;
    min-height: 280px;
  }

  .about-agent-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-agent-photo {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }

  .about-agent-details h3,
  .about-agent-contact {
    text-align: center;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .trec-disclaimer {
    font-size: 0.68rem;
  }

  .xrealty-ai {
    right: calc(0.85rem + var(--safe-right));
    bottom: calc(0.85rem + var(--safe-bottom));
  }

  .xrealty-panel {
    width: min(380px, calc(100vw - 1.5rem - var(--safe-left) - var(--safe-right)));
    max-height: min(560px, calc(100svh - var(--header-h) - var(--safe-top) - var(--safe-bottom) - 2rem));
  }
}

@media (max-width: 640px) {
  .about-agent-photo .agent-headshot {
    max-height: 280px;
  }

  .nav-cta .btn-live-chat {
    font-size: 0.76rem;
  }

  .xrealty-launcher {
    min-width: 9.5rem;
    max-width: calc(100vw - 1.5rem - var(--safe-left) - var(--safe-right));
  }

  .xrealty-launcher-copy {
    min-width: 8rem;
    padding: 0.6rem 0.85rem 0.55rem 0.75rem;
  }

  .xrealty-launcher-eyebrow {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
  }

  .xrealty-launcher-title {
    font-size: 1rem;
  }

  .xrealty-panel {
    width: min(360px, calc(100vw - 1.25rem - var(--safe-left) - var(--safe-right)));
    max-height: min(520px, calc(100svh - var(--header-h) - var(--safe-top) - var(--safe-bottom) - 1.5rem));
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    font-size: 16px;
  }
}