/* ==========================================================================
   Homes For Sale TX — Kay Huffman
   Shared site styles (dynamic / premium)
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #1a2b4a;
  --navy-dark: #0f1d33;
  --navy-deep: #07101f;
  --gold: #b8924a;
  --gold-light: #d4af6d;
  --gold-bright: #e8c478;
  --cream: #faf7f2;
  --text: #2c2c2c;
  --text-light: #666;
  --border: #e8e4dc;
  --green: #2d5d3a;
  --green-light: #4a8a5d;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.2; }
::selection { background: var(--gold); color: #fff; }

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

/* ===== LOADING SCREEN ===== */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--navy-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  color: #fff;
}
#loader.gone { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem; font-weight: 800; letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.loader-mark .gold { color: var(--gold-bright); }
.loader-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; color: var(--gold-light);
  letter-spacing: 4px; text-transform: uppercase;
  margin-bottom: 28px;
}
.loader-bar {
  width: 220px; height: 2px;
  background: rgba(212,175,109,0.15);
  position: relative; overflow: hidden;
}
.loader-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  animation: loaderSweep 1.2s ease-in-out infinite;
}
@keyframes loaderSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(220px); }
}

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,29,51,0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(212,175,109,0.12);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
header.transparent {
  background: rgba(15,29,51,0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(15,29,51,0.95);
  border-bottom: 1px solid rgba(212,175,109,0.18);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
nav {
  max-width: 1280px; margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700;
  color: #fff; text-decoration: none;
  letter-spacing: 0.3px;
}
.logo .gold { color: var(--gold-bright); }
.logo .small {
  font-size: 0.68rem; display: block;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.6);
  font-family: 'JetBrains Mono', monospace; font-weight: 500;
  margin-top: -2px;
}
.nav-links {
  display: flex; gap: 32px; list-style: none; align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  font-weight: 500; font-size: 0.92rem;
  transition: color 0.2s; position: relative;
}
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--gold-bright);
  transition: width 0.3s ease;
}
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-links a:hover { color: var(--gold-bright); }
.nav-links a.active { color: var(--gold-bright); }
.nav-links a.active::after { width: 100%; }
.nav-cta {
  background: var(--gold); color: var(--navy-deep) !important;
  padding: 11px 20px; border-radius: 4px;
  font-weight: 600;
  transition: all 0.25s;
  box-shadow: 0 4px 14px rgba(184,146,74,0.35);
}
.nav-cta:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(184,146,74,0.5);
}
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #fff; }

/* ===== AMBIENT CANVAS BG ===== */
#particles {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* ===== PAGE HEADER (sub-pages) ===== */
.page-hero {
  min-height: 60vh;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; padding: 160px 24px 80px;
  background: var(--navy-deep);
  text-align: center;
}
.page-hero .hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.55) saturate(0.85) contrast(1.05);
  transform: scale(1.05);
  will-change: transform;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(7,16,31,0.85), rgba(15,29,51,0.92));
}
.page-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212,175,109,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,109,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6), transparent 70%);
}
.page-hero-content { position: relative; z-index: 2; max-width: 900px; }
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(212,175,109,0.1);
  border: 1px solid rgba(212,175,109,0.35);
  color: var(--gold-bright);
  padding: 8px 20px; border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 2.5px;
  margin-bottom: 24px;
}
.page-eyebrow::before {
  content: ''; width: 6px; height: 6px;
  background: var(--gold-bright); border-radius: 50%;
  box-shadow: 0 0 12px var(--gold-bright);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  margin-bottom: 20px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.page-hero h1 .gold { color: var(--gold-bright); }
.page-hero p {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255,255,255,0.9);
  max-width: 720px; margin: 0 auto 32px;
  line-height: 1.7;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 16px 30px; border-radius: 4px;
  text-decoration: none; font-weight: 600; font-size: 0.97rem;
  transition: all 0.3s cubic-bezier(.2,.9,.3,1.4);
  display: inline-flex; align-items: center; gap: 10px;
  border: none; cursor: pointer;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}
