/* ============================================================
   3390 QUAIL RIDGE CT — Luxury Single-Listing Site
   Editorial / architectural design system
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=switzer@300,400,500,600,700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Type scale */
  --text-xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --text-sm: clamp(0.84rem, 0.82rem + 0.12vw, 0.92rem);
  --text-base: clamp(1rem, 0.97rem + 0.16vw, 1.08rem);
  --text-lg: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --text-xl: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --text-2xl: clamp(2.1rem, 1.6rem + 2.4vw, 3.4rem);
  --text-3xl: clamp(2.8rem, 1.9rem + 4.4vw, 5.2rem);
  --text-hero: clamp(3.4rem, 2rem + 6.6vw, 7.5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;   --space-24: 6rem;
  --space-32: 8rem;    --space-40: 10rem;

  /* Radius */
  --radius-sm: 2px; --radius-md: 4px; --radius-lg: 8px; --radius-full: 999px;

  /* Light theme — bright, airy, cool/neutral with a crisp futuristic accent */
  --color-bg: oklch(0.985 0.004 240);
  --color-surface: oklch(1 0 0);
  --color-surface-offset: oklch(0.955 0.006 240);
  --color-text: oklch(0.24 0.018 250);
  --color-text-muted: oklch(0.46 0.016 248);
  --color-text-faint: oklch(0.62 0.012 246);
  --color-line: oklch(0.9 0.008 245);
  --color-accent: oklch(0.62 0.15 235);        /* crisp cool blue */
  --color-accent-deep: oklch(0.5 0.16 245);
  --color-accent-soft: oklch(0.93 0.04 232);
  --color-accent-glow: oklch(0.66 0.17 230 / 0.35);
  --color-hero-overlay: oklch(0.2 0.03 250 / 0.4);

  /* Glass surfaces */
  --glass-bg: oklch(1 0 0 / 0.55);
  --glass-bg-strong: oklch(1 0 0 / 0.72);
  --glass-border: oklch(1 0 0 / 0.6);
  --glass-blur: 18px;

  --shadow-sm: 0 1px 3px oklch(0.4 0.04 250 / 0.07), 0 1px 2px oklch(0.4 0.04 250 / 0.05);
  --shadow-md: 0 10px 30px oklch(0.4 0.06 250 / 0.1), 0 4px 10px oklch(0.4 0.06 250 / 0.06);
  --shadow-lg: 0 30px 70px oklch(0.38 0.06 250 / 0.16), 0 10px 24px oklch(0.38 0.06 250 / 0.1);
  --shadow-glow: 0 0 0 1px oklch(0.66 0.16 232 / 0.12), 0 14px 50px var(--color-accent-glow);

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --max-w: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Dark theme — cool deep slate/ink with luminous cyan-blue accent */
  --color-bg: oklch(0.21 0.02 250);
  --color-surface: oklch(0.26 0.022 252);
  --color-surface-offset: oklch(0.3 0.024 254);
  --color-text: oklch(0.95 0.008 240);
  --color-text-muted: oklch(0.74 0.014 242);
  --color-text-faint: oklch(0.58 0.014 244);
  --color-line: oklch(0.38 0.022 252);
  --color-accent: oklch(0.78 0.14 220);
  --color-accent-deep: oklch(0.68 0.15 228);
  --color-accent-soft: oklch(0.36 0.06 244);
  --color-accent-glow: oklch(0.74 0.16 220 / 0.4);
  --color-hero-overlay: oklch(0.12 0.025 252 / 0.55);

  --glass-bg: oklch(0.28 0.022 252 / 0.5);
  --glass-bg-strong: oklch(0.26 0.022 252 / 0.72);
  --glass-border: oklch(0.95 0.01 240 / 0.12);
  --glass-blur: 18px;

  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.3);
  --shadow-md: 0 10px 30px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 30px 70px oklch(0 0 0 / 0.6);
  --shadow-glow: 0 0 0 1px oklch(0.74 0.14 220 / 0.18), 0 14px 50px var(--color-accent-glow);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}
