/* ─────────────────────────────────────────────────────────────
   The St. George Real Estate Team — Enhanced Stylesheet
   Enhancement pass via /build-website (frontend-design rules).
   Content/copy/sections/palette: UNCHANGED.
   Refined: typography, depth, motion, spacing, accessibility.
   ───────────────────────────────────────────────────────────── */

/* ─── Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter+Tight:wght@400;500;600;700&display=swap');

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

:root {
  /* Brand palette — unchanged (preserves CSS-var contract incl. misnamed --gold) */
  --navy:    #1a2b4a;
  --navy2:   #243557;
  --navy-deep: #0f1d33;
  --gold:    #0e91d9;      /* brand blue — name preserved per ONBOARDING */
  --gold2:   #3aaee8;
  --gold-soft: #6cc4ee;
  --white:   #ffffff;
  --offwhite:#f4f8fc;
  --gray:    #5b6675;       /* slightly cooler/darker for AA contrast */
  --gray-2:  #8893a3;
  --light:   #d9ecf8;
  --light-2: #e8f1f9;
  --text:    #1a2230;

  /* Typography */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body:    'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing — 8pt grid */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 40px;
  --space-9: 56px; --space-10: 72px; --space-11: 96px; --space-12: 128px;

  /* Elevation — 3-tier layered, color-tinted (frontend-design rule) */
  --shadow-1:
    0 1px 2px rgba(15, 29, 51, .06),
    0 2px 6px rgba(14, 145, 217, .04);
  --shadow-2:
    0 2px 4px rgba(15, 29, 51, .06),
    0 8px 20px rgba(14, 145, 217, .07),
    0 16px 32px -8px rgba(15, 29, 51, .08);
  --shadow-3:
    0 4px 8px rgba(15, 29, 51, .06),
    0 16px 40px -4px rgba(14, 145, 217, .12),
    0 32px 64px -16px rgba(15, 29, 51, .15);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.6);

  --radius:    12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --transition: .35s var(--ease-out);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display type — tight tracking, real optical sizing via Fraunces */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.018em;
  font-variation-settings: 'opsz' 96;
  color: var(--navy);
}
h3, h4 { font-weight: 600; line-height: 1.25; letter-spacing: -0.012em; font-variation-settings: 'opsz' 28; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Focus-visible — required by frontend-design rules */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
button, a { -webkit-tap-highlight-color: transparent; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Skip-to-content */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: var(--white);
  padding: 12px 20px; border-radius: 0 0 8px 0;
  font-family: var(--font-body); font-weight: 600; z-index: 200;
}
.skip-link:focus { left: 0; }

/* Selection */
::selection { background: rgba(14,145,217,.25); color: var(--navy); }

/* ─── Layout ─── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 var(--space-6); }
.section { padding: var(--space-11) 0; }

.section-label {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.section-label::before {
  content: '';
  width: 24px; height: 1.5px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  color: var(--navy);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 580px;
  font-family: var(--font-body);
}
.divider {
  width: 48px; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 2px;
  margin: var(--space-5) 0 var(--space-8);
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ─── Navigation ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-8); height: 84px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(14, 145, 217, .08), 0 8px 24px -16px rgba(15,29,51,.12);
  transition: height var(--transition), background var(--transition), box-shadow var(--transition);
}
nav.scrolled {
  height: 68px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(14, 145, 217, .12), 0 12px 32px -20px rgba(15,29,51,.18);
}

.nav-links { display: flex; gap: var(--space-7); list-style: none; }
.nav-links a {
  color: var(--navy);
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .005em;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .005em;
  padding: 11px 22px;
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 4px 10px -2px rgba(14,145,217,.45),
    0 2px 4px rgba(14,145,217,.18);
  transition: transform .2s var(--ease-spring), box-shadow .35s var(--ease-out), background .35s var(--ease-out);
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--gold2);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.25) inset,
    0 8px 18px -2px rgba(14,145,217,.55),
    0 4px 8px rgba(14,145,217,.25);
}
.nav-cta:active { transform: translateY(0); }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 12px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: var(--transition); }

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(14,145,217,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 78% 80%, rgba(58,174,232,.12) 0%, transparent 60%),
    radial-gradient(circle at 65% 30%, rgba(108,196,238,.08) 0%, transparent 40%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 45%, #1e3a6b 100%);
  display: flex; align-items: center; padding-top: 66px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .12; mix-blend-mode: overlay; pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(15,29,51,.4));
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; align-items: center; gap: var(--space-11); padding: var(--space-10) 0; }
.hero-text { flex: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: rgba(14,145,217,.14);
  border: 1px solid rgba(14,145,217,.35);
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.8rem);
  color: var(--white);
  margin-bottom: var(--space-5);
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
}
.hero h1 span {
  background: linear-gradient(105deg, #8fd4f5 0%, var(--gold-soft) 35%, var(--gold2) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}
.hero-sub {
  color: rgba(255,255,255,.78);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: var(--space-8);
  font-family: var(--font-body);
}
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.btn-primary {
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .94rem;
  letter-spacing: .005em;
  padding: 15px 30px;
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 6px 14px -2px rgba(14,145,217,.5),
    0 2px 6px rgba(14,145,217,.2);
  border: none; cursor: pointer;
  transition: transform .2s var(--ease-spring), box-shadow .35s var(--ease-out), background .35s var(--ease-out);
}
.btn-primary:hover {
  background: var(--gold2);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 12px 24px -4px rgba(14,145,217,.55),
    0 4px 10px rgba(14,145,217,.28);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: rgba(255,255,255,.04);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .94rem;
  padding: 14px 30px;
  border-radius: 9px;
  border: 1.5px solid rgba(255,255,255,.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform .2s var(--ease-spring), border-color .35s, background .35s;
}
.btn-outline:hover {
  border-color: var(--gold-soft);
  background: rgba(108,196,238,.08);
  transform: translateY(-2px);
}
.btn-outline:active { transform: translateY(0); }

.hero-stats {
  display: flex; gap: var(--space-9); margin-top: var(--space-10);
  padding-top: var(--space-7);
  border-top: 1px solid rgba(108,196,238,.15);
  position: relative;
}
.hero-stats::before {
  content: ''; position: absolute; left: 0; top: -1px;
  width: 56px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  font-variation-settings: 'opsz' 96;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.025em;
}
.stat-label {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  color: rgba(255,255,255,.58);
  margin-top: var(--space-2);
  letter-spacing: .04em;
}

.hero-card {
  flex: 0 0 360px;
  background:
    linear-gradient(150deg, rgba(14,145,217,.16) 0%, rgba(14,145,217,.05) 100%);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(108,196,238,.28);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 24px 64px -24px rgba(0,0,0,.5);
}
/* Corner brackets — subtle premium detail */
.hero-card::before, .hero-card::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid var(--gold);
}
.hero-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-top-left-radius: var(--radius-lg); }
.hero-card::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; border-bottom-right-radius: var(--radius-lg); }

