/* ============================================
   HomeWise Advocate™ — Brand Standards
   ============================================ */

/* ===== Brand Color Variables ===== */
:root {
  --hw-black: #0A0A0A;
  --hw-black-soft: #1A1A1A;
  --hw-gold: #C5A052;
  --hw-gold-light: #D4AF37;
  --hw-gold-dark: #A6842E;
  --hw-cream: #F8F5F0;
  --hw-cream-dark: #EDE8E0;
  --hw-white: #FFFFFF;
  --hw-text: #2A2A2A;
  --hw-text-muted: #6A6A6A;

  /* Typography */
  --hw-serif: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --hw-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --hw-max-width: 1200px;
  --hw-header-height: 80px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--hw-sans);
  color: var(--hw-text);
  background: var(--hw-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--hw-gold-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--hw-gold);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hw-black);
  border-bottom: 1px solid var(--hw-gold-dark);
  height: var(--hw-header-height);
}

.header-container {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo {
  display: block;
  height: 60px;
  width: auto;
}

/* Hide mobile crest logo on desktop */
.header-logo-mobile {
  display: none;
  height: 40px;
  width: 40px;
}

/* ===== Main Navigation ===== */
.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-list a {
  color: var(--hw-cream);
  font-family: var(--hw-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-list a:hover {
  color: var(--hw-gold);
}

/* ===== Mobile Nav Toggle ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--hw-gold);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Mobile Nav Overlay ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hw-black);
  z-index: 1050;
  flex-direction: column;
  padding: 2rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.mobile-logo {
  display: block;
  height: 40px;
  width: 40px;
}

.mobile-nav-close {
  background: transparent;
  border: none;
  color: var(--hw-gold);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-nav-links ul {
  list-style: none;
}

.mobile-nav-links li {
  margin-bottom: 1.5rem;
}

.mobile-nav-links a {
  color: var(--hw-cream);
  font-family: var(--hw-serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.mobile-nav-links a:hover {
  color: var(--hw-gold);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--hw-black) 0%, var(--hw-black-soft) 100%);
  color: var(--hw-cream);
  text-align: center;
  padding: 6rem 2rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hw-gold), transparent);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--hw-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--hw-gold);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.hero h1 sup {
  font-size: 0.4em;
  vertical-align: super;
  font-weight: 400;
}

.tagline {
  font-family: var(--hw-serif);
  font-size: 1.5rem;
  color: var(--hw-cream);
  margin-bottom: 2rem;
  font-style: italic;
}

.tagline sup {
  font-size: 0.5em;
  vertical-align: super;
}

.brand-promise {
  font-size: 1.15rem;
  color: var(--hw-cream-dark);
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.brand-clarity {
  font-family: var(--hw-serif);
  font-size: 1.1rem;
  color: var(--hw-gold);
  font-style: italic;
  opacity: 0.9;
}

/* ===== Section Layout ===== */
.section-container {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 5rem 2rem;
}

section h2 {
  font-family: var(--hw-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--hw-black);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--hw-gold);
  margin: 1rem auto 0;
}

/* ===== Services ===== */
.services {
  background: var(--hw-cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--hw-white);
  padding: 2.5rem 2rem;
  border-radius: 4px;
  border-top: 3px solid var(--hw-gold);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
  font-family: var(--hw-serif);
  font-size: 1.3rem;
  color: var(--hw-black);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--hw-text-muted);
  font-size: 0.95rem;
}

/* ===== About ===== */
.about {
  background: var(--hw-white);
}

.about p {
  font-size: 1.1rem;
  color: var(--hw-text);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

/* ===== Hero Buttons ===== */
.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ===== Contact ===== */
.contact {
  background: var(--hw-black);
  color: var(--hw-cream);
  text-align: center;
}

.contact h2 {
  color: var(--hw-gold);
}

.contact p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: var(--hw-cream-dark);
}

.contact-info {
  margin-bottom: 2.5rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-name {
  font-family: var(--hw-serif);
  font-size: 1.3rem !important;
  color: var(--hw-gold) !important;
  margin-bottom: 1rem !important;
}

.contact-phone a,
.contact-email a,
.contact-web a {
  color: var(--hw-cream);
  transition: color 0.2s ease;
}

.contact-phone a:hover,
.contact-email a:hover,
.contact-web a:hover {
  color: var(--hw-gold);
}

.contact-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 2px solid var(--hw-gold);
  color: var(--hw-gold);
  font-family: var(--hw-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background: var(--hw-gold);
  color: var(--hw-black);
}

.brochure-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 2px solid var(--hw-cream-dark);
  color: var(--hw-cream);
  font-family: var(--hw-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.brochure-button:hover {
  background: var(--hw-cream-dark);
  color: var(--hw-black);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--hw-black-soft);
  color: var(--hw-cream-dark);
  padding: 4rem 0 0;
  border-top: 1px solid var(--hw-gold-dark);
}

.footer-container {
  max-width: var(--hw-max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-logo-link {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-logo {
  display: block;
  height: 54px;
  width: auto;
}

.footer-tagline {
  font-family: var(--hw-serif);
  font-size: 1.1rem;
  color: var(--hw-gold);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.footer-tagline sup {
  font-size: 0.5em;
  vertical-align: super;
}

.footer-promise {
  font-size: 0.9rem;
  color: var(--hw-text-muted);
  max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
  font-family: var(--hw-serif);
  font-size: 1.1rem;
  color: var(--hw-gold);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a,
.footer-contact a {
  color: var(--hw-cream-dark);
  font-size: 0.95rem;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--hw-gold);
}

.footer-contact p {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(197, 160, 82, 0.2);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--hw-text-muted);
}

.footer-bottom sup {
  font-size: 0.6em;
  vertical-align: super;
}

/* ===== Responsive — Tablet (≤ 900px) ===== */
@media (max-width: 900px) {
  .header-logo {
    height: 48px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .hero h1 {
    font-size: 2.8rem;
  }
}

/* ===== Responsive — Mobile (≤ 600px) ===== */
@media (max-width: 600px) {
  .header-container {
    padding: 0 1rem;
  }

  /* Show crest-only on mobile, hide full logo */
  .header-logo {
    display: none;
  }

  .header-logo-mobile {
    display: block;
  }

  /* Hide desktop nav, show hamburger */
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 4rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 1.2rem;
  }

  .brand-promise {
    font-size: 1rem;
  }

  .section-container {
    padding: 3rem 1.5rem;
  }

  section h2 {
    font-size: 1.8rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }

  .footer-logo {
    height: 42px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-buttons .contact-button,
  .hero-buttons .brochure-button {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* ===== Retina / HiDPI Optimization ===== */
@media
  (-webkit-min-device-pixel-ratio: 2),
  (min-resolution: 192dpi) {
  .header-logo,
  .header-logo-mobile,
  .footer-logo,
  .mobile-logo {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