img { max-width: 100%; display: block; background: var(--color-surface-offset); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--color-accent); color: var(--color-bg); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 4rem); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: ''; width: 1.6em; height: 1px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  display: inline-block;
}
.section { padding-block: clamp(var(--space-20), 11vw, var(--space-40)); }
.section-head { max-width: 64ch; margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-2xl); margin-top: var(--space-3); }
.section-head p { color: var(--color-text-muted); margin-top: var(--space-5); font-size: var(--text-lg); line-height: 1.5; }

.reveal { opacity: 0; transition: opacity 1.1s var(--ease), clip-path 1.1s var(--ease), transform 1.1s var(--ease); clip-path: inset(0 0 18% 0); transform: translateY(26px); }
.reveal.in { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--color-accent), oklch(from var(--color-accent) calc(l + 0.12) c h));
  z-index: 300; transition: width 0.1s linear; pointer-events: none;
}
/* Parallax */
.intro-figure-media { overflow: hidden; border-radius: var(--radius-md); }
.intro-figure img[data-parallax] { will-change: transform; transform: translateY(0) scale(1.12); }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) clamp(1.25rem, 5vw, 4rem);
  transition: transform 0.45s var(--ease), background 0.45s var(--ease), padding 0.45s var(--ease), box-shadow 0.45s var(--ease);
  color: #fff;
}
.header.scrolled {
  background: oklch(from var(--color-bg) l c h / 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  padding-block: var(--space-3);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  border-bottom: 1px solid oklch(from var(--color-line) l c h / 0.6);
}
.header.hidden { transform: translateY(-105%); }
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand-text { line-height: 1; }
.brand-text strong { font-family: var(--font-display); font-size: 1.32rem; font-weight: 600; letter-spacing: 0.02em; display: block; }
.brand-text span { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.78; }
.nav { display: flex; align-items: center; gap: clamp(var(--space-4), 2vw, var(--space-8)); }
.nav-links { display: flex; gap: clamp(var(--space-4), 2vw, var(--space-8)); }
.nav-links a { font-size: var(--text-sm); letter-spacing: 0.04em; position: relative; opacity: 0.92; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: currentColor; transition: width 0.4s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: var(--space-4); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  border: 1px solid currentColor; opacity: 0.85;
  transition: opacity 0.3s, transform 0.3s var(--ease), background 0.3s;
}
.theme-toggle:hover { opacity: 1; transform: rotate(15deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.btn-cta {
  font-size: var(--text-sm); letter-spacing: 0.06em; font-weight: 500;
  padding: 0.62rem 1.3rem; border-radius: var(--radius-full);
  border: 1px solid currentColor; transition: all 0.35s var(--ease);
  white-space: nowrap;
}
.btn-cta:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transform-origin: 60% 45%;
  animation: heroZoom 18s ease-out forwards;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 12%, oklch(0.7 0.13 225 / 0.18) 0%, transparent 55%),
    linear-gradient(180deg, oklch(0.16 0.03 250 / 0.28) 0%, oklch(0.14 0.03 250 / 0.46) 100%);
}
/* Subtle drifting glow orbs for a futuristic hero */
.hero::before {
  content: ''; position: absolute; z-index: -1; inset: -10%;
  background:
    radial-gradient(38% 32% at 78% 70%, oklch(0.72 0.15 215 / 0.22) 0%, transparent 60%),
    radial-gradient(30% 28% at 18% 28%, oklch(0.7 0.14 280 / 0.16) 0%, transparent 60%);
  pointer-events: none; mix-blend-mode: screen;
  animation: heroDrift 16s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero-inner { width: 100%; }
.hero-eyebrow {
  display: block; font-size: var(--text-xs); letter-spacing: 0.34em; text-transform: uppercase;
  font-weight: 500; opacity: 0; color: oklch(0.9 0.07 220);
  animation: heroRise 1s var(--ease) 0.2s forwards;
}
.hero h1 {
  font-size: var(--text-hero); font-weight: 400; margin: var(--space-4) auto 0; max-width: 14ch;
  letter-spacing: 0; line-height: 1.06;
  opacity: 0; animation: heroRise 1.1s var(--ease) 0.45s forwards;
}
.hero h1 em { font-style: italic; font-weight: 400; padding: 0 0.14em; letter-spacing: 0.01em; }
.hero-address {
  margin-top: var(--space-6); font-size: var(--text-sm); letter-spacing: 0.28em;
  text-transform: uppercase; opacity: 0; font-weight: 400;
  animation: heroRise 1s var(--ease) 0.8s forwards;
}
@keyframes heroZoom { to { transform: scale(1.0); } }
@keyframes heroRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 0.9; transform: none; } }