.hero-card-title {
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}
.hero-card-items { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); }
.hero-card-items li {
  display: flex; align-items: flex-start; gap: var(--space-3);
  color: rgba(255,255,255,.88);
  font-family: var(--font-body);
  font-size: .92rem;
  line-height: 1.5;
}
.hero-card-items li::before {
  content: '';
  display: inline-flex; flex-shrink: 0;
  width: 18px; height: 18px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  margin-top: 3px;
}
.hero-card-cta { margin-top: var(--space-7); width: 100%; text-align: center; padding: 13px; display: block; }

/* ─── About ─── */
.about { background: var(--offwhite); position: relative; }
.about::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(14,145,217,.05), transparent);
  pointer-events: none;
}
.about > .container { position: relative; }
.about-inner { display: flex; gap: var(--space-11); align-items: center; }

.about-body { color: var(--gray); margin-bottom: var(--space-5); font-family: var(--font-body); font-size: 1.02rem; line-height: 1.75; }

/* ─── Agent Cards ─── */
.agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.agent-card {
  background: var(--white);
  border: 1px solid var(--light-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
  position: relative;
}
.agent-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, var(--gold) 100%);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-3);
}
.agent-card:hover::before { opacity: 1; }

.agent-photo-wrap {
  height: 520px;
  overflow: hidden;
  background: var(--offwhite);
  position: relative;
}
.agent-photo-wrap::after {
  /* Subtle bottom fade for typographic depth (frontend-design: gradient overlay on images) */
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(15,29,51,.06), transparent);
  pointer-events: none;
}
.agent-photo {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 10%;
  transition: transform .8s var(--ease-out);
}
.agent-card:hover .agent-photo { transform: scale(1.03); }
.agent-card:first-child .agent-photo-wrap { background: var(--white); }
.agent-card:first-child .agent-photo { object-fit: contain; object-position: center center; }

