/* ==========================================================================
   LARKSPUR REALTY & COMMERCIAL PROPERTIES - MODERN DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Color Palette */
  --navy: #0F172A;
  --navy-light: #1E293B;
  --navy-card: #182238;
  --indigo-primary: #3B82F6;
  --indigo-glow: rgba(59, 130, 246, 0.4);
  --gold: #D4AF37;
  --gold-accent: #C7A15A;
  --gold-glow: rgba(212, 175, 55, 0.35);
  --paper: #FAF9F6;
  --panel: #F1F3F9;
  --ink: #0F172A;
  --muted: #64748B;
  --white: #FFFFFF;
  --border-light: rgba(148, 163, 184, 0.18);
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.12);
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px -10px rgba(15, 23, 42, 0.15);
  --shadow-lg: 0 24px 50px -12px rgba(15, 23, 42, 0.25);
  --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.2);
}

/* Reset & Core */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand {
  font-family: 'Fraunces', serif;
}

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

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

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Buttons */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(15, 23, 42, 0.6);
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-accent) 100%);
  color: var(--navy);
  font-weight: 700;
  box-shadow: 0 8px 20px -6px var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(212, 175, 55, 0.5);
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border-light);
}

.btn-outline-dark:hover {
  border-color: var(--gold);
  color: var(--gold-accent);
}

/* HEADER & NAVBAR */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transition: all 0.3s ease;
}

nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: var(--shadow-glow);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.saved-counter-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 4px;
}

/* HERO SECTION - DARK ARCHITECTURAL LUXURY */
.hero {
  position: relative;
  min-height: 680px;
  background: 
    linear-gradient(180deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.88) 100%),
    url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1800&auto=format&fit=crop') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 120px;
}

.hero-inner {
  max-width: 720px;
  margin-top: 20px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 6px 16px;
  border-radius: 999px;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
}

.hero h1 {
  color: var(--white);
  font-size: 58px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.8px;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  line-height: 1.6;
  margin: 24px 0 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* SEARCH FLOATING CARD (GLASSMORPHISM) */
.search-card-container {
  max-width: 1140px;
  margin: -100px auto 0;
  position: relative;
  z-index: 20;
  padding: 0 28px;
}

.search-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-lg);
  padding: 30px 34px;
}

/* Mode Switcher Tabs (Residential vs Commercial) */
.search-mode-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 14px;
}

.mode-tab {
  background: transparent;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.mode-tab.active {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.search-form-grid {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 170px;
}

.field label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.field input, .field select {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15px;
  font-family: 'Outfit', sans-serif;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus, .field select:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: var(--white);
}

.search-submit-btn {
  padding: 14px 34px;
  height: 48px;
}

/* CATEGORY QUICK PILLS */
.category-pills {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 36px 0 0;
}

.chip {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip.active, .chip:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(15, 23, 42, 0.25);
}

.chip.active .chip-icon {
  color: var(--gold);
}

/* SECTION HEADINGS */
section {
  padding: 96px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head .eyebrow {
  color: var(--indigo-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 40px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.5px;
  max-width: 540px;
  line-height: 1.15;
}

.section-head p {
  color: var(--muted);
  font-size: 16px;
  max-width: 360px;
  line-height: 1.6;
}

/* PROPERTY LISTING GRID */
.listing-toolbar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.view-mode-toggle {
  display: flex;
  background: var(--panel);
  padding: 4px;
  border-radius: var(--radius-full);
}

.view-btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: 'Outfit';
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.view-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  transition: all 0.3s ease;
}

.listing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 25px -15px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.22);
}

.listing-media {
  position: relative;
  height: 230px;
  overflow: hidden;
}

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

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

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: var(--navy);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.save-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--navy);
  cursor: pointer;
  transition: all 0.2s ease;
}

.save-btn:hover, .save-btn.saved {
  background: var(--white);
  color: #EF4444;
  transform: scale(1.1);
}

.listing-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.listing-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.listing-price {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  color: var(--navy);
  font-weight: 600;
}

.lease-tag {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.listing-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.3;
}

.listing-loc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.listing-meta {
  display: flex;
  gap: 16px;
  font-size: 13.5px;
  color: var(--navy-light);
  font-weight: 500;
  border-top: 1px solid var(--panel);
  padding-top: 16px;
  margin-top: auto;
}

.listing-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* MAP SPLIT VIEW MODE */
.listing-container.map-view .listing-grid {
  grid-template-columns: 1fr 1.2fr;
}

.map-placeholder-box {
  display: none;
  background: var(--navy-card);
  border-radius: var(--radius-lg);
  min-height: 500px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.listing-container.map-view .map-placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  padding: 40px;
}

/* FEATURED SPOTLIGHT SECTION (INSPIRED BY REFERENCE IMAGE) */
.spotlight-section {
  background: linear-gradient(135deg, var(--navy) 0%, #152242 100%);
  color: var(--white);
  border-radius: 32px;
  margin: 40px 0;
  padding: 64px;
  box-shadow: var(--shadow-lg);
}

.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.spotlight-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
}

.spotlight-img img {
  height: 420px;
  width: 100%;
  object-fit: cover;
}

.spotlight-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
}

.spotlight-content h2 {
  font-size: 38px;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.spotlight-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16.5px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item b {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 34px;
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-item span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
}

/* MORTGAGE & LEASE CALCULATOR */
.calculator-card {
  background: var(--white);
  border-radius: 28px;
  padding: 48px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.calc-sliders {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.slider-group input[type="range"] {
  width: 100%;
  accent-color: var(--navy);
  height: 6px;
  border-radius: 4px;
}

.calc-results-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.3);
}

.monthly-payment-val {
  font-family: 'Fraunces', serif;
  font-size: 46px;
  color: var(--gold);
  font-weight: 600;
  margin: 12px 0 6px;
}

/* AGENT TEAM SECTION */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.agent-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.agent-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-accent);
}

.agent-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--gold);
}

.agent-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
}

.agent-role {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.agent-rating {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-accent);
  background: var(--paper);
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 16px;
}

/* TESTIMONIAL BANNER */
.testimonial-sec {
  background: var(--navy-light);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
  border-radius: 32px;
  margin: 40px 0;
}

.testimonial-sec blockquote {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto 24px;
}

.testimonial-sec cite {
  font-style: normal;
  font-size: 15px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* FOOTER */
footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 80px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.foot-grid h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.foot-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14.5px;
}

.foot-grid ul a:hover {
  color: var(--gold);
}

.foot-brand p {
  font-size: 14.5px;
  line-height: 1.7;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 300px;
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: 16px;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--panel);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* RESPONSIVE BREKAPOINTS */
@media (max-width: 992px) {
  .hero h1 { font-size: 42px; }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight-grid { grid-template-columns: 1fr; }
  .calculator-card { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 34px; }
  .listing-grid { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .spotlight-section { padding: 32px 24px; }
}
