/* America's Historic Towns — dark heritage design system */
:root {
  --heritage-primary: #78350F;
  --heritage-primary-soft: #92400E;
  --heritage-accent: #D97706;
  --heritage-accent-dark: #B45309;
  --heritage-highlight: #FBBF24;
  --heritage-bg: #1C1917;
  --heritage-surface: #292524;
  --heritage-surface-raised: #3D3835;
  --heritage-muted-bg: #231F1C;
  --heritage-fg: #FFFBEB;
  --heritage-muted: #A8A29E;
  --heritage-border: rgba(217, 119, 6, 0.2);
  --heritage-radius: 18px;
  --heritage-radius-sm: 10px;
  --heritage-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  --heritage-shadow-accent: 0 12px 36px rgba(217, 119, 6, 0.18);
}

html { scroll-behavior: smooth; background: var(--heritage-bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--heritage-bg) !important;
  color: var(--heritage-fg) !important;
  font-family: var(--font-primary, 'Plus Jakarta Sans', system-ui, sans-serif);
}

h1, h2, h3, h4, h5, h6,
.heritage_section_title, .heritage_hero_title, .display-4, .display-5 {
  font-family: var(--font-accent, 'Lora', Georgia, serif);
  color: var(--heritage-fg) !important;
}

.text-muted { color: var(--heritage-muted) !important; }
.text-secondary { color: #A8A29E !important; }

.heritage_hero_kicker {
  color: var(--heritage-accent) !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

/* Header */
.header-heritage {
  background: rgba(5, 21, 32, 0.94) !important;
  border-bottom: 2px solid var(--heritage-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease;
}

.header-heritage.scrolled {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.navbar-heritage { padding: 0.9rem 0; }

.navbar-inner-heritage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-heritage {
  font-family: var(--font-accent, 'Lora', Georgia, serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--heritage-fg) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-heritage:hover { color: var(--heritage-accent) !important; }

.brand-heritage-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--heritage-primary), var(--heritage-accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--heritage-fg);
  font-size: 1.1rem;
}

.nav-links-heritage {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link-heritage {
  color: #D6D3D1 !important;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-link-heritage:hover,
.nav-link-heritage:focus-visible {
  color: var(--heritage-accent) !important;
}

.nav-desktop-heritage { display: none; }

@media (min-width: 992px) {
  .nav-desktop-heritage { display: flex; }
  .hamburger-heritage { display: none !important; }
}

.hamburger-heritage {
  width: 44px;
  height: 44px;
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius-sm);
  background: var(--heritage-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.hamburger-heritage span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--heritage-fg);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-heritage.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-heritage.active span:nth-child(2) { opacity: 0; }
.hamburger-heritage.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-heritage {
  position: fixed;
  inset: 0;
  z-index: 1040;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-heritage.open {
  pointer-events: auto;
  opacity: 1;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 21, 32, 0.75);
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--heritage-surface);
  border-left: 1px solid var(--heritage-border);
  padding: 5rem 1.5rem 2rem;
}

.mobile-nav-panel .nav-links-heritage {
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
}

/* Hero */
.hero-heritage-wrap {
  padding: 4.5rem 0 5rem;
  background:
    radial-gradient(1000px 520px at 6% 0%, rgba(120, 53, 15, 0.45), transparent 58%),
    radial-gradient(900px 480px at 94% 10%, rgba(217, 119, 6, 0.14), transparent 52%),
    var(--heritage-bg);
}

.heritage_hero_title {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.12;
  margin-bottom: 0.75rem;
}

.hero-heritage-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #E7E5E4;
  max-width: 38rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.btn-heritage-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--heritage-primary), var(--heritage-accent-dark));
  color: var(--heritage-fg) !important;
  font-weight: 700;
  border-radius: var(--heritage-radius-sm);
  text-decoration: none;
  border: none;
  box-shadow: var(--heritage-shadow-accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-heritage-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(217, 119, 6, 0.28);
  color: var(--heritage-fg) !important;
}

.btn-heritage-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: transparent;
  color: var(--heritage-accent) !important;
  font-weight: 700;
  border: 2px solid var(--heritage-accent);
  border-radius: var(--heritage-radius-sm);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-heritage-outline:hover {
  background: rgba(217, 119, 6, 0.12);
  color: var(--heritage-highlight) !important;
}

.hero-heritage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.hero-heritage-main { grid-column: 1 / -1; }

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--heritage-radius);
  border: 1px solid var(--heritage-border);
}

.hero-heritage-main .hero-img { min-height: 280px; }
.hero-heritage-sub .hero-img { min-height: 140px; }

/* Cards */
.heritage-card {
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius);
  padding: 1.5rem;
  height: 100%;
  box-shadow: var(--heritage-shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.heritage-card:hover {
  border-color: rgba(217, 119, 6, 0.45);
  transform: translateY(-3px);
}

.heritage-card-accent {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--heritage-accent), var(--heritage-primary));
  border-radius: 2px;
  margin-bottom: 1rem;
}

.service-card-heritage {
  background: var(--heritage-surface-raised);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius);
  padding: 1.75rem;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card-heritage:hover {
  border-color: var(--heritage-accent);
  box-shadow: var(--heritage-shadow-accent);
}