.agent-info { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.agent-name { font-size: 1.5rem; color: var(--navy); margin: 0; letter-spacing: -0.018em; }
.agent-title {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.agent-bio {
  color: var(--gray);
  font-family: var(--font-body);
  font-size: .96rem;
  line-height: 1.7;
}
.agent-contact { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--light-2); }
.agent-link {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy);
  transition: color var(--transition), transform .25s var(--ease-out);
  padding: 4px 0;
  display: inline-block;
}
.agent-link:hover { color: var(--gold); transform: translateX(2px); }
.agent-socials { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.social-btn {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1.5px solid var(--light);
  color: var(--navy);
  transition: border-color .35s, background .35s, color .35s, transform .2s var(--ease-spring);
}
.social-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-1px);
}

/* ─── Service Tags ─── */
.service-tags { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-9); justify-content: center; }
.service-tag {
  background: var(--white);
  border: 1px solid var(--light-2);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-1);
  transition: transform .25s var(--ease-spring), box-shadow .35s, border-color .35s, color .35s;
  letter-spacing: .005em;
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.service-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(14,145,217,.15);
}
.service-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--gold-soft);
  color: var(--gold);
}

/* ─── Reviews ─── */
.reviews { background: var(--white); }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-6); }
.review-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  border: 1px solid var(--light-2);
  box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s;
  position: relative;
  overflow: hidden;
}
.review-card::before {
  content: '\201C';
  position: absolute;
  top: -20px; right: 18px;
  font-family: var(--font-display);
  font-size: 7.5rem;
  line-height: 1;
  color: rgba(14,145,217,.08);
  font-weight: 500;
  pointer-events: none;
}
.review-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-3px);
  border-color: var(--light);
}
.review-stars { color: var(--gold); font-size: .95rem; letter-spacing: 3px; margin-bottom: var(--space-4); position: relative; z-index: 1; }
.review-text {
  color: var(--text);
  font-family: var(--font-body);
  font-size: .96rem;
  line-height: 1.7;
  margin-bottom: var(--space-5);
  font-style: normal;
  position: relative;
  z-index: 1;
}
.review-author { display: flex; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--light-2); position: relative; z-index: 1; }
.review-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-soft); font-weight: 600;
  font-family: var(--font-display); font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.review-name { font-family: var(--font-body); font-weight: 600; font-size: .92rem; color: var(--navy); }
.review-date { font-family: var(--font-body); font-size: .78rem; color: var(--gray-2); }
.reviews-cta { text-align: center; margin-top: var(--space-9); }
.reviews-cta a {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 0;
  border-bottom: 1.5px solid currentColor;
  transition: gap .25s var(--ease-out);
}
.reviews-cta a:hover { gap: 12px; }

/* ─── Blog ─── */
.blog { background: var(--offwhite); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-7); }
.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--light-2);
  box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-2); transform: translateY(-4px); }
