/* ============================================================
   Olga Akilova Real Estate Visionary — Design System
   Editorial luxury · Navy · Ivory · Champagne Gold
   Inspired by Jade Mills Estates aesthetic
   ============================================================ */

:root {
  /* Brand colors — deeper, moodier navy paired with warm champagne gold */
  --navy: #0A1F3D;
  --navy-deep: #05132A;
  --navy-soft: #14325E;
  --gold: #B8935A;
  --gold-deep: #8F6E3E;
  --gold-soft: #E6D3A8;
  --white: #FFFFFF;
  --cream: #F8F5EE;
  --stone-50: #F4F1EA;
  --stone-100: #E9E4D8;
  --stone-200: #D4CCBB;
  --stone-500: #7A7265;
  --stone-700: #332F27;
  --ink: #141414;

  /* Typography */
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing & layout */
  --container: 1320px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-py: clamp(4rem, 10vw, 7rem);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms var(--ease);
  --t-med: 320ms var(--ease);
  --t-slow: 600ms var(--ease);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(10, 31, 61, 0.06), 0 1px 3px rgba(10, 31, 61, 0.08);
  --shadow-md: 0 4px 12px rgba(10, 31, 61, 0.08), 0 2px 6px rgba(10, 31, 61, 0.06);
  --shadow-lg: 0 16px 40px rgba(10, 31, 61, 0.12), 0 4px 12px rgba(10, 31, 61, 0.08);

  /* Radius */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; padding: 0; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
input, textarea, select { font: inherit; color: inherit; }

/* Typography defaults */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.015em; color: var(--navy); }
h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); font-weight: 400; }
h2 { font-size: clamp(2.1rem, 4.8vw, 3.25rem); }
h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
h4 { font-size: 1.25rem; }
p { max-width: 65ch; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-py); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }
.divider-line { height: 1px; background: var(--stone-200); border: none; margin: 0; }

/* ============================================================
   Header / Nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone-100);
  transition: box-shadow var(--t-med);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 84px;
}
.site-header__brand {
  display: flex; align-items: center; gap: 0.9rem;
  flex-shrink: 0;
  text-decoration: none;
}
.site-header__brand-mark { width: 44px; height: 44px; color: var(--navy); flex-shrink: 0; }
.site-header__brand-divider {
  width: 1px;
  align-self: stretch;
  min-height: 34px;
  background: var(--gold);
  opacity: 0.75;
  flex-shrink: 0;
}
.site-header__brand-text {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.1;
}
.site-header__brand-text small {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--gold-deep);
  margin-top: 4px;
  text-shadow: 0 1px 0 rgba(168, 137, 78, 0.18);
}
@media (max-width: 520px) {
  .site-header__brand { gap: 0.6rem; }
  .site-header__brand-mark { width: 36px; height: 36px; }
  .site-header__brand-text { font-size: 0.82rem; letter-spacing: 0.14em; }
  .site-header__brand-text small { font-size: 0.95rem; margin-top: 2px; font-weight: 700; color: var(--gold-deep); }
  .site-header__brand-divider { min-height: 28px; }
}

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav__list {
  list-style: none; padding: 0; margin: 0;
  display: flex; gap: 2rem; align-items: center;
}
.site-nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone-700);
  position: relative;
  padding: 4px 0;
}
.site-nav__link:hover,
.site-nav__link.is-active { color: var(--navy); }
.site-nav__link.is-active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--gold);
}
.site-nav__phone {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-md);
  font-size: 0.88rem; font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast);
}
.site-nav__phone:hover { background: var(--navy-deep); transform: translateY(-1px); }
.site-nav__phone svg { width: 16px; height: 16px; }

.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 22px; height: 2px; background: var(--navy);
  transition: transform var(--t-fast), top var(--t-fast);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 960px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 84px; left: 0; right: 0;
    background: var(--white); padding: 1.5rem var(--gutter); gap: 1rem;
    border-bottom: 1px solid var(--stone-100);
    box-shadow: var(--shadow-md);
  }
  .site-nav__list { flex-direction: column; align-items: flex-start; gap: 1rem; width: 100%; }
  .site-nav__phone { width: 100%; justify-content: center; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(10, 31, 61, 0.88) 0%,
      rgba(10, 31, 61, 0.60) 45%,
      rgba(10, 31, 61, 0.25) 100%),
    linear-gradient(180deg,
      rgba(10, 31, 61, 0.35) 0%,
      rgba(10, 31, 61, 0.15) 35%,
      rgba(10, 31, 61, 0.55) 100%);
}
.hero__content { padding-block: 6rem; max-width: 820px; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 12px rgba(10, 31, 61, 0.6);
}
.hero h1 {
  color: var(--white);
  font-weight: 400;
  line-height: 1.05;
}
/* Let the hero headline wrap naturally on narrow screens instead of
   keeping the desktop line-breaks, which produce awkward orphans. */