/* ---------- Intro / Overview ---------- */
.intro { background: var(--color-surface); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-12), 6vw, var(--space-24)); align-items: center; }
.intro-copy h2 { font-size: var(--text-2xl); margin: var(--space-4) 0 var(--space-6); }
.intro-copy p { color: var(--color-text-muted); margin-bottom: var(--space-5); font-size: var(--text-lg); line-height: 1.6; }
.intro-figure { position: relative; }
.intro-figure-media { box-shadow: var(--shadow-lg); }
.intro-figure img { display: block; width: 100%; border-radius: var(--radius-md); aspect-ratio: 4/5; object-fit: cover; }
.intro-figure .tag {
  position: absolute; bottom: var(--space-8); left: calc(-1 * var(--space-8));
  background: var(--glass-bg-strong); color: var(--color-text); padding: var(--space-5) var(--space-6);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.5); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
  box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); max-width: 270px;
  border: 1px solid var(--glass-border);
}
.intro-figure .tag strong { font-family: var(--font-display); font-size: var(--text-xl); display: block; color: var(--color-accent-deep); }
.intro-figure .tag span { font-size: var(--text-sm); color: var(--color-text-muted); }

/* Quick facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-line); margin-top: var(--space-20); }
.facts div { padding: var(--space-8) var(--space-4); text-align: center; border-right: 1px solid var(--color-line); }
.facts div:last-child { border-right: none; }
.facts strong { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; display: block; color: var(--color-text); }
.facts span { font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-text-faint); }

/* ---------- Features ---------- */
.features { background: var(--color-bg); position: relative; overflow: hidden; }
.features::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(50% 40% at 85% 8%, var(--color-accent-glow) 0%, transparent 60%);
  opacity: 0.5;
}
.features .container { position: relative; z-index: 1; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.feature-card {
  position: relative; background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border-radius: var(--radius-lg); padding: var(--space-8); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.feature-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, oklch(1 0 0 / 0.14) 0%, transparent 42%);
}
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  border-color: oklch(from var(--color-accent) l c h / 0.45);
}
.feature-card .ico {
  width: 44px; height: 44px; color: var(--color-accent); margin-bottom: var(--space-5);
  filter: drop-shadow(0 2px 10px var(--color-accent-glow));
}
.feature-card .ico svg { width: 100%; height: 100%; stroke-width: 1.2; }
.feature-card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.feature-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.55; }

/* ---------- Gallery ---------- */
.gallery { background: var(--color-surface); }
.gallery-grid, .gallery-preview {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3);
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius-md); cursor: pointer;
  aspect-ratio: 3 / 2;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.gallery-item:hover { box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--space-7) var(--space-4) var(--space-3);
  font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; color: #fff;
  background: linear-gradient(to top, oklch(0.16 0.04 250 / 0.82), transparent);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery-cta { display: flex; justify-content: center; margin-top: var(--space-10); }
.gallery-cta a {
  display: inline-flex; align-items: center; gap: var(--space-3);
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.04em; padding: 0.85rem 1.8rem; border-radius: var(--radius-full);
  border: 1px solid var(--color-line); color: var(--color-text);
  background: oklch(from var(--color-surface) l c h / 0.6);
  backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
  transition: all 0.35s var(--ease);
}
.gallery-cta a:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-cta a svg { width: 18px; height: 18px; }
.gallery-page-head { padding-top: clamp(var(--space-16), 14vh, var(--space-24)); }
.gallery-back { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); transition: color 0.3s; }
.gallery-back:hover { color: var(--color-accent-deep); }
.gallery-back svg { width: 16px; height: 16px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: oklch(0.14 0.025 252 / 0.92);
  display: none; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.4s var(--ease);
  backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 90vw; max-height: 82vh; object-fit: contain; box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); }