.blog-card-thumb {
  height: 180px;
  background:
    radial-gradient(circle at 30% 30%, rgba(14,145,217,.35) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy) 0%, #2a4a80 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem; color: rgba(255,255,255,.32);
  position: relative; overflow: hidden;
}
.blog-card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: .15; mix-blend-mode: overlay;
}
.blog-card-thumb-label {
  position: absolute; bottom: 14px; left: 16px; z-index: 2;
  background: var(--white); color: var(--navy);
  font-family: var(--font-body);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.blog-card-body { padding: var(--space-7); display: flex; flex-direction: column; flex: 1; }
.blog-card-meta {
  font-family: var(--font-body);
  font-size: .78rem;
  color: var(--gray-2);
  margin-bottom: var(--space-3);
  letter-spacing: .03em;
}
.blog-card h3 {
  font-size: 1.18rem;
  color: var(--navy);
  margin-bottom: var(--space-3);
  letter-spacing: -0.012em;
  font-weight: 600;
}
.blog-card p {
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: var(--space-5);
  flex: 1;
}
.blog-card-link {
  font-family: var(--font-body);
  font-size: .86rem; font-weight: 600;
  color: var(--gold);
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .25s var(--ease-out);
}
.blog-card-link:hover { gap: 10px; text-decoration: none; }

/* ─── Lead Banner ─── */
.lead-banner {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(14,145,217,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(108,196,238,.12) 0%, transparent 50%),
    linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 50%, #1e3a6b 100%);
  padding: var(--space-11) 0;
  position: relative;
  overflow: hidden;
}
.lead-banner::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .1; mix-blend-mode: overlay;
}
.lead-banner-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; }
.lead-banner-text h2 {
  color: var(--white);
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
  font-weight: 500;
}
.lead-banner-text p {
  color: rgba(255,255,255,.78);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 500px;
}
.lead-banner a.btn-primary { display: inline-block; white-space: nowrap; }

