/* =========================================================
   CRO ENHANCEMENTS, shared across all pages
   Sticky mobile Call/Book bar · hero trust strip · CTA
   microcopy · multi-step assessment form
   Relies on the design tokens (--sage-*, --gold, etc.)
   already defined in each page's <style>.
   ========================================================= */

/* ---------------------------------------------------------
   1. STICKY MOBILE CALL / BOOK BAR
   Injected on every page by cro-enhancements.js.
   Shown only on phones/small tablets where the header
   phone number scrolls out of view.
   --------------------------------------------------------- */
.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;                 /* shown via media query below */
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-top: 1px solid rgba(31, 42, 36, 0.10);
  box-shadow: 0 -6px 20px rgba(31, 42, 36, 0.10);
}
.mobile-cta-bar a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;              /* well over the 44px target */
  border-radius: 12px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.15;
  padding: 8px 10px;
  text-align: center;
}
.mobile-cta-bar svg { width: 20px; height: 20px; flex: none; }
.mobile-cta-bar .mcta-call {
  background: var(--white);
  color: var(--sage-900);
  border: 2px solid var(--sage-500);
}
.mobile-cta-bar .mcta-call:active { background: var(--sage-100); }
.mobile-cta-bar .mcta-book {
  background: var(--gold);
  color: #2A1C0B;
  box-shadow: 0 4px 12px rgba(168, 119, 64, 0.30);
}
.mobile-cta-bar .mcta-book:active { background: var(--gold-dark); color: var(--cream); }

@media (max-width: 820px) {
  .mobile-cta-bar { display: flex; }
  /* keep last content clear of the fixed bar */
  body { padding-bottom: 78px; }
}
@media print {
  .mobile-cta-bar { display: none !important; }
  body { padding-bottom: 0 !important; }
}

/* ---------------------------------------------------------
   2. HERO TRUST STRIP + DUAL CTA + MICROCOPY (home hero)
   --------------------------------------------------------- */
/* Nav CTA: keep it tidy (one clean line) at every width */
.nav a.nav-cta { text-align: center; line-height: 1.2; white-space: nowrap; }

/* Desktop: green nav bar on every page (blends with brand green) */
@media (min-width: 1025px) {
  .header { background: var(--sage-700) !important; border-bottom: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .logo__mark { background: var(--cream) !important; color: var(--sage-700) !important; box-shadow: none !important; }
  .logo__text-top { color: var(--cream) !important; }
  .logo__text-bot { color: rgba(255,255,255,.6) !important; }
  .nav a { color: rgba(255,255,255,.86) !important; }
  .nav a:hover, .nav a.active { background: rgba(255,255,255,.14) !important; color: var(--cream) !important; }
  .nav a.nav-cta { background: var(--cream) !important; color: var(--sage-900) !important; box-shadow: none !important; }
  .nav a.nav-cta:hover { background: #fff !important; color: var(--sage-900) !important; }
}

/* Collapse the primary nav to a menu button below desktop width so the
   full "Free In-Home Assessment" CTA never crowds the bar — applies to
   every page for a consistent nav. */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex !important; }
  .nav {
    position: absolute !important; top: 100% !important; left: 0 !important; right: 0 !important;
    flex-direction: column !important; align-items: stretch !important; gap: 0 !important;
    background: var(--cream) !important; border-bottom: 1px solid rgba(31,42,36,.08) !important;
    padding: 12px !important; display: none !important;
  }
  .nav.open { display: flex !important; }
  .nav a { border-radius: 8px !important; padding: 14px 16px !important; }
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero__cta-note {
  position: relative;
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 42ch;
}
/* Call button used inside hero card, light outline on the sage card */
.btn--call {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
.btn--call:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--cream);
  box-shadow: none;
}
.btn--call svg { transition: none; }
.btn--call:hover svg { transform: none; }

.hero__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 22px 0 4px;
  position: relative;
}
.hero__proof-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
}
.hero__proof-item .hp-stars { display: inline-flex; gap: 1px; color: #FFCB5C; }
.hero__proof-item .hp-stars svg { width: 16px; height: 16px; }
.hero__proof-item svg.hp-icon { width: 17px; height: 17px; color: #F2E0C2; flex: none; }
.hero__proof-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.28);
}
@media (max-width: 720px) {
  .hero__proof-sep { display: none; }
  .hero__proof { gap: 8px 14px; margin-top: 18px; }
  .hero__ctas .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------------------------------------------------
   3. MULTI-STEP ASSESSMENT FORM (contact page)
   --------------------------------------------------------- */
.msf {
  /* container is the existing .form-card */
}
.msf__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
}
.msf__dot {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: var(--sage-100);
  transition: background 0.3s ease;
}
.msf__dot.is-active,
.msf__dot.is-done { background: var(--sage-500); }
.msf__step-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--sage-500);
  margin-bottom: 10px;
}
.msf__step { display: none; }
.msf__step.is-active { display: block; animation: msfFade 0.3s ease; }
@keyframes msfFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.msf__question {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sage-900);
  line-height: 1.25;
  margin: 0 0 6px;
}
.msf__hint {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 22px;
}