.lightbox-cap { position: absolute; bottom: var(--space-8); color: #fff; font-size: var(--text-sm); letter-spacing: 0.06em; }
.lightbox-close, .lightbox-nav button {
  position: absolute; color: #fff; width: 54px; height: 54px; border-radius: var(--radius-full);
  display: grid; place-items: center; border: 1px solid oklch(1 0 0 / 0.3);
  background: oklch(1 0 0 / 0.06); transition: all 0.3s var(--ease);
}
.lightbox-close:hover, .lightbox-nav button:hover { background: oklch(1 0 0 / 0.18); }
.lightbox-close { top: var(--space-6); right: var(--space-6); }
.lightbox-nav .prev { left: var(--space-6); top: 50%; transform: translateY(-50%); }
.lightbox-nav .next { right: var(--space-6); top: 50%; transform: translateY(-50%); }
.lightbox svg { width: 22px; height: 22px; }
.lightbox-count { position: absolute; top: var(--space-8); left: var(--space-8); color: #fff; font-size: var(--text-sm); letter-spacing: 0.1em; }

/* ---------- Floor Plan (static legend) ---------- */
.floorplan { background: var(--color-bg); }
.fp-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(var(--space-8), 4vw, var(--space-16)); align-items: start; }
.fp-stage {
  position: relative; background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  padding: var(--space-6); box-shadow: var(--shadow-md);
}
.fp-stage img { border-radius: var(--radius-sm); width: 100%; }
.fp-aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: var(--space-5); }
.fp-levels { display: flex; flex-direction: column; gap: var(--space-12); margin-bottom: 0; }
.fp-level {
  background: none; border: none; border-radius: 0; padding: 0; box-shadow: none;
}
.fp-level + .fp-level { padding-top: var(--space-12); border-top: 1px solid var(--color-line); }
.fp-level h3 {
  font-size: var(--text-xl); color: var(--color-accent-deep);
  margin-bottom: var(--space-4); display: flex; align-items: baseline;
  justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
}
.fp-level .fp-sqft {
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint);
}
.fp-level p { color: var(--color-text-muted); font-size: var(--text-base); line-height: 1.6; }
.fp-rooms { list-style: none; margin-top: var(--space-6); }
.fp-rooms li { padding: var(--space-5) 0; border-bottom: 1px solid var(--color-line); display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-6); font-size: var(--text-sm); line-height: 1.4; }
.fp-rooms li:first-child { padding-top: 0; }
.fp-rooms li:last-child { border-bottom: none; padding-bottom: 0; }
.fp-rooms li span:first-child { font-weight: 600; }
.fp-rooms li span:last-child { color: var(--color-text-faint); text-align: right; }