/* ─── Footer ─── */
footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.68);
  padding: var(--space-10) 0 var(--space-7);
  position: relative;
}
footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14,145,217,.4), transparent);
}
.footer-inner { display: flex; gap: var(--space-9); flex-wrap: wrap; justify-content: space-between; margin-bottom: var(--space-9); }
.footer-brand p { font-family: var(--font-body); font-size: .9rem; margin-top: var(--space-3); max-width: 280px; line-height: 1.65; color: rgba(255,255,255,.55); }
.footer-col h4 {
  color: var(--white);
  font-size: .82rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col ul li a {
  font-family: var(--font-body);
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  transition: color var(--transition), transform .25s var(--ease-out);
  display: inline-block;
}
.footer-col ul li a:hover { color: var(--gold-soft); transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: var(--space-6);
  display: flex; justify-content: space-between;
  font-family: var(--font-body); font-size: .82rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap; gap: var(--space-2);
}

.footer-socials { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.footer-socials a {
  color: rgba(255,255,255,.5);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform .2s var(--ease-spring);
}
.footer-socials a:hover {
  color: var(--white);
  border-color: var(--gold);
  background: rgba(14,145,217,.15);
  transform: translateY(-2px);
}
.footer-brokerage {
  display: flex; align-items: center; gap: var(--space-4);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--space-6) 0 var(--space-4);
  font-family: var(--font-body); font-size: .82rem; color: rgba(255,255,255,.45);
}

/* ─── Quiz Page ─── */
.quiz-hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(14,145,217,.18) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 50%, #1e3a6b 100%);
  padding: 140px 0 var(--space-10); text-align: center;
  position: relative; overflow: hidden;
}
.quiz-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .1; mix-blend-mode: overlay; pointer-events: none;
}
.quiz-hero > * { position: relative; }
.quiz-hero .section-label { color: var(--gold-soft); justify-content: center; }
.quiz-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
  font-weight: 500;
}
.quiz-hero p {
  color: rgba(255,255,255,.78);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

.quiz-wrap { max-width: 720px; margin: 0 auto; padding: var(--space-10) var(--space-6) var(--space-11); }
.quiz-progress-bar {
  width: 100%; height: 6px;
  background: var(--light-2);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-9);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15,29,51,.06);
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold2) 100%);
  border-radius: var(--radius-pill);
  transition: width .6s var(--ease-out);
  box-shadow: 0 0 12px rgba(14,145,217,.4);
}
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: fadeIn .5s var(--ease-out); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.quiz-q-num {
  font-family: var(--font-body);
  font-size: .78rem; font-weight: 700;
  color: var(--gold);
  letter-spacing: .16em; text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.quiz-q-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  color: var(--navy);
  margin-bottom: var(--space-7);
  letter-spacing: -0.018em;
  font-weight: 500;
  line-height: 1.25;
}
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.quiz-opt {
  background: var(--white);
  border: 1.5px solid var(--light);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: .94rem; color: var(--text);
  transition: border-color .25s, background .25s, transform .2s var(--ease-spring), box-shadow .3s;
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 64px;
  box-shadow: var(--shadow-1);
}
.quiz-opt:hover {
  border-color: var(--gold-soft);
  background: linear-gradient(180deg, var(--white), #fafdff);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.quiz-opt.selected {
  border-color: var(--gold);
  background: linear-gradient(180deg, #f0f9fe, #e8f4fc);
  box-shadow: 0 0 0 3px rgba(14,145,217,.15), var(--shadow-1);
}
.quiz-opt-icon { font-size: 1.4rem; flex-shrink: 0; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-8); }
.btn-back {
  background: none;
  border: 1.5px solid var(--light);
  color: var(--gray);
  font-family: var(--font-body);
  font-size: .9rem; font-weight: 500;
  padding: 12px 24px; border-radius: 8px;
  cursor: pointer;
  transition: border-color .25s, color .25s, transform .2s var(--ease-spring);
}
.btn-back:hover { border-color: var(--navy); color: var(--navy); transform: translateX(-2px); }

.btn-primary[disabled] {
  opacity: .5; cursor: not-allowed; pointer-events: none;
  box-shadow: none;
}

.quiz-lead-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--light-2);
  box-shadow: var(--shadow-2);
}
.quiz-lead-form h3 {
  color: var(--navy);
  font-size: 1.4rem;
  margin-bottom: var(--space-2);
  letter-spacing: -0.015em;
}
.quiz-lead-form p {
  color: var(--gray);
  font-family: var(--font-body);
  font-size: .94rem;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}
.form-group { margin-bottom: var(--space-4); }
.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: .82rem; font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-2);
  letter-spacing: .01em;
}
.form-group input {
  width: 100%; padding: 13px 16px;
  border: 1.5px solid var(--light);
  border-radius: 9px;
  font-size: .96rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color .25s, box-shadow .25s, background .25s;
  outline: none;
  min-height: 48px;
}
.form-group input::placeholder { color: var(--gray-2); }
.form-group input:hover { border-color: var(--gold-soft); }
.form-group input:focus {
  border-color: var(--gold);
  background: #fafdff;
  box-shadow: 0 0 0 3px rgba(14,145,217,.15);
}