/* Big tappable choice buttons (qualifier + goal steps) */
.msf__choices {
  display: grid;
  gap: 12px;
  margin-bottom: 4px;
}
.msf__choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  min-height: 60px;
  border-radius: 14px;
  border: 2px solid var(--sage-100);
  background: var(--cream);
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.msf__choice:hover { border-color: var(--sage-400); background: var(--white); }
.msf__choice:active { transform: scale(0.99); }
.msf__choice.is-selected { border-color: var(--sage-500); background: var(--sage-100); }
.msf__choice-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--white);
  border: 1px solid var(--sage-100);
  display: grid;
  place-items: center;
  color: var(--sage-700);
  flex: none;
}
.msf__choice.is-selected .msf__choice-icon { background: var(--sage-500); color: var(--cream); border-color: var(--sage-500); }
.msf__choice-icon svg { width: 22px; height: 22px; }

/* Nav row */
.msf__question:focus, .msf__question:focus-visible { outline: none; }
.msf__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}
.msf__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 12px 6px;
  min-height: 44px;
}
.msf__back:hover { color: var(--sage-700); }
.msf__back svg { width: 18px; height: 18px; }
.msf__back[hidden] { display: none; }
.msf__nav:has(.msf__back[hidden]) { justify-content: center; }
.msf__microcopy {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 18px 0 0;
  line-height: 1.5;
}

/* Success panel */
.msf__success {
  display: none;
  text-align: center;
  padding: 20px 8px 8px;
}
.msf__success.is-active { display: block; animation: msfFade 0.3s ease; }
.msf__success-check {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--sage-500);
  color: var(--cream);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
}
.msf__success-check svg { width: 34px; height: 34px; }
.msf__success h3 { font-size: 1.6rem; margin-bottom: 10px; }
.msf__success p { color: var(--ink-soft); font-size: 16px; margin: 0 auto; max-width: 40ch; }

@media (max-width: 600px) {
  .msf__question { font-size: 1.3rem; }
  .msf__choice { font-size: 16px; padding: 16px 16px; }
}

/* ---------------------------------------------------------
   4. ACCESSIBILITY, skip link, focus, scroll offset
   --------------------------------------------------------- */
/* keep sticky header from covering focused/anchored targets (WCAG 2.4.11) */
html { scroll-padding-top: 120px; scroll-padding-bottom: 92px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--sage-900);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.18s ease;
}
.skip-link:focus { top: 12px; outline: 3px solid var(--gold); outline-offset: 2px; }

/* Visible focus for keyboard users on every interactive element */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.msf__choice:focus-visible {
  outline: 3px solid var(--sage-700);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible,
.mobile-cta-bar a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------------------------------------------------------
   5. SITEWIDE MEDICAL / SCOPE DISCLAIMER (footer)
   --------------------------------------------------------- */
.scope-disclaimer {
  max-width: 860px;
  margin: 0 auto 20px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.6;
  color: var(--sage-200);
  text-align: center;
}

/* ---------------------------------------------------------
   6. HOMEPAGE, How It Works, Safety & Vetting, Caregiver
   feature, embedded assessment section
   --------------------------------------------------------- */
.how { padding: 96px 0; background: var(--cream); }
.how__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.how__eyebrow { display:inline-block; font-size:12px; text-transform:uppercase; letter-spacing:0.24em; color:var(--sage-500); font-weight:600; margin-bottom:14px; }
.how__head h2 em { font-style: italic; color: var(--sage-500); font-weight: 400; }
.how__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.how-step { background: var(--white); border: 1px solid var(--sage-100); border-radius: var(--radius-lg); padding: 30px 26px; text-align: center; }
.how-step__num { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; background: var(--sage-100); border: 2px solid var(--sage-500); color: var(--sage-700); font-family: var(--display); font-weight: 600; font-size: 22px; display: grid; place-items: center; }
.how-step h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--sage-900); margin: 0 0 8px; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
@media (max-width: 900px) { .how__steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how__steps { grid-template-columns: 1fr; } }