/* ---------- Systems Timeline ---------- */
.systems { background: var(--color-surface); }
.sys-intro { display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-16); }
.sys-legend { display: flex; gap: var(--space-5); font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); flex-wrap: wrap; }
.sys-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.dot { width: 10px; height: 10px; border-radius: var(--radius-full); }
.dot.new { background: oklch(0.62 0.13 150); }
.dot.mid { background: oklch(0.72 0.13 80); }
.dot.watch { background: oklch(0.62 0.16 40); }
.sys-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.sys-card {
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-left: 3px solid var(--color-accent);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border-radius: var(--radius-md); padding: var(--space-6) var(--space-8);
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5); align-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.sys-card:hover { transform: translateX(4px); box-shadow: var(--shadow-md), var(--shadow-glow); }
.sys-card.new { border-left-color: oklch(0.62 0.13 150); }
.sys-card.mid { border-left-color: oklch(0.72 0.13 80); }
.sys-card.watch { border-left-color: oklch(0.62 0.16 40); }
.sys-card .sys-ico { width: 40px; height: 40px; color: var(--color-text-muted); }
.sys-card .sys-ico svg { width: 100%; height: 100%; stroke-width: 1.2; }
.sys-card h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); letter-spacing: 0; }
.sys-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }
.sys-age { text-align: right; }
.sys-age .num { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: var(--color-text); line-height: 1; }
.sys-age .lbl { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-faint); }
.sys-note { margin-top: var(--space-10); font-size: var(--text-sm); color: var(--color-text-faint); max-width: 70ch; line-height: 1.6; }
.sys-note a { color: var(--color-accent-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Updated / Before-After ---------- */
.updated { background: var(--color-bg); }
.ba-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }
.ba-tabs button {
  font-size: var(--text-sm); padding: 0.5rem 1.15rem; border-radius: var(--radius-full);
  border: 1px solid var(--color-line); color: var(--color-text-muted);
  background: oklch(from var(--color-surface) l c h / 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s var(--ease);
}
.ba-tabs button:hover { color: var(--color-text); border-color: var(--color-accent-soft); transform: translateY(-1px); }
.ba-tabs button.active {
  background: var(--color-accent); color: #fff; border-color: var(--color-accent);
  box-shadow: 0 6px 22px var(--color-accent-glow);
}
.ba-stage {
  position: relative; width: 100%; aspect-ratio: 3/2; overflow: hidden;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  user-select: none; -webkit-user-select: none; touch-action: none; cursor: ew-resize;
}
.ba-stage.dragging { cursor: ew-resize; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.ba-after { clip-path: inset(0 0 0 50%); will-change: clip-path; }
.ba-label {
  position: absolute; top: var(--space-5); padding: 0.4rem 0.9rem; border-radius: var(--radius-full);
  font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
  background: oklch(0.18 0.03 252 / 0.55); color: #fff; backdrop-filter: blur(8px) saturate(1.3); -webkit-backdrop-filter: blur(8px) saturate(1.3); border: 1px solid oklch(1 0 0 / 0.18);
}
.ba-label.l-before { left: var(--space-5); }
.ba-label.l-after { right: var(--space-5); background: var(--color-accent); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: oklch(1 0 0 / 0.92); transform: translateX(-50%); box-shadow: 0 0 18px var(--color-accent-glow), 0 0 14px oklch(0 0 0 / 0.35); pointer-events: none; }
.ba-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 50px; height: 50px; border-radius: var(--radius-full);
  background: oklch(1 0 0 / 0.82); backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid oklch(1 0 0 / 0.6);
  display: grid; place-items: center; box-shadow: var(--shadow-md); cursor: ew-resize; color: var(--color-text);
  transition: transform 0.25s var(--ease); pointer-events: none;
}
.ba-stage.dragging .ba-grip { transform: translate(-50%, -50%) scale(1.08); }
.ba-grip svg { width: 22px; height: 22px; }
.ba-caption { margin-top: var(--space-6); display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-4); }
.ba-caption h3 { font-size: var(--text-xl); }
.ba-caption p { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 52ch; }
.ba-disclaimer { margin-top: var(--space-8); font-size: var(--text-xs); color: var(--color-text-faint); font-style: italic; }

/* ---------- Neighborhood ---------- */
.neighborhood { background: var(--color-surface); }
.hood-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 4vw, var(--space-16)); align-items: center; }
.hood-amen { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-8); }
.hood-amen div { padding: var(--space-5); background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius-md); }
.hood-amen .ico { width: 28px; height: 28px; color: var(--color-accent); margin-bottom: var(--space-3); }
.hood-amen h4 { font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm); margin-bottom: 2px; }
.hood-amen p { font-size: var(--text-xs); color: var(--color-text-muted); }
.hood-photos { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: var(--space-3); }
.hood-photos img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; }
.hood-photos img:first-child { grid-column: span 2; aspect-ratio: 16/9; }
.schools { margin-top: var(--space-12); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.schools div { text-align: center; padding: var(--space-6); border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-bg); }
.schools .lvl { font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent-deep); }
.schools strong { font-family: var(--font-display); font-size: var(--text-lg); display: block; margin-top: var(--space-1); }