.quiz-result { text-align: center; padding: var(--space-9) 0; }
.result-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: var(--white);
  font-size: 2.8rem;
  width: 92px; height: 92px;
  border-radius: 50%;
  margin-bottom: var(--space-5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    0 16px 32px -8px rgba(15,29,51,.3);
  position: relative;
}
.result-badge::after {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(14,145,217,.3);
}
.result-neighborhood {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: var(--space-3);
  letter-spacing: -0.022em;
  font-weight: 500;
}
.result-why {
  color: var(--gray);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto var(--space-8);
}
.result-details {
  background: var(--white);
  border: 1px solid var(--light-2);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  text-align: left;
  margin-bottom: var(--space-7);
  box-shadow: var(--shadow-1);
}
.result-details h4 {
  color: var(--navy);
  margin-bottom: var(--space-4);
  font-size: 1.05rem;
  letter-spacing: -0.012em;
}
.result-features { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.result-features li {
  font-family: var(--font-body);
  font-size: .94rem;
  color: var(--text);
  padding-left: var(--space-7);
  position: relative;
  line-height: 1.55;
}
.result-features li::before {
  content: '';
  position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px;
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.result-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ─── Blog Post (extends styles in blog page <style>) ─── */
.blog-post-hero {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(14,145,217,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(58,174,232,.12) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 50%, #1e3a6b 100%) !important;
  position: relative;
  overflow: hidden;
}
.blog-post-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .1; mix-blend-mode: overlay; pointer-events: none;
}
.blog-post-hero > .container { position: relative; z-index: 1; }

/* Stat-cards in blog (override loaded inline style w/ stronger spec) */
.blog-post-body .stat-card {
  background: var(--white) !important;
  border-radius: var(--radius-lg) !important;
  padding: var(--space-7) !important;
  border: 1px solid var(--light-2) !important;
  border-left: 4px solid var(--gold) !important;
  box-shadow: var(--shadow-1);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.blog-post-body .stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.blog-post-body .stat-card-num { font-family: var(--font-display); letter-spacing: -0.022em; }

.blog-post-body .blog-section h2 { font-family: var(--font-display); letter-spacing: -0.018em; }
.blog-post-body .rate-table th { background: var(--navy); }
.blog-post-body .blog-cta {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(14,145,217,.2) 0%, transparent 50%),
    linear-gradient(120deg, var(--navy-deep), #1e3a6b) !important;
  box-shadow: var(--shadow-2);
}

/* Guide page extras */
.guide-hero {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(14,145,217,.2) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(58,174,232,.12) 0%, transparent 60%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 50%, #1e3a6b 100%) !important;
  position: relative;
}
.guide-hero h1 span {
  background: linear-gradient(105deg, #8fd4f5 0%, var(--gold-soft) 35%, var(--gold2) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.guide-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .1; mix-blend-mode: overlay; pointer-events: none;
}
.guide-hero-inner { position: relative; z-index: 1; }
.guide-card { box-shadow: var(--shadow-3) !important; border-radius: var(--radius-lg) !important; }
.guide-inside { border-radius: var(--radius-lg) !important; }
.guide-submit {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 6px 14px -2px rgba(14,145,217,.5),
    0 2px 6px rgba(14,145,217,.2) !important;
  transition: transform .2s var(--ease-spring), box-shadow .35s var(--ease-out), background .35s var(--ease-out) !important;
}
.guide-submit:hover { transform: translateY(-2px); box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 12px 24px -4px rgba(14,145,217,.55),
    0 4px 10px rgba(14,145,217,.28) !important; }

/* ─── Responsive ─── */
@media (max-width: 960px) {
  nav { padding: 0 var(--space-5); }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .hero-inner { flex-direction: column; gap: var(--space-9); padding: var(--space-9) 0; }
  .hero-card { flex: none; width: 100%; max-width: 460px; }
  .about-inner { flex-direction: column; gap: var(--space-9); }
  .lead-banner-inner { flex-direction: column; align-items: flex-start; text-align: left; }
  .lead-banner-text p { margin-bottom: var(--space-2); }
  .quiz-options { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .agent-photo-wrap { height: 320px; }
}
@media (max-width: 640px) {
  .section { padding: var(--space-10) 0; }
  .container { padding: 0 var(--space-5); }
  .hero-stats { gap: var(--space-6); margin-top: var(--space-9); flex-wrap: wrap; }
  .stat-num { font-size: 1.85rem; }
  .footer-inner { flex-direction: column; gap: var(--space-7); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero-card { padding: var(--space-6); }
  .review-card { padding: var(--space-6); }
}