@media (max-width: 640px) {
  .hero h1 br { display: none; }
  .hero h1 { text-wrap: balance; }
}
.hero__lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1.5rem;
  max-width: 55ch;
  line-height: 1.6;
}
.hero__cta-row { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }

/* Hero search */
.hero__search {
  margin-top: 3rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-radius: var(--r-md);
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  max-width: 720px;
  box-shadow: var(--shadow-lg);
}
.hero__search select,
.hero__search input {
  border: none; padding: 0.9rem 1rem;
  background: transparent;
  color: var(--ink); font-size: 0.92rem;
  border-right: 1px solid var(--stone-100);
  min-width: 0;
}
.hero__search select:last-of-type,
.hero__search input:last-of-type { border-right: none; }
.hero__search select:focus, .hero__search input:focus { outline: 2px solid var(--gold); outline-offset: -2px; }
.hero__search button {
  padding: 0.9rem 1.6rem;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: background var(--t-fast);
}
.hero__search button:hover { background: var(--navy-deep); }

@media (max-width: 720px) {
  .hero__search { grid-template-columns: 1fr 1fr; }
  .hero__search button { grid-column: 1 / -1; }
  .hero__search select, .hero__search input { border-right: none; border-bottom: 1px solid var(--stone-100); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.95rem 1.8rem;
  border-radius: var(--r-md);
  font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--navy); color: var(--white);
  border: 1px solid var(--navy);
}
.btn--primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--gold {
  background: var(--gold); color: var(--navy);
  border: 1px solid var(--gold);
}
.btn--gold:hover { background: var(--gold-deep); color: var(--white); border-color: var(--gold-deep); transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.btn--outline {
  background: transparent; color: var(--navy);
  border: 1px solid var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--block { width: 100%; }

/* ============================================================
   Section headers
   ============================================================ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}
.section-head__title { max-width: 620px; }
.section-head__title h2 { margin-top: 0.5rem; }
.section-head__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.section-head__link:hover { color: var(--gold-deep); }

/* ============================================================
   Listings grid
   ============================================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.listing-card {
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--t-med), box-shadow var(--t-med);
  display: flex; flex-direction: column;
  border: 1px solid var(--stone-100);
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.listing-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--stone-100);
  overflow: hidden;
}
.listing-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow);
}
.listing-card:hover .listing-card__media img { transform: scale(1.04); }
.listing-card__status {
  position: absolute; top: 1rem; left: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--navy); color: var(--white);
  font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; font-weight: 600;
  border-radius: 2px;
}
.listing-card__status--sold { background: var(--stone-700); }
.listing-card__status--new { background: var(--gold); color: var(--navy); }
.listing-card__status--under-contract { background: #b8860b; color: #fff; }
.listing-card__body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.listing-card__price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.1;
}
.listing-card__address {
  font-size: 0.95rem;
  color: var(--stone-700);
  font-weight: 500;
}
.listing-card__locality {
  font-size: 0.85rem;
  color: var(--stone-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.listing-card__meta {
  display: flex; gap: 1.25rem;
  padding-top: 1rem; margin-top: auto;
  border-top: 1px solid var(--stone-100);
  font-size: 0.82rem; color: var(--stone-700);
}
.listing-card__meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.listing-card__meta svg { width: 14px; height: 14px; color: var(--gold-deep); }

/* ============================================================
   Listing detail
   ============================================================ */
.listing-detail { padding-top: 2rem; }
.listing-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(200px, 36vh));
  gap: 0.5rem;
  margin-bottom: 3rem;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
}
/* On desktop, the inner track is transparent — its children participate in
   the parent grid layout directly. */
