/* ==========================================================================
   BRAND TOKENS — customize per client/listing
   ========================================================================== */
:root {
  --color-bg: #faf9f6;
  --color-surface: #ffffff;
  --color-text: #232823;
  --color-text-muted: #5c6560;
  --color-primary: #5d8e89;   /* sage/teal — from source site's Oxygen theme */
  --color-secondary: #6799b2; /* muted blue accent */
  --color-line: #e3e0d8;
  --color-dark: #1c2320;

  --font-heading: 'Jost', sans-serif;
  --font-body: 'Source Sans Pro', sans-serif;

  --container: 1180px;
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; margin: 0 0 .5em; color: var(--color-dark); }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-block;
  padding: .85em 1.8em;
  border-radius: 2px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #4d7a76; }
.btn-outline { border-color: currentColor; }
.btn-outline:hover { background: rgba(255,255,255,.12); }

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.4em;
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--color-primary);
  margin: .5em auto 0;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.header-row {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 48px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 2.2rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.8rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  font-weight: 600; font-size: .92rem; letter-spacing: .02em;
  color: #fff; text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.site-header.scrolled .site-nav a:not(.btn) { color: var(--color-dark); }
.site-nav a:not(.btn):hover { border-color: var(--color-primary); }
.nav-cta { color: #fff; border-color: #fff; }
.site-header.scrolled .nav-cta { color: var(--color-dark); border-color: var(--color-dark); }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
  z-index: 110;
}
.nav-toggle span { width: 100%; height: 2px; background: #fff; transition: transform .2s, opacity .2s, background .2s; }
.site-header.scrolled .nav-toggle span, .nav-open .nav-toggle span { background: var(--color-dark); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,26,23,.55) 0%, rgba(20,26,23,.35) 45%, rgba(20,26,23,.7) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 0 20px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .2em; font-size: .85rem; font-weight: 600;
  margin: 0 0 .8em;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin: 0; color: #fff; }
.hero-price { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 600; margin: .3em 0; color: #fff; }
.hero-sub { font-size: 1.05rem; opacity: .9; margin: 0; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: #fff; animation: bounce 1.8s infinite;
}
.scroll-cue svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
@keyframes bounce { 0%,100%{ transform: translateX(-50%) translateY(0);} 50%{ transform: translateX(-50%) translateY(8px);} }

/* ==========================================================================
   STATS
   ========================================================================== */
.stats { background: var(--color-dark); color: #fff; padding: 2.8rem 0; }
.stats-row { display: flex; justify-content: center; gap: clamp(2rem, 8vw, 6rem); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.stat-icon { width: 32px; height: 32px; fill: none; stroke: var(--color-secondary); stroke-width: 1.6; margin-bottom: .3rem; }
.stat-value { font-family: var(--font-heading); font-size: 2rem; font-weight: 600; }
.stat-label { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .8; }

/* ==========================================================================
   VIDEO
   ========================================================================== */
.video-section { padding: 5rem 0; }
.video-frame { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.12); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   DETAILS / PROSE
   ========================================================================== */
.details { padding: 1rem 0 5rem; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; color: var(--color-primary); }
.prose p, .prose li { color: var(--color-text-muted); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* ==========================================================================
   FLOOR PLANS
   ========================================================================== */
.floorplans { padding: 4rem 0; background: var(--color-surface); }
.floorplan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.floorplan-item { display: block; overflow: hidden; border: 1px solid var(--color-line); }
.floorplan-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.floorplan-item:hover img { transform: scale(1.03); }
.floorplan-downloads { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery { padding: 4rem 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gallery-grid a { display: block; overflow: hidden; aspect-ratio: 3 / 2; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }

/* ==========================================================================
   TOUR
   ========================================================================== */
.tour { padding: 4rem 0; background: var(--color-surface); }
.tour-frame { position: relative; padding-bottom: 57%; height: 0; overflow: hidden; }
.tour-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   MAP
   ========================================================================== */
.map iframe { display: block; }

/* ==========================================================================
   NEIGHBOURHOOD
   ========================================================================== */
.neighbourhood { padding: 4.5rem 0; }
.neighbourhood-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.neighbourhood h3 { margin-top: 1.5em; font-size: 1.1rem; color: var(--color-primary); }
.walkscore-tag { color: var(--color-text-muted); font-size: .95rem; }
.walkscore-tag a { color: var(--color-primary); font-weight: 600; }
blockquote {
  margin: 0 0 1.2em; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--color-primary);
  color: var(--color-text-muted); font-style: italic;
}
.neighbourhood-media img { border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.1); }

/* ==========================================================================
   BOOK A SHOWING
   ========================================================================== */
.book { padding: 5rem 0; background: var(--color-dark); color: #fff; }
.book .section-title { color: #fff; text-align: left; }
.book .section-title::after { margin-left: 0; }
.book-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 3.5rem; }
.inspection-note { color: rgba(255,255,255,.75); margin-bottom: 1.6rem; }
.inspection-note a { color: var(--color-secondary); font-weight: 600; }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: flex; flex-direction: column; gap: .4rem; }
.form-row label { font-size: .85rem; font-weight: 600; letter-spacing: .02em; }
.form-row .req { color: var(--color-secondary); }
.form-row input, .form-row textarea {
  font-family: var(--font-body); font-size: 1rem;
  padding: .75em .9em;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
  color: #fff;
  border-radius: 2px;
  resize: vertical;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: rgba(255,255,255,.4); }
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--color-secondary); }
.contact-form .btn { align-self: flex-start; }
.form-status { min-height: 1.4em; font-size: .9rem; color: var(--color-secondary); margin: 0; }

.agent-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  padding: 2rem;
  text-align: center;
}
.agent-photo { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; margin: 0 auto 1rem; }
.agent-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; margin: 0; }
.agent-title { color: var(--color-secondary); margin: .1em 0 .8em; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.agent-phone, .agent-email { margin: .2em 0; }
.agent-phone a, .agent-email a { color: #fff; }
.agent-brokerage { color: rgba(255,255,255,.65); font-size: .85rem; margin: 1em 0; }
.agent-logo { max-width: 140px; margin: 1em auto 0; opacity: .9; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #10130f; color: rgba(255,255,255,.6); padding: 1.6rem 0; font-size: .85rem; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-credit { margin: 0; line-height: 1.6; }
.footer-credit a { color: rgba(255,255,255,.8); font-weight: 600; }
.footer-credit a:hover { color: #fff; }
.social-icons { display: flex; gap: 1.1rem; }
.social-icons svg { width: 20px; height: 20px; }
.social-icons a { color: rgba(255,255,255,.6); transition: color .2s ease; }
.social-icons a:hover { color: #fff; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,12,10,.94);
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 86vh; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: none; color: #fff;
  cursor: pointer; opacity: .8; transition: opacity .2s ease;
}
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 20px; right: 24px; font-size: 2.2rem; line-height: 1; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 1.6rem; padding: .5em .3em; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--color-primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .neighbourhood-grid, .book-grid { grid-template-columns: 1fr; }
  .neighbourhood-media { order: -1; }
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: var(--header-h); right: 0; bottom: 0;
    width: min(320px, 80vw);
    background: #fff;
    flex-direction: column; align-items: flex-start;
    padding: 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,.1);
  }
  .nav-open .site-nav { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: 1.2rem; }
  .site-nav a:not(.btn) { color: var(--color-dark) !important; }
  .nav-cta { color: var(--color-dark) !important; border-color: var(--color-dark) !important; }

  .floorplan-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stats-row { gap: 2.2rem; }
}