.service-icon-heritage {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(120, 53, 15, 0.35);
  color: var(--heritage-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.service-link-heritage,
.blog-link-heritage {
  color: var(--heritage-accent) !important;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.service-link-heritage:hover,
.blog-link-heritage:hover {
  color: var(--heritage-highlight) !important;
  text-decoration: underline;
}

.blog-card-heritage {
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease;
}

.blog-card-heritage:hover { border-color: var(--heritage-accent); }

/* Leadgen & forms */
.leadgen-heritage {
  background: var(--heritage-muted-bg);
  border-top: 1px solid var(--heritage-border);
  border-bottom: 1px solid var(--heritage-border);
}

.leadgen-form-card,
.contact-form-wrapper,
.about-heritage-card {
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius);
}

.form-control,
.form-select {
  background: var(--heritage-surface-raised) !important;
  border-color: var(--heritage-border) !important;
  color: var(--heritage-fg) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--heritage-accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(217, 119, 6, 0.2) !important;
}

.form-floating > label { color: var(--heritage-muted) !important; }

.btn-leadgen-submit,
.btn-primary {
  background: linear-gradient(135deg, var(--heritage-primary), var(--heritage-accent-dark)) !important;
  border: none !important;
  color: var(--heritage-fg) !important;
  font-weight: 700;
  border-radius: var(--heritage-radius-sm) !important;
  cursor: pointer;
}

.btn-leadgen-submit:hover,
.btn-primary:hover {
  filter: brightness(1.08);
}

/* About & team */
.about-heritage-card { padding: 1.25rem; }

.team-card-heritage {
  text-align: center;
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius);
  padding: 1.5rem;
}

.team-card-heritage img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--heritage-accent);
}

/* Article */
.article-container { max-width: 820px; }

.blog-article h1 { margin-bottom: 1.25rem; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--heritage-muted);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--heritage-border);
}

.blog-article h2 { margin-top: 2rem; margin-bottom: 0.85rem; font-size: 1.45rem; }
.blog-article h3 { margin-top: 1.5rem; margin-bottom: 0.65rem; font-size: 1.15rem; color: var(--heritage-accent) !important; }
.blog-article p { line-height: 1.75; margin-bottom: 1rem; color: #E7E5E4; }
.blog-article ul { margin-bottom: 1rem; padding-left: 1.25rem; color: #D6D3D1; }
.blog-article li { margin-bottom: 0.45rem; }

/* Contact */
.info-card {
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-radius: var(--heritage-radius-sm);
  color: var(--heritage-fg);
}

.info-card a { color: var(--heritage-accent) !important; }

.map-embed-heritage {
  border-radius: var(--heritage-radius);
  overflow: hidden;
  border: 1px solid var(--heritage-border);
  aspect-ratio: 16 / 9;
}

.map-embed-heritage iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.accordion-item {
  background: var(--heritage-surface) !important;
  border-color: var(--heritage-border) !important;
}

.accordion-button {
  background: var(--heritage-surface-raised) !important;
  color: var(--heritage-fg) !important;
}

.accordion-button:not(.collapsed) {
  background: rgba(120, 53, 15, 0.35) !important;
  color: var(--heritage-accent) !important;
}

.accordion-body { color: #D6D3D1 !important; }

/* Disclaimer */
.heritage-disclaimer-section {
  background: var(--heritage-muted-bg);
  border-top: 1px solid var(--heritage-border);
  padding: 2.5rem 0;
}

.heritage-disclaimer-card {
  background: var(--heritage-surface);
  border: 1px solid var(--heritage-border);
  border-left: 4px solid var(--heritage-accent);
  border-radius: var(--heritage-radius);
  padding: 1.75rem 2rem;
}

.heritage-disclaimer-title { color: var(--heritage-accent) !important; }

.disclaimer-text p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--heritage-muted);
  margin-bottom: 0.85rem;
}

/* Footer */
.footer-heritage {
  background: #141210;
  border-top: 2px solid var(--heritage-border);
}

.footer-heritage .brand-name { color: var(--heritage-fg) !important; }
.footer-heritage .column-title { color: var(--heritage-accent) !important; font-weight: 700; }
.footer-heritage .brand-description,
.footer-heritage .footer-links a,
.footer-heritage .contact-text { color: var(--heritage-muted) !important; }

.footer-heritage .footer-links a {
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.footer-heritage .footer-links a:hover { color: var(--heritage-accent) !important; }

.footer-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--heritage-primary), var(--heritage-accent), var(--heritage-primary));
  border-radius: 2px;
  margin-bottom: 2rem;
}

.footer-heritage .link-icon { color: var(--heritage-accent); font-size: 0.75rem; margin-left: 0.35rem; }

.copyright-text { color: #78716C !important; font-size: 0.85rem; }

/* Legal */
.legal-page-wrap { max-width: 860px; }
.legal-content h1 { font-size: 1.85rem; margin-bottom: 1rem; }
.legal-content h2 { font-size: 1.25rem; margin-top: 1.75rem; color: var(--heritage-accent) !important; }
.legal-content p, .legal-content li { color: #D6D3D1; line-height: 1.7; }

@media (max-width: 991px) {
  .hero-heritage-grid { grid-template-columns: 1fr; }
  .hero-heritage-main .hero-img { min-height: 220px; }
}

@media (max-width: 575px) {
  .heritage_hero_title { font-size: 1.85rem; }
  .hero-cta-row { flex-direction: column; }
  .btn-heritage-primary,
  .btn-heritage-outline { width: 100%; justify-content: center; }
}