.listing-gallery__track { display: contents; }
.listing-gallery__item { overflow: hidden; position: relative; background: var(--stone-100); cursor: pointer; }
.listing-gallery__item--desktop:first-child { grid-row: 1 / -1; }
.listing-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.listing-gallery__item:hover img { transform: scale(1.03); }
.listing-gallery__more {
  position: absolute; inset: 0;
  background: rgba(10, 31, 61, 0.55);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 600;
  pointer-events: none;
}
/* Mobile-only carousel slides are hidden on desktop. */
.listing-gallery__item--mobile { display: none; }
/* Dots + counter are overlaid on the mobile carousel only. */
.listing-gallery__dots,
.listing-gallery__counter { display: none; }

@media (max-width: 720px) {
  /* Outer wrapper becomes a relative-positioned viewport that clips the
     scrolling track inside. Dots + counter overlay this wrapper so they
     stay fixed in place while the track scrolls. */
  .listing-gallery {
    display: block;
    height: 60vh;
    max-height: 520px;
    border-radius: var(--r-md);
    overflow: hidden;
    position: relative;
  }
  /* Inner track is the actual horizontal scroll-snap carousel. */
  .listing-gallery__track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    gap: 0;
    scrollbar-width: none;
  }
  .listing-gallery__track::-webkit-scrollbar { display: none; }
  /* Desktop mosaic tiles disappear on mobile; we render a dedicated slide set. */
  .listing-gallery__item--desktop { display: none; }
  .listing-gallery__item--mobile {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  /* "+N more" badge is redundant once every photo is swipeable. */
  .listing-gallery__more { display: none; }

  .listing-gallery__dots {
    display: flex;
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    gap: 6px;
    padding: 6px 10px;
    background: rgba(10, 31, 61, 0.45);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    z-index: 2;
    max-width: calc(100% - 2rem);
    overflow: hidden;
  }
  .listing-gallery__dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background var(--t-base), transform var(--t-base);
    flex: 0 0 auto;
  }
  .listing-gallery__dot.is-active {
    background: var(--white);
    transform: scale(1.35);
  }
  .listing-gallery__counter {
    display: block;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--white);
    background: rgba(10, 31, 61, 0.55);
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
    pointer-events: none;
  }
}

.listing-header {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 960px) {
  .listing-header { grid-template-columns: 1fr; }
}
.listing-title h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: 0.5rem;
}
.listing-title__address {
  font-size: 1rem; color: var(--stone-500);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.listing-title__price {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 1rem;
}
.listing-title__status {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--navy); color: var(--white);
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 600;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.listing-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
  margin-top: 1.5rem;
}
.listing-fact__label {
  font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--stone-500);
  font-weight: 600; margin-bottom: 0.3rem;
}
.listing-fact__value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
}

.listing-description {
  margin-top: 2rem; font-size: 1rem; line-height: 1.8; color: var(--stone-700);
  max-width: 68ch;
}
.listing-description p + p { margin-top: 1rem; }

.listing-features {
  margin-top: 2rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 2rem;
}
.listing-features li {
  list-style: none;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--stone-700);
}
.listing-features li::before {
  content: ''; position: absolute; left: 0; top: 0.55rem;
  width: 6px; height: 6px; background: var(--gold); border-radius: 50%;
}

/* Agent/booking card (sticky sidebar) */
.agent-card {
  position: sticky; top: 110px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--r-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.agent-card__header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
}
.agent-card__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--gold);
}
.agent-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem; color: var(--navy);
}
.agent-card__title {
  font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--stone-500);
  font-weight: 600;
}
.agent-card__divider { height: 1px; background: var(--stone-100); margin: 1rem 0; }
.agent-card__btns { display: flex; flex-direction: column; gap: 0.65rem; }
.agent-card__hours {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--stone-100);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--stone-700);
}
.agent-card__hours strong {
  display: block;
  color: var(--gold-deep); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* ============================================================
   Filters bar (listings index)
   ============================================================ */
.filters-bar {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--stone-50);
  border: 1px solid var(--stone-100);
  border-radius: var(--r-md);
  margin-bottom: 2.5rem;
}
.filters-bar input,
.filters-bar select {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--stone-200);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 0.88rem;
}
.filters-bar input:focus,
.filters-bar select:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
.filters-bar button {
  padding: 0 1.5rem;
  background: var(--navy); color: var(--white);
  border-radius: var(--r-sm); font-weight: 600; font-size: 0.88rem;
}
.filters-bar button:hover { background: var(--navy-deep); }
@media (max-width: 900px) {
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .filters-bar button { grid-column: 1 / -1; padding: 0.75rem; }
}

