/* ============================================================
   Heritage Home Care — Main Stylesheet
   Mobile-First | Heritage Classic Theme
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --mahogany: #4E2A16;
  --mahogany-deep: #3A1D0E;
  --mahogany-light: #6B3A1F;
  --cream: #FDF6EC;
  --cream-warm: #F7EDD8;
  --gold: #B99B37;
  --gold-light: #D4B95E;
  --gold-muted: #A0863A;
  --brass: #C5A34D;
  --charcoal: #2C2C2C;
  --text-body: #3D3027;
  --text-light: #6B5E52;
  --white: #FFFFFF;
  --border-subtle: rgba(78,42,22,0.12);
  --shadow-sm: 0 1px 3px rgba(78,42,22,0.08);
  --shadow-md: 0 4px 16px rgba(78,42,22,0.10);
  --shadow-lg: 0 8px 32px rgba(78,42,22,0.14);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --font-serif: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.3s ease;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text-body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mahogany); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--mahogany-deep);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: 2rem; margin-bottom: 0.6em; }
h2 { font-size: 1.65rem; margin-bottom: 0.5em; }
h3 { font-size: 1.3rem; margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.35em; }

p { margin-bottom: 1.1em; }
ul, ol { margin-bottom: 1.1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.gold-divider {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  border: none;
  margin: 1.2rem auto 1.6rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  min-height: 48px;
  min-width: 48px;
  line-height: 1.3;
}
.btn-primary {
  background: var(--gold);
  color: var(--mahogany-deep);
  border-color: var(--gold);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--mahogany-deep);
}
.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: var(--gold);
}
.btn-outline:hover, .btn-outline:focus {
  background: var(--gold);
  color: var(--mahogany-deep);
}
.btn-dark {
  background: var(--mahogany);
  color: var(--cream);
  border-color: var(--mahogany);
}
.btn-dark:hover, .btn-dark:focus {
  background: var(--mahogany-deep);
  border-color: var(--mahogany-deep);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--mahogany-deep);
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.site-logo .logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mahogany-deep);
  flex-shrink: 0;
}
.site-logo .logo-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}
.header-cta-desktop { display: none; }

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--cream);
  border-radius: 2px;
  position: relative;
  transition: all var(--transition);
}
.hamburger span::before,
.hamburger span::after {
  content: '';
  display: block;
  width: 26px;
  height: 3px;
  background: var(--cream);
  border-radius: 2px;
  position: absolute;
  left: 0;
  transition: all var(--transition);
}
.hamburger span::before { top: -8px; }
.hamburger span::after { top: 8px; }
.hamburger.open span { background: transparent; }
.hamburger.open span::before { top: 0; transform: rotate(45deg); }
.hamburger.open span::after { top: 0; transform: rotate(-45deg); }

/* Mobile Nav */
.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--mahogany-deep);
  padding: 0.5rem 0 1rem;
  box-shadow: var(--shadow-lg);
}
.main-nav.active { display: block; }
.main-nav ul { list-style: none; padding: 0; margin: 0; }
.main-nav li { border-bottom: 1px solid rgba(255,255,255,0.07); }
.main-nav a {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--cream-warm);
  font-size: 1.05rem;
  font-weight: 500;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--gold);
  background: rgba(255,255,255,0.04);
}
.nav-cta-mobile {
  padding: 0.8rem 1.5rem 0.2rem;
}
.nav-cta-mobile .btn { width: 100%; }

/* ============================================================
   HERO SECTIONS
   ============================================================ */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--cream);
  padding: 4rem 0 3.5rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(58,29,14,0.82) 0%, rgba(44,22,10,0.72) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  color: var(--cream);
  font-size: 2.1rem;
  max-width: 600px;
}
.hero .hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--cream-warm);
  max-width: 540px;
  margin-bottom: 1.8rem;
  opacity: 0.92;
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold-muted);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 3.5rem 0;
}
.section-alt {
  background: var(--cream-warm);
}
.section-dark {
  background: var(--mahogany-deep);
  color: var(--cream);
}
.section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--cream);
}
.section-dark .gold-divider { background: var(--gold); }
.section-header {
  margin-bottom: 2.2rem;
}
.section-header h2 {
  font-size: 1.75rem;
}
.section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card-body {
  padding: 1.4rem;
}
.card-body h3 { font-size: 1.15rem; }

/* --- Before/After --- */
.ba-item {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ba-images figure {
  position: relative;
  overflow: hidden;
}
.ba-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.ba-images figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(58,29,14,0.78);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  padding: 0.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ba-description {
  padding: 1.2rem 1.4rem;
}

/* --- Bio / Teaser blocks --- */
.bio-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}
.bio-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--gold);
  box-shadow: var(--shadow-md);
}
.bio-text { text-align: center; }

