/* =========================================================================
   SerpaHouses — Site Chrome (Header + Footer)
   Single source of truth for header & footer styling across all pages.

   Falls back to hard-coded values where CSS vars may not be defined,
   ensuring identical rendering across landing, listings, and guides.
   ========================================================================= */

/* ---------- HEADER ---------- */
.site-header {
  border-bottom: 1px solid var(--border, #E8E4DC);
  background: var(--bg, #FBFAF7);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Subtle elevation when the page has been scrolled past the top.
   The .scrolled class is toggled by /assets/js/header.js. */
.site-header.scrolled {
  box-shadow: 0 1px 3px rgba(31, 29, 26, 0.04), 0 4px 16px rgba(31, 29, 26, 0.04);
  border-bottom-color: transparent;
}

.site-header .header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 720px) {
  .site-header .header-inner { padding: 16px 18px; }
}

.site-header .logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--accent, #8C3D2C);
}

.site-header .logo em {
  font-style: normal;
  font-weight: 600;
  color: inherit;
}

.site-header .header-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft, #6B6862);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--border, #E8E4DC);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.site-header .header-cta:hover {
  color: var(--text, #1F1D1A);
  border-color: var(--text, #1F1D1A);
  background: var(--surface, #FFFFFF);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--surface, #FFFFFF);
  color: var(--text-soft, #6B6862);
  margin-top: 0;
  padding: 64px 0 28px;
  border-top: 1px solid var(--border, #E8E4DC);
  text-align: left;
}

.site-footer .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 720px) {
  .site-footer .container { padding: 0 18px; }
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
}

@media (max-width: 900px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 32px; }
  .site-footer .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 540px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.site-footer .footer-brand .logo {
  color: var(--accent, #8C3D2C);
  font-size: 26px;
  margin-bottom: 8px;
  display: inline-block;
  text-decoration: none;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.site-footer .footer-brand .logo em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent, #8C3D2C);
}

.site-footer .footer-tagline {
  font-size: 14px;
  color: var(--text-soft, #6B6862);
  letter-spacing: 0.01em;
  margin: 0;
}

.site-footer .footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute, #908B82);
  margin: 0 0 18px 0;
}

.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer .footer-col li {
  font-size: 14px;
  margin: 0;
}

.site-footer .footer-col a {
  color: var(--text, #1F1D1A);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.18s;
}

.site-footer .footer-col a:hover { color: var(--accent, #8C3D2C); }

.site-footer .footer-bottom {
  max-width: none;
  margin: 0;
  padding-top: 22px;
  border-top: 1px solid var(--border, #E8E4DC);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-mute, #908B82);
  letter-spacing: 0.04em;
  text-align: left;
}

.site-footer .footer-copyright,
.site-footer .footer-al-line,
.site-footer .footer-legal-line {
  font-size: 11px;
  color: var(--text-mute, #908B82);
  letter-spacing: 0.04em;
}

.site-footer .footer-legal-line a {
  color: var(--text-mute, #908B82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.site-footer .footer-legal-line a:hover {
  color: var(--accent, #8C3D2C);
  border-bottom-color: var(--accent, #8C3D2C);
}

.site-footer .footer-al-line .footer-admin-link {
  color: var(--text-mute, #908B82);
  text-decoration: none;
  letter-spacing: 0.2em;
  opacity: 0.5;
  transition: opacity 0.18s, color 0.18s;
}

.site-footer .footer-al-line .footer-admin-link:hover {
  opacity: 1;
  color: var(--accent, #8C3D2C);
}

@media (max-width: 720px) {
  .site-footer .footer-bottom {
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