/* ============================================================
   Regions strip (NY / FL)
   ============================================================ */
.regions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 720px) { .regions { grid-template-columns: 1fr; } }
.region-card {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--r-md);
  display: flex; align-items: flex-end;
  color: var(--white);
  cursor: pointer;
  isolation: isolate;
}
.region-card__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transition: transform var(--t-slow);
}
.region-card::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 30%, rgba(10, 31, 61, 0.85) 100%);
  pointer-events: none;
}
.region-card:hover .region-card__bg { transform: scale(1.05); }
.region-card__body { padding: 2rem; position: relative; z-index: 2; }
.region-card__body h3 { color: var(--white); font-size: 2rem; margin-bottom: 0.35rem; }
.region-card__body p { opacity: 0.9; font-size: 0.95rem; }

/* ============================================================
   Stats row
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--stone-100);
  border-bottom: 1px solid var(--stone-100);
}
.stat { text-align: center; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--navy);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat__label {
  font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--stone-500);
  font-weight: 600;
}

/* ============================================================
   Modal (booking)
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 31, 61, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn var(--t-med);
  overflow-y: auto;
}
.modal.is-open { display: flex; }
.modal__panel {
  background: var(--white);
  border-radius: var(--r-md);
  box-sizing: border-box;
  /* Panel sized to fit a comfortable 2-column form without overflow.
     640px panel - 2x 2rem padding = 576px content → two ~280px columns. */
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 2rem 1.75rem;
  position: relative;
  animation: slideUp var(--t-med);
}
/* Below ~560px viewport, collapse form rows to single column inside the modal */
@media (max-width: 560px) {
  .modal__panel { padding: 1.5rem 1.25rem 1.25rem; }
  .modal__panel .form-row { grid-template-columns: 1fr; }
}
.modal__panel .form,
.modal__panel .form * {
  box-sizing: border-box;
  max-width: 100%;
}
.modal__panel input,
.modal__panel textarea,
.modal__panel select {
  min-width: 0;  /* prevents grid children from overflowing their column */
}
.modal__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast);
}
.modal__close:hover { background: var(--stone-100); }
.modal__title { font-family: var(--font-display); font-size: 1.75rem; color: var(--navy); margin-bottom: 0.5rem; }
.modal__subtitle { color: var(--stone-500); margin-bottom: 1.75rem; font-size: 0.95rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============================================================
   Forms
   ============================================================ */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--stone-700);
}
.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.85rem 1rem;
  border: 1px solid var(--stone-200);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-status { padding: 0.75rem 1rem; border-radius: var(--r-sm); font-size: 0.9rem; display: none; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: #E8F3EB; color: #1F6B38; border: 1px solid #9BCFA8; }
.form-status.is-error { background: #FBEAEA; color: #8B2222; border: 1px solid #E5A0A0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy-deep); color: var(--white);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 900px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .site-footer__col--brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Contact page — headings, intro, hours grid */
.contact-lede { margin-top: 0.5rem; margin-bottom: 1.25rem; }
.contact-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--stone-700);
  margin-bottom: 2.5rem;
}
.contact-hours {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--stone-700);
}
@media (max-width: 560px) {
  .contact-lede { font-size: clamp(2.25rem, 12vw, 2.75rem); margin-bottom: 1rem; }
  .contact-intro { font-size: 1rem; margin-bottom: 2rem; }
  .contact-hours { gap: 0.75rem; font-size: 0.9rem; }
}