.btn:hover::before { width: 400px; height: 400px; }
.btn > * { position: relative; z-index: 1; }
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 6px 20px rgba(184,146,74,0.4); }
.btn-primary:hover { background: var(--gold-bright); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(184,146,74,0.55); }
.btn-secondary { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: #fff; color: var(--navy); border-color: #fff; transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(26,43,74,0.3); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 20px rgba(45,93,58,0.35); }
.btn-green:hover { background: #1e4128; transform: translateY(-3px); box-shadow: 0 12px 28px rgba(45,93,58,0.5); }

/* ===== SECTIONS ===== */
section { padding: 110px 24px; position: relative; }
.container { max-width: 1280px; margin: 0 auto; position: relative; z-index: 2; }
.container-narrow { max-width: 920px; margin: 0 auto; position: relative; z-index: 2; }

.section-mark {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--gold);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
}
.section-mark::before, .section-mark::after {
  content: ''; flex: 0 0 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section-mark.left { justify-content: flex-start; }
.section-mark.left::before { display: none; }

.section-title { text-align: center; margin-bottom: 70px; }
.section-title h2 {
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  color: var(--navy); margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.section-title p {
  color: var(--text-light); font-size: 1.1rem;
  max-width: 740px; margin: 0 auto;
  line-height: 1.7;
}

/* ===== CARDS ===== */
.card {
  background: #fff; padding: 36px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(.2,.9,.3,1.2);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(26,43,74,0.15);
  border-color: var(--gold);
}
.card .card-icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.card .card-tag {
  color: var(--gold); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 2px;
  font-weight: 600; margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.card h3 { color: var(--navy); font-size: 1.4rem; margin-bottom: 12px; }
.card p { color: var(--text-light); margin-bottom: 16px; font-size: 0.97rem; line-height: 1.7; }
.card ul { list-style: none; margin: 0 0 8px; }
.card li { padding: 6px 0 6px 24px; position: relative; font-size: 0.93rem; }
.card li::before {
  content: '✓'; position: absolute; left: 0; top: 6px;
  color: var(--gold); font-weight: 700;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(184,146,74,0.12); border-radius: 50%;
  font-size: 0.65rem;
}

/* ===== STAT BLOCKS ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px; max-width: 1080px; margin: 50px auto 0;
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: var(--gold-bright);
  font-weight: 800;
  line-height: 1; display: block; margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(212,175,109,0.3);
}
.stat-num .plus { font-size: 0.7em; vertical-align: super; }
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem; opacity: 0.8;
  text-transform: uppercase; letter-spacing: 2px;
  color: rgba(255,255,255,0.85);
}
.stats-row.light .stat-num { color: var(--gold); text-shadow: none; }
.stats-row.light .stat-label { color: var(--text-light); }

/* ===== DARK SECTION ===== */
.section-dark {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #fff;
  position: relative; overflow: hidden;
}
.section-dark::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212,175,109,0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212,175,109,0.1), transparent 50%);
  pointer-events: none;
}
.section-dark::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212,175,109,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,109,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.section-dark .section-title h2 { color: #fff; }
.section-dark .section-title p { color: rgba(255,255,255,0.85); }
.section-dark .section-mark { color: var(--gold-bright); }

/* ===== STEP / PROCESS LIST ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px; margin-top: 40px;
}
.step {
  background: #fff; padding: 36px 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: all 0.4s cubic-bezier(.2,.9,.3,1.2);
}
.step:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(26,43,74,0.12);
  border-color: var(--gold);
}
.step .step-num {
  font-family: 'Playfair Display', serif;
  font-size: 3rem; color: var(--gold); font-weight: 800;
  line-height: 1; opacity: 0.4;
  margin-bottom: 16px;
}
.step h4 { color: var(--navy); font-size: 1.2rem; margin-bottom: 10px; }
.step p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }

/* ===== FAQ ===== */
.faq-list { max-width: 880px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; padding: 8px 0;
  color: var(--navy); font-family: 'Playfair Display', serif;
  font-size: 1.15rem; font-weight: 600;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--gold); }
.faq-q::after {
  content: '+'; font-size: 1.6rem; color: var(--gold);
  transition: transform 0.3s; flex-shrink: 0;
  font-family: 'Inter', sans-serif; font-weight: 300;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--text-light); line-height: 1.8;
}
.faq-item.open .faq-a {
  max-height: 600px; padding: 12px 0 8px;
}

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: #fff; text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 50% 0%, rgba(212,175,109,0.2), transparent 60%);
  pointer-events: none;
}
.cta-section h2 {
  color: #fff;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  margin-bottom: 18px;
}
.cta-section .lead {
  font-size: 1.15rem; margin-bottom: 44px;
  opacity: 0.92; max-width: 640px; margin: 0 auto 44px;
  line-height: 1.7;
}
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer {
  background: var(--navy-deep); color: rgba(255,255,255,0.75);
  padding: 70px 24px 30px;
  position: relative; overflow: hidden;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 50px;
}
.footer-brand .logo { color: #fff; font-size: 1.5rem; }
.footer-brand p { margin-top: 18px; font-size: 0.9rem; line-height: 1.85; color: rgba(255,255,255,0.65); }
.footer-col h4 {
  color: #fff; font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem; margin-bottom: 18px;
  text-transform: uppercase; letter-spacing: 3px; font-weight: 500;
}
.footer-col h4::before { content: '// '; color: var(--gold); }
.footer-col ul { list-style: none; }
.footer-col li { padding: 6px 0; }
.footer-col a {
  color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 0.93rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--gold-bright); }