/* ---------- Contact ---------- */
.contact { background: var(--color-bg); position: relative; overflow: hidden; }
.contact::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(45% 50% at 12% 90%, var(--color-accent-glow) 0%, transparent 60%);
  opacity: 0.5;
}
.contact .container { position: relative; z-index: 1; }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(var(--space-10), 5vw, var(--space-20)); }
.agent-card {
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  padding: var(--space-10); box-shadow: var(--shadow-md);
}
.agent-name { font-size: var(--text-2xl); margin-bottom: var(--space-1); }
.agent-firm { color: var(--color-accent-deep); font-size: var(--text-sm); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-6); }
.agent-lines { list-style: none; }
.agent-lines li { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--color-line); font-size: var(--text-base); }
.agent-lines .ico { width: 20px; height: 20px; color: var(--color-accent); flex-shrink: 0; }
.agent-lines a:hover { color: var(--color-accent-deep); }
.agent-lic { margin-top: var(--space-6); font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.08em; }

.contact-form h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.contact-form > p { color: var(--color-text-muted); margin-bottom: var(--space-8); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field { margin-bottom: var(--space-5); position: relative; }
.field label { display: block; font-size: var(--text-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.85rem 1rem; font-family: inherit; font-size: var(--text-base);
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-sm);
  color: var(--color-text); transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px oklch(from var(--color-accent) l c h / 0.16);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .err { color: oklch(0.55 0.18 28); font-size: var(--text-xs); margin-top: var(--space-1); display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea { border-color: oklch(0.55 0.18 28); }
.btn-submit {
  width: 100%; padding: 1rem; font-size: var(--text-base); font-weight: 500; letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-deep)); color: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px var(--color-accent-glow);
  transition: all 0.35s var(--ease); margin-top: var(--space-2);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 34px var(--color-accent-glow), var(--shadow-md); }
.form-success {
  display: none; text-align: center; padding: var(--space-16) var(--space-8);
}
.form-success.show { display: block; animation: fadeUp 0.6s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.form-success .check { width: 64px; height: 64px; margin: 0 auto var(--space-5); color: oklch(0.6 0.13 150); }
.form-success h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.form-success p { color: var(--color-text-muted); }

/* ---------- Footer ---------- */
.footer { background: var(--color-text); color: oklch(0.85 0.01 75); padding-block: var(--space-16) var(--space-8); }
[data-theme="dark"] .footer { background: oklch(0.14 0.008 60); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-8); padding-bottom: var(--space-10); border-bottom: 1px solid oklch(1 0 0 / 0.12); }
.footer .brand svg { color: var(--color-accent); }
.footer .brand-text strong { color: oklch(0.97 0.01 75); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.footer-nav a { font-size: var(--text-sm); opacity: 0.8; transition: opacity 0.3s; }
.footer-nav a:hover { opacity: 1; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-8); font-size: var(--text-xs); opacity: 0.6; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .intro-grid, .fp-layout, .hood-grid, .contact-grid { grid-template-columns: 1fr; }
  .fp-aside { position: static; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid, .gallery-preview { grid-template-columns: repeat(2, 1fr); }
  .intro-figure .tag { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); max-width: none; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; right: 0; left: 0;
    background: var(--color-bg); padding: var(--space-6); gap: var(--space-5); box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-line);
  }
  .header.scrolled .nav-links.open a, .nav-links.open a { color: var(--color-text); }
  .menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; }
  .menu-toggle svg { width: 22px; height: 22px; }
  .btn-cta { display: none; }
  .sys-grid, .feature-grid, .facts, .schools, .hood-amen, .form-row { grid-template-columns: 1fr; }
  .facts div { border-right: none; border-bottom: 1px solid var(--color-line); }
  .facts div:last-child { border-bottom: none; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-preview { grid-template-columns: repeat(2, 1fr); }
  .brand-text span { display: none; }
  .sys-card { grid-template-columns: auto 1fr; }
  .sys-card .sys-age { grid-column: 2; text-align: left; }
  .schools { grid-template-columns: 1fr; }
}