/* Two-column contact layout that collapses cleanly on phones. */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.contact-form-card {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 2.5rem;
}
@media (max-width: 860px) {
  /* Full-bleed card on mobile for a crisp, deliberate section break. */
  .contact-form-card {
    margin-inline: calc(var(--gutter) * -1);
    border-radius: 0;
    padding: 2.25rem var(--gutter) 2.5rem;
    border-top: 1px solid var(--stone-200);
    border-bottom: 1px solid var(--stone-200);
  }
  .contact-form-card h2 { font-size: 1.6rem !important; margin-bottom: 0.35rem !important; }
  .contact-form-card > p { font-size: 0.9rem !important; margin-bottom: 1.75rem !important; }
  /* Softer, friendlier form labels on mobile — the uppercase treatment
     reads too institutional on small screens. */
  .contact-form-card .form { gap: 1rem; }
  .contact-form-card .form-group { gap: 0.35rem; }
  .contact-form-card .form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.005em;
    color: var(--stone-500);
  }
  .contact-form-card .form-group input,
  .contact-form-card .form-group textarea,
  .contact-form-card .form-group select {
    padding: 0.8rem 0.95rem;
    font-size: 1rem;
    border-radius: 6px;
  }
}

.site-footer h4 {
  font-family: var(--font-body);
  color: var(--gold-soft);
  font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase; font-weight: 600;
  margin-bottom: 1.25rem;
}
.site-footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}
.site-footer a:hover { color: var(--gold); }
.site-footer__brand-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.site-footer__lede {
  font-size: 0.92rem; color: rgba(255, 255, 255, 0.7);
  max-width: 42ch; line-height: 1.7;
}
.site-footer__legal {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; justify-content: space-between; gap: 1.5rem;
  font-size: 0.78rem; color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
}

/* ============================================================
   Utility
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.fade-in { animation: fadeInUp 0.8s var(--ease) both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--stone-100) 0%, var(--stone-50) 50%, var(--stone-100) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty-state {
  padding: 4rem 2rem; text-align: center;
  border: 1px dashed var(--stone-200);
  border-radius: var(--r-md); color: var(--stone-500);
}

/* ===== Team page ===== */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.team-card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 2.5rem;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--stone-100);
  border-radius: var(--r-md);
  overflow: hidden;
  padding: 2rem;
}
.team-card__photo {
  /* Preserve the portrait's native proportions (roughly 1:2.17) so the
     full photo is visible — no cropping. */
  width: 100%;
  background: var(--stone-100);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.team-card__photo img {
  display: block;
  width: 100%;
  height: auto;            /* intrinsic ratio — shows full photo */
  object-fit: contain;
}
.team-card__body {
  padding: 0.5rem 0;
}
/* Stack to single-column below md for readability */
@media (max-width: 780px) {
  .team-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.25rem;
  }
  .team-card__photo {
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ===== Photo lightbox (public listing gallery) ===== */
.site-lightbox {
  position: fixed; inset: 0;
  background: rgba(6, 14, 29, 0.92);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  animation: siteLightboxIn .22s cubic-bezier(.2,.7,.2,1);
  will-change: opacity;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.site-lightbox[hidden] { display: none; }
@keyframes siteLightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.site-lightbox__figure {
  margin: 0;
  max-width: min(1400px, 100%);
  max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: siteLightboxFigureIn .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes siteLightboxFigureIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.site-lightbox__figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 30px 60px rgba(0,0,0,0.45);
  background: #111;
  /* Smooth crossfade when navigating to the next/prev photo */
  transition: opacity .22s ease, transform .22s ease;
  opacity: 1;
}
.site-lightbox__img.is-loading {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .site-lightbox,
  .site-lightbox__figure,
  .site-lightbox__figure img { animation: none; transition: none; }
  .site-lightbox__img.is-loading { opacity: 1; }
}
.site-lightbox__caption {
  color: rgba(255,255,255,0.78);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.site-lightbox__close,
.site-lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s;
  padding: 0;
}
.site-lightbox__close:hover,
.site-lightbox__nav:hover { background: rgba(255,255,255,0.22); }
.site-lightbox__close:active,
.site-lightbox__nav:active { transform: scale(0.94); }
.site-lightbox__close { top: 20px; right: 20px; }
.site-lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.site-lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.site-lightbox__nav--prev:active { transform: translateY(-50%) scale(0.94); }
.site-lightbox__nav--next:active { transform: translateY(-50%) scale(0.94); }
.site-lightbox__nav[hidden] { display: none; }
.site-lightbox svg { width: 22px; height: 22px; }

.listing-gallery__item { cursor: zoom-in; }