/* --- Steps / Process --- */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
}
.step-item {
  counter-increment: step-counter;
  position: relative;
  padding: 1.4rem 1.4rem 1.4rem 4rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.2rem;
}
.step-item::before {
  content: counter(step-counter);
  position: absolute;
  left: 1rem;
  top: 1.2rem;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--gold);
  color: var(--mahogany-deep);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.step-item h4 { margin-bottom: 0.3rem; }

/* --- Testimonial / Case Study --- */
.case-study {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.4rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.8rem;
  border-left: 4px solid var(--gold);
}
.case-study .client-name {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--mahogany);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.case-study .client-location {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 0.9rem;
}
.case-study blockquote {
  font-style: italic;
  color: var(--text-light);
  border: none;
  padding: 0;
  margin: 0.8rem 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 1.3rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--mahogany);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-body);
  background: var(--white);
  transition: border-color var(--transition);
  min-height: 48px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185,155,55,0.15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .form-hint {
  font-size: 0.84rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.2rem;
}
.form-consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.form-consent input[type="checkbox"] {
  min-width: 22px;
  min-height: 22px;
  margin-top: 0.15rem;
  accent-color: var(--gold);
}
.form-consent label {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-light);
  line-height: 1.5;
}

/* --- Submission Overlay --- */
.submit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(58,29,14,0.88);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.submit-overlay.active { display: flex; }
.submit-overlay .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(253,246,236,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.2rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit-overlay p {
  color: var(--cream);
  font-size: 1.15rem;
  font-weight: 600;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 9998;
  background: var(--mahogany-deep);
  color: var(--cream);
  padding: 1.4rem 1.25rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner.active { display: block; }
.cookie-banner p {
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cookie-btns .btn { font-size: 0.9rem; padding: 0.65rem 1.3rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--mahogany-deep);
  color: var(--cream-warm);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
}
.footer-col p, .footer-col a {
  font-size: 0.94rem;
  color: var(--cream-warm);
  line-height: 1.65;
}
.footer-col a:hover { color: var(--gold); }
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(247,237,216,0.55);
}

/* ============================================================
   CONFIRMATION PAGE
   ============================================================ */
.confirmation-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}
.confirmation-icon {
  width: 80px;
  height: 80px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.2rem;
  color: var(--mahogany-deep);
}

/* ============================================================
   POLICY PAGES
   ============================================================ */
.policy-content {
  padding: 2.5rem 0 3rem;
}
.policy-content h1 { font-size: 1.85rem; margin-bottom: 1rem; }
.policy-content h2 { font-size: 1.35rem; margin-top: 2rem; }
.policy-content h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.policy-content p, .policy-content li {
  font-size: 0.97rem;
  line-height: 1.75;
}
.policy-meta {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* ============================================================
   MAP
   ============================================================ */
.map-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
}
.map-wrap iframe {
  width: 100%;
  height: 280px;
  border: 0;
}

/* ============================================================
   IMAGE GALLERY / INLINE IMAGES
   ============================================================ */
.inline-img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}
.two-col-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.two-col-gallery img {
  border-radius: var(--radius-md);
  height: 220px;
  object-fit: cover;
  width: 100%;
}

/* ============================================================
   MEDIA QUERIES — TABLET (600px+)
   ============================================================ */
@media (min-width: 600px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.6rem; }
  .hero { padding: 5rem 0 4.5rem; }
  .section { padding: 4.5rem 0; }

  .card-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col-gallery { grid-template-columns: 1fr 1fr; }

  .bio-block { flex-direction: row; text-align: left; }
  .bio-text { text-align: left; }

  .ba-images img { height: 240px; }
  .map-wrap iframe { height: 350px; }
}

/* ============================================================
   MEDIA QUERIES — DESKTOP (960px+)
   ============================================================ */
@media (min-width: 960px) {
  h1 { font-size: 2.85rem; }
  .hero h1 { font-size: 3rem; }
  .hero { min-height: 70vh; padding: 6rem 0 5rem; }
  .section { padding: 5.5rem 0; }
  .section-header h2 { font-size: 2.1rem; }

  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  /* Desktop nav */
  .hamburger { display: none; }
  .main-nav {
    display: flex !important;
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
  }
  .main-nav ul {
    display: flex;
    gap: 0.2rem;
  }
  .main-nav li { border: none; }
  .main-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.94rem;
    white-space: nowrap;
  }
  .nav-cta-mobile { display: none; }
  .header-cta-desktop { display: inline-block; }

  .bio-photo { width: 240px; height: 240px; }
  .map-wrap iframe { height: 420px; }
  .step-item { padding-left: 5rem; }
}
