/* ============================================================
   CAREVIDER — SHARED STYLESHEET (MOBILE-FIRST, v3)
   Base = small phone. Enhance UP via min-width.
   ------------------------------------------------------------
   BREAKPOINT LADDER (mobile-first / min-width) — LOCKED v3
   Use ONLY these breakpoints site-wide.
     (base)  ≤560px  Small/standard phone  → single column, sticky CTA shown
     561px   Large phone / phablet         → 2-col triggers/steps/footer begin
     768px   Small tablet / large phone L  → .hide-sm appears, more 2-col
     961px   Tablet landscape / desktop    → horizontal nav, multi-col, sidebar sticky, mobile-sticky hidden
     1024px  Large tablet / small laptop   → hero/two-col proportions
     1280px  Laptop / desktop              → full grids (3–4 col)
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --orange: #F26A21;
  --orange-dark: #D8551A;
  --orange-soft: #FFF1E8;
  --blue: #1F4E79;
  --blue-dark: #163A5C;
  --blue-soft: #EAF1F8;
  --ink: #1A1A1A;
  --ink-soft: #4A4A4A;
  --line: #E2E2E2;
  --bg: #FFFFFF;
  --bg-alt: #F7F7F5;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,.08);
  --max: 1200px;
  --gap: 24px;
}

/* ---------- BASE (mobile defaults) ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* room for mobile sticky bar; removed at 961px+ */
  padding-bottom: 80px;
}
h1,h2,h3,h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); font-weight: 700; }
/* clamp() already fluid; floors tuned for small phones */
h1 { font-size: clamp(1.9rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
a  { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
/* tighter on phones, roomier on desktop */
section { padding: 48px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.eyebrow.orange { color: var(--orange); }

/* small-phone padding relief (≤360px feel) */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
}

/* ---------- VERY SMALL PHONES (≤320px) ---------- */
/* Hardening against horizontal overflow on 320px-class devices
   (iPhone SE 1st-gen, budget Androids, foldable cover screens). */
@media (max-width: 360px) {
  .container { padding: 0 14px; }

  /* Logo: 200px is too wide for a 320px nav next to the 48px toggle.
     Scale it down so logo + hamburger fit without overflow. */
  .logo-mark { width: 150px; height: 48px; }

  /* Allow button labels to wrap instead of forcing width past the viewport.
     Keeps the 48px min tap target; just lets long CTAs break to 2 lines. */
  .btn { white-space: normal; text-align: center; line-height: 1.25; }
  .btn-lg { padding: 14px 20px; }

  /* Trim oversized display type one more notch */
  h1 { font-size: 1.75rem; }
  .outcome .stat { font-size: 2.2rem; }
  .rate-card .price { font-size: 1.85rem; }

  /* Mobile sticky bar: keep both CTAs readable side-by-side at 320px */
  .mobile-sticky .btn { font-size: .95rem; padding: 8px 10px; }

  /* Utility bar: tighten further so right-side links don't wrap awkwardly */
  .utility-left, .utility-right { gap: 10px; }
  .utility-bar { font-size: .8rem; }
}


/* ---------- UTILITY: hide on small ---------- */
.hide-sm { display: none; }            /* hidden on phones by default */
@media (min-width: 768px) {
  .hide-sm { display: inline; }        /* appears small-tablet and up */
    /* ...existing 768px rules... */
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- BUTTONS (48×48 min) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  font-size: 1.05rem; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: all .15s ease;
  white-space: nowrap;
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); text-decoration: none; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); text-decoration: none; }
.btn-outline-blue { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline-blue:hover { background: var(--blue-soft); text-decoration: none; }
.btn-outline-white { background: transparent; color: #fff; border-color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-lg { min-height: 56px; padding: 16px 32px; font-size: 1.15rem; }
.btn-white {
  background: #fff;
  color: var(--orange);
  border: 2px solid #fff;
}
.btn-white:hover { background: #f3f4f6; }
.btn-white:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.btn-outline-orange {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}
.btn-outline-orange:hover { background: var(--orange); color: #fff; }
.btn-outline-orange:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- UTILITY BAR ---------- */
.utility-bar { background: var(--blue-dark); color: #fff; font-size: .9rem; padding: 8px 0; }
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.utility-bar a { color: #fff; }
.utility-left, .utility-right { display: flex; gap: 20px; align-items: center; }
.utility-bar .phone { font-weight: 700; }
/* tighten gaps on small phones so the right-side links don't crowd */
@media (max-width: 560px) {
  .utility-left, .utility-right { gap: 12px; }
  .utility-bar { font-size: .82rem; }
}

/* ---------- NAV (mobile-first: hamburger is the default) ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: var(--max); margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.logo-mark { width: 200px; height: 64px; background-image: url('../assets/logo.svg'); background-size: contain; background-repeat: no-repeat; background-position: left center; }

/* default (mobile): links hidden, toggle shown */
.nav-links { display: none; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 1rem; border-radius: 6px; }
.nav-links a:hover { background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { background: var(--bg-alt); }
.nav-links .pillar-orange { color: var(--orange); }
.nav-links .pillar-blue   { color: var(--blue); }
.nav-cta { display: none; margin-left: 12px; }   /* hidden on mobile, shown at 961px */
.menu-toggle { display: block; background: none; border: 0; font-size: 1.5rem; cursor: pointer; min-width: 48px; min-height: 48px; }

/* mobile open state (dropdown panel) */
.nav-links.open {
  display: flex; flex-direction: column;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 12px 20px; gap: 4px; box-shadow: var(--shadow-md);
}
.nav-links.open a { padding: 14px; width: 100%; }

/* desktop nav at 961px+ : horizontal links, no toggle */
@media (min-width: 961px) {
  .nav-links { display: flex; gap: 8px; align-items: center; position: static; box-shadow: none; padding: 0; border: 0; }
  .nav-cta { display: inline-flex; }
  .menu-toggle { display: none; }
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs { background: var(--bg-alt); padding: 12px 0; font-size: .9rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumbs li::after { content: "›"; margin-left: 8px; color: var(--ink-soft); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs li[aria-current] { color: var(--ink-soft); }

/* ---------- PAGE HERO (mobile-first: stacked) ---------- */
.page-hero { padding: 40px 0 36px; background: linear-gradient(135deg, var(--orange-soft) 0%, #fff 100%); }
.page-hero.blue { background: linear-gradient(135deg, var(--blue-soft) 0%, #fff 100%); }
.page-hero .container { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { font-size: 1.15rem; color: var(--ink); max-width: 600px; margin-bottom: 24px; }
.page-hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.page-hero-card h3 { color: var(--orange); margin-bottom: 4px; }
.page-hero-card.blue h3 { color: var(--blue); }
.page-hero-card ul { padding-left: 20px; margin: 12px 0 0; }
.page-hero-card li { margin-bottom: 6px; }
@media (min-width: 1024px) {
  .page-hero { padding: 56px 0 48px; }
  .page-hero .container { grid-template-columns: 1.4fr 1fr; gap: 40px; }
}

/* ---------- TRIGGER TILES (mobile-first: 1 → 2 → 3) ---------- */
.triggers { display: grid; grid-template-columns: 1fr; gap: 20px; }
.trigger-tile { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: var(--radius); padding: 24px; transition: all .15s; display: block; color: inherit; text-decoration: none; }
.trigger-tile:hover { border-left-color: var(--orange-dark); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.trigger-tile .icon { font-size: 2rem; margin-bottom: 8px; }
.trigger-tile h4 { color: var(--orange-dark); margin-bottom: 6px; font-size: 1.1rem; }
.trigger-tile p { font-size: .95rem; margin: 0 0 12px; }
.trigger-tile .more { color: var(--orange); font-weight: 700; font-size: .95rem; }
@media (min-width: 561px) { .triggers { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 961px) { .triggers { grid-template-columns: repeat(3, 1fr); } }

/* ---------- STEP / TIMELINE (mobile-first: 1 → 2 → 4) ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: -16px; left: 20px; width: 36px; height: 36px; background: var(--orange); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.step h4 { margin-top: 12px; color: var(--orange-dark); }
@media (min-width: 561px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ---------- CALLOUT BANDS ---------- */
.callout { padding: 32px; border-radius: var(--radius); margin: 24px 0; }
.callout.orange { background: var(--orange-soft); border-left: 5px solid var(--orange); }
.callout.blue   { background: var(--blue-soft);   border-left: 5px solid var(--blue); }
.callout h3 { margin-top: 0; }
@media (max-width: 480px) { .callout { padding: 22px; } }

/* ---------- CHECKLIST (mobile-first: 1 → 2) ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; background: var(--blue); color: #fff;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
}
@media (min-width: 768px) { .checklist { grid-template-columns: 1fr 1fr; } }

/* ---------- TWO-COLUMN CONTENT (mobile-first: stacked) ---------- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.sidebar-card { background: var(--bg-alt); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); position: static; }
.sidebar-card h4 { color: var(--blue); margin-top: 0; }
.sidebar-card ul { padding-left: 20px; margin: 8px 0 16px; }
@media (min-width: 961px) {
  .two-col { grid-template-columns: 2fr 1fr; }
  .sidebar-card { position: sticky; top: 90px; }
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-bottom: 12px; overflow: hidden; }
details summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.1rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--orange); font-size: 1.5rem; font-weight: 400; flex-shrink: 0; }
details[open] summary::after { content: "–"; }
details[open] summary { border-bottom: 1px solid var(--line); }
details .answer { padding: 18px 22px; color: var(--ink-soft); }

/* ---------- FINAL CTA ---------- */
.final-cta { background: var(--orange); color: #fff; text-align: center; padding: 56px 20px; }
.final-cta h2 { color: #fff; margin-bottom: 12px; }
.final-cta p { color: rgba(255,255,255,.95); font-size: 1.15rem; max-width: 620px; margin: 0 auto 24px; }
.final-cta .btn { background: #fff; color: var(--orange); }
.final-cta .btn:hover { background: var(--bg-alt); }
.final-cta .cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
@media (min-width: 768px) { .final-cta { padding: 72px 20px; } }

/* ---------- FOOTER (mobile-first: 1 → 2 → 4) ---------- */
footer { background: #111; color: #ccc; padding: 48px 0 24px; font-size: .95rem; }
footer a { color: #ccc; }
footer a:hover { color: #fff; }
.footer-credentials { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid #333; text-align: center; }
.footer-credentials .cred { color: #fff; font-weight: 600; font-size: .9rem; }
.footer-credentials .cred small { display: block; color: #888; font-weight: 400; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col.orange h4 { color: var(--orange); }
.footer-col.blue h4   { color: #6FA8DC; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; border-top: 1px solid #333; font-size: .85rem; color: #888; }
@media (min-width: 561px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 961px) { footer { padding: 56px 0 24px; } .footer-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- MOBILE STICKY BAR (shown by default, hidden at 961px+) ---------- */
.mobile-sticky { display: block; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; z-index: 200; box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
.mobile-sticky .row { display: flex; gap: 8px; }
.mobile-sticky .btn { flex: 1; min-height: 52px; font-size: 1rem; padding: 8px 12px; }
@media (min-width: 961px) {
  .mobile-sticky { display: none; }
  body { padding-bottom: 0; }   /* remove sticky-bar spacing on desktop */
}

/* ---------- FOCUS STYLES ---------- */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* ============================================================
   PRICING & CALCULATOR (promoted from homepage-inline, Batch 2)
   Shared by /pricing/* pages + homepage. Mobile-first.
   ============================================================ */
.pricing-wrap { background: var(--blue-soft); }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.rate-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  text-align: center;
}
.rate-card.featured { border: 2px solid var(--blue); }
.rate-card h4 { color: var(--blue); margin-bottom: 4px; }
.rate-card .price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 8px 0; }
.rate-card .price small { font-size: 1rem; color: var(--ink-soft); font-weight: 400; }
.rate-card .note { font-size: .9rem; color: var(--ink-soft); }

.calc-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
}
.calc-card h3 { color: var(--blue); }

.calc-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.calc-row label { flex: 1; min-width: 160px; }
.calc-row label span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.calc-row input,
.calc-row select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

.calc-result {
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.calc-result .est { font-size: 1.5rem; font-weight: 800; color: var(--blue); }

.pricing-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

/* (B) Neutral column labels — reserve orange strictly for CTAs.
   Mobile stacked-card labels: */
.compare td.home[data-label]::before { color:var(--blue); }      /* keep blue = trust */
.compare td.assisted[data-label]::before { color:var(--ink-soft); } /* was var(--orange) → neutral */

/* Desktop table headers (inside @media min-width:768px): */
.compare th.home { color:var(--blue); }        /* keep */
.compare th.assisted { color:var(--ink-soft); } /* was var(--orange) → neutral */

@media (min-width:768px){
  .compare th.home { color:var(--blue); }
  .compare th.assisted { color:var(--ink-soft); }
}