/* Featured caregiver testimonial */
.caregiver { padding: 40px 0 40px; background: var(--cream); }
.caregiver__card { max-width: 900px; margin: 0 auto; background: var(--sage-700); color: var(--cream); border-radius: var(--radius-lg); padding: 48px 52px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.caregiver__card::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1.2px, transparent 1.2px); background-size: 20px 20px; pointer-events: none; }
.caregiver__stars { display: inline-flex; gap: 2px; color: #FFCB5C; margin-bottom: 18px; position: relative; }
.caregiver__stars svg { width: 22px; height: 22px; }
.caregiver__quote { font-family: var(--display); font-size: 1.5rem; line-height: 1.5; font-weight: 400; margin: 0 0 24px; position: relative; }
.caregiver__who { display: flex; align-items: center; gap: 14px; position: relative; }
.caregiver__avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: #2A1C0B; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; flex: none; }
.caregiver__meta strong { display: block; color: var(--cream); font-weight: 600; }
.caregiver__meta span { font-size: 14px; color: var(--sage-200); }
@media (max-width: 600px) { .caregiver__card { padding: 34px 26px; } .caregiver__quote { font-size: 1.2rem; } }

/* Safety & vetting block */
.safety { padding: 96px 0; background: var(--white); }
.safety__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.safety__eyebrow { display:inline-block; font-size:12px; text-transform:uppercase; letter-spacing:0.24em; color:var(--sage-500); font-weight:600; margin-bottom:14px; }
.safety__head h2 em { font-style: italic; color: var(--sage-500); font-weight: 400; }
.safety__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.safety-item { text-align: center; padding: 26px 16px; border-radius: var(--radius-md); background: var(--cream); border: 1px solid var(--sage-100); }
.safety-item__icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 12px; background: var(--sage-100); color: var(--sage-700); display: grid; place-items: center; }
.safety-item__icon svg { width: 24px; height: 24px; }
.safety-item strong { display: block; font-family: var(--body); font-weight: 700; font-size: 14.5px; color: var(--sage-900); line-height: 1.3; }
@media (max-width: 900px) {
  /* Flex-wrap centers the 5th item under the row instead of leaving a blank cell */
  .safety__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
  .safety-item { flex: 0 1 auto; }
}
@media (max-width: 900px) {
  /* Phones + small tablets: one compact bordered checklist — minimal chrome */
  .safety { padding: 40px 0; }
  .safety__head { margin-bottom: 20px; }
  .safety__grid {
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border: 1px solid var(--sage-100);
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .safety-item {
    max-width: none;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--sage-100);
    border-radius: 0;
  }
  .safety-item:last-child { border-bottom: 0; }
  .safety-item__icon { margin: 0; flex: none; width: 34px; height: 34px; border-radius: 9px; }
  .safety-item__icon svg { width: 19px; height: 19px; }
  .safety-item strong { font-size: 14.5px; }
}

/* Consistent vertical rhythm for the homepage flow */
@media (max-width: 768px) {
  .how { padding: 64px 0; }
  .how__head { margin-bottom: 40px; }
  .caregiver { padding: 32px 0 32px; }
  .safety { padding: 64px 0; }
  .safety__head { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  .how { padding: 48px 0; }
  .caregiver { padding: 28px 0 28px; }
  .safety { padding: 48px 0; }
}

/* Embedded homepage assessment section */
.book-embed { padding: 96px 0; background: var(--sage-900); position: relative; }
.book-embed__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; max-width: 1080px; margin: 0 auto; }
.book-embed__copy h2 { color: var(--cream); font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 18px; }
.book-embed__copy h2 em { font-style: italic; color: #F2E0C2; font-weight: 400; }
.book-embed__copy p { color: var(--sage-200); font-size: 1.08rem; line-height: 1.65; margin: 0 0 24px; max-width: 46ch; }
.book-embed__reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.book-embed__reasons li { display: flex; align-items: center; gap: 12px; color: var(--cream); font-size: 16px; font-weight: 500; }
.book-embed__reasons svg { width: 22px; height: 22px; color: var(--sage-400); flex: none; }
@media (max-width: 900px) { .book-embed__inner { grid-template-columns: 1fr; gap: 36px; } .book-embed__inner > * { min-width: 0; } .book-embed { padding: 64px 0; overflow-x: clip; } .form-card { max-width: 100%; } }
@media (max-width: 640px) {
  /* Keep the form inside the viewport: let the submit button wrap instead of overflowing */
  .msf__nav { flex-wrap: wrap; gap: 12px; }
  .msf__nav .btn { white-space: normal; flex: 1 1 100%; justify-content: center; padding: 15px 18px; letter-spacing: 0.03em; }
  .msf__back { order: 2; }
}