.footer-legal {
  max-width: 1280px; margin: 0 auto;
  padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; align-items: stretch; gap: 20px;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}
.footer-legal a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-legal a:hover { color: var(--gold-bright); }
.disclosure-box {
  padding: 24px 28px; background: rgba(255,255,255,0.04);
  border-radius: 8px; font-size: 0.82rem; line-height: 1.75;
  border: 1px solid rgba(255,255,255,0.06);
}
.disclosure-box strong {
  color: rgba(255,255,255,0.92); display: block; margin-bottom: 6px;
  font-family: 'Playfair Display', serif; font-size: 0.95rem;
}
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 16px; padding-top: 12px;
}

/* ===== FLOATING CTAs ===== */
.floating-ctas {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 12px; z-index: 500;
}
.floating-btn {
  background: var(--gold); color: #fff;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.4rem;
  box-shadow: 0 8px 20px rgba(184,146,74,0.4);
  transition: all 0.3s cubic-bezier(.2,.9,.3,1.4);
  position: relative;
}
.floating-btn::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--gold);
  opacity: 0; animation: floatPulse 2s ease-in-out infinite;
}
@keyframes floatPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.floating-btn.call { background: var(--navy); box-shadow: 0 8px 20px rgba(26,43,74,0.4); }
.floating-btn.call::before { border-color: var(--navy); }
.floating-btn:hover { transform: scale(1.12) translateY(-2px); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.9,.3,1.1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }
.reveal.delay-6 { transition-delay: 0.6s; }

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.bg-cream { background: var(--cream); }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 18px;
    background: rgba(15,29,51,0.97); backdrop-filter: blur(20px);
    padding: 28px;
    border-top: 1px solid rgba(212,175,109,0.18);
  }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
  header { background: rgba(15,29,51,0.92); backdrop-filter: blur(18px); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  section { padding: 70px 20px; }
  .page-hero { padding: 120px 20px 60px; min-height: auto; }
  .floating-ctas { bottom: 16px; right: 16px; }
  .floating-btn { width: 50px; height: 50px; font-size: 1.2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
