/* ==========================================================================
   ERE CARE Management & Maintenance
   Palette: charcoal + bronze/gold accent (matches real erecare.com brand —
   see NOTES.md "Branding update" section). Variable names kept from the
   original sage/clay palette so the rest of this file didn't need touching.
   Type: Sora (headings, clean modern sans) + Inter (body)
   Layout: split-panel hero, offset stat band, angled divider — mobile-first.
   ========================================================================== */

:root {
  --sage-deep: #333333;
  --sage: #6b6459;
  --sage-mid: #ccc3b0;
  --sage-pale: #f6f2ea;
  --sage-line: #e3ddd0;
  --clay: #96712f;
  --clay-deep: #7a5a22;
  --clay-pale: #f4e8cc;
  --cream: #faf8f3;
  --ink: #2b2620;
  --ink-soft: #5c5648;
  --white: #ffffff;

  --font-head: "Sora", "Segoe UI", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 16px 36px rgba(51, 51, 51, 0.14);
  --shadow-card: 0 6px 18px rgba(51, 51, 51, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--sage-deep);
  line-height: 1.18;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5.5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.8vw, 2.3rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a {
  color: var(--clay-deep);
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sage-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 999;
}
.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--clay-deep);
  margin: 0 0 0.6em;
}
.eyebrow.center { text-align: center; }
h2.center, .section-lede.center { text-align: center; }
.section-lede {
  max-width: 640px;
  font-size: 1.05rem;
}
.section-lede.center { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  min-height: 48px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: var(--font-head);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--clay);
  color: var(--white);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { background: var(--clay-deep); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

.btn-ghost-dark {
  background: transparent;
  color: var(--sage-deep);
  border-color: var(--sage-deep);
}
.btn-ghost-dark:hover { background: var(--sage-deep); color: #fff; }

.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sage-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}

.logo {
  height: 44px;
  width: auto;
  max-width: 120px;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sage-deep);
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-sub {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clay-deep);
}

.main-nav {
  display: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 2px;
}
.main-nav a:hover { color: var(--sage-deep); }

.header-cta {
  display: none;
  align-items: center;
  gap: 16px;
}
.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--sage-deep);
  font-weight: 700;
  min-height: 44px;
  white-space: nowrap;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--sage);
  background: var(--white);
  cursor: pointer;
  padding: 0;
}
.menu-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--sage-deep);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel */
.main-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 1px solid var(--sage-line);
  box-shadow: var(--shadow-soft);
}
.main-nav ul {
  flex-direction: column;
  gap: 0;
  padding: 8px 20px 16px;
}
.main-nav li {
  border-top: 1px solid var(--sage-line);
}
.main-nav a {
  display: block;
  padding: 14px 4px;
  min-height: 44px;
}
.main-nav.is-open { display: block; }

@media (min-width: 900px) {
  .main-nav {
    position: static;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .main-nav ul {
    flex-direction: row;
    padding: 0;
  }
  .main-nav li { border-top: none; }
  .main-nav a { padding: 10px 2px; }
  .header-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* ---------- Hero (split-panel, not a blob-circle hero) ---------- */
.hero {
  position: relative;
  background: var(--sage-deep);
  color: var(--white);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  gap: 0;
  position: relative;
}
.hero-copy {
  padding: 52px 20px 44px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}
.hero-copy .eyebrow { color: var(--clay-pale); opacity: 0.9; }
.hero h1 { color: var(--white); }
.hero-lede {
  font-size: 1.08rem;
  max-width: 54ch;
  color: #e0ded7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 22px;
}
.hero-actions.center { justify-content: center; }
.hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #d6d2c8;
}
.hero-stars { color: var(--clay); letter-spacing: 2px; }

.hero-band {
  background: var(--clay);
  position: relative;
  z-index: 2;
}
.hero-band-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 18px 0;
  justify-content: center;
  text-align: center;
}
.hero-band-item {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hero-band-number { font-size: 1.15rem; }

.hero-diagonal {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 48px;
  background: var(--cream);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 1;
}

/* ---------- Sections ---------- */
.section {
  padding: 60px 0;
}
.section-alt {
  background: var(--sage-pale);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 32px;
  align-items: start;
}
.about-stat-card {
  background: var(--sage-deep);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.about-stat-number {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 700;
  color: var(--clay);
  line-height: 1;
  margin-bottom: 8px;
}
.about-stat-label {
  font-size: 0.95rem;
  color: #e0ded7;
  font-weight: 600;
}
.about-stat-sub {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 0.88rem;
  color: #d6d2c8;
}
.about-points {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}
.about-points li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  color: var(--sage-deep);
}
.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--clay);
}
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

/* ---------- Services (tabs, React island) ---------- */
.services-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 36px 0 8px;
}
.services-tabs__tab {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--sage-mid);
  background: var(--white);
  color: var(--sage-deep);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.services-tabs__tab--active,
.services-tabs__tab:hover {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: var(--white);
}
.services-tabs__panel {
  margin-top: 28px;
}
.services-tabs__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}
.services-tabs__card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--clay);
}
.services-tabs__card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.services-tabs__card p { margin-bottom: 0; font-size: 0.95rem; }

@media (min-width: 640px) {
  .services-tabs__grid { grid-template-columns: 1fr 1fr; }
}

.services-fallback {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}
.services-fallback h3 {
  margin-bottom: 4px;
}
@media (min-width: 640px) {
  .services-fallback { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  gap: 20px;
  margin-top: 36px;
  grid-template-columns: 1fr;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-card);
}
.review-stars {
  color: var(--clay);
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: block;
}
.review-quote {
  font-family: var(--font-head);
  font-size: 1.02rem;
  color: var(--sage-deep);
  line-height: 1.5;
  margin: 0 0 12px;
  font-weight: 600;
}
.review-attribution {
  font-weight: 700;
  color: var(--clay-deep);
  margin: 0;
  font-size: 0.88rem;
}
@media (min-width: 700px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--sage-deep);
  color: var(--white);
}
.cta-band h2 { color: var(--white); }
.cta-band-inner {
  text-align: center;
}
.cta-band-inner p {
  max-width: 480px;
  margin: 0 auto 8px;
  color: #e0ded7;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 40px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 16px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.contact-list svg { color: var(--clay-deep); flex-shrink: 0; }
.contact-list a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.contact-list a:hover { color: var(--sage-deep); }

.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--clay);
}
.contact-form {
  display: grid;
  gap: 14px;
}
.contact-form label {
  font-weight: 700;
  color: var(--sage-deep);
  font-size: 0.92rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--sage-line);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--cream);
  min-height: 44px;
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}
.contact-form button {
  margin-top: 6px;
  justify-self: start;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d3cdbf;
  padding: 40px 0 24px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.logo-footer {
  height: 40px;
  max-width: 100px;
}
.footer-brand .brand-text { color: #fff; font-size: 1.1rem; }
.footer-brand p {
  color: #b3ac9d;
  margin: 4px 0 0;
  width: 100%;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-contact a:hover { color: var(--clay); }
.footer-copyright {
  color: #8f8879;
  font-size: 0.85rem;
  margin: 10px 0 0;
}
@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .footer-copyright {
    width: 100%;
    text-align: center;
    margin-top: 24px;
  }
}
