/* ============================================================
   Senior Health — One Voice Care
   Pure-CSS port of the React/Tailwind build (source of truth).
   Tailwind breakpoints preserved: sm 640px, lg 1024px, xl 1280px.
   ============================================================ */

/* ---------- Design tokens (from tailwind.config.ts) ---------- */
:root {
  /* Colors */
  --navy: #022b5b;
  --navy-deep: #04203d;
  --navy-ink: #0a1f3a;
  --cream: #f4f5f7;
  --frame: #e4e7ec;
  --frame-soft: #edeff2;
  --frame-from: #e9ecf0;
  --frame-to: #e2e6eb;
  --panel: #fbfcfd;
  --teal: #2d8c8c;
  --teal-deep: #1e6e6c;
  --teal-soft: #7fb6b2;
  --teal-mist: #cfe3e1;
  --teal-card: #e7f1f0;
  --muted: #565a63;
  --hair: #b5bac4;
  --amber: #e3a458;
  --rose: #e3a18f;
  --navy-mist: #e4ebf6;

  /* Shadows */
  --shadow-cta: 0 12px 28px -12px rgba(4, 32, 61, 0.45);
  --shadow-card: 0 24px 60px -28px rgba(2, 43, 91, 0.3);
  --shadow-float: 0 18px 45px -18px rgba(2, 43, 91, 0.28);
  --shadow-frame: 0 40px 90px -50px rgba(2, 43, 91, 0.45);

  /* Radii */
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-28: 28px;
  --r-34: 34px;
  --r-full: 9999px;

  /* Easings */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
}

/* ---------- Reset / preflight equivalent ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--navy-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img,
svg {
  display: block;
}

[hidden] {
  display: none !important;
}

/* ---------- Utilities ---------- */
.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;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  display: block;
}
.icon--14 {
  height: 14px;
  width: 14px;
}
.icon--18 {
  height: 18px;
  width: 18px;
}
.icon--20 {
  height: 20px;
  width: 20px;
}
.icon--24 {
  height: 24px;
  width: 24px;
}
.icon--28 {
  height: 28px;
  width: 28px;
}
.icon--40 {
  height: 40px;
  width: 40px;
}

/* ---------- Animations ---------- */
@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes scale-in {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-up {
  animation: fade-up 0.7s var(--ease-spring) both;
}
.fade-up--d100 {
  animation-delay: 100ms;
}
.fade-up--d200 {
  animation-delay: 200ms;
}
.fade-up--d300 {
  animation-delay: 300ms;
}
.fade-up--d500 {
  animation-delay: 500ms;
}

/* ============================================================
   PAGE  (app/page.tsx)
   ============================================================ */
.page {
  min-height: 100vh;
  background: #fff;
}

/* Full-bleed site: content spreads across the screen (no max-width cap) */
.frame {
  width: 100%;
}

.panel {
  background: #fff;
}

/* ============================================================
   SHARED LAYOUT CONTAINER
   One width + responsive gutters used on every screen, so all
   content aligns to the same left/right edges. Full-width bands
   keep their background edge-to-edge while their inner content
   sits in this container.
   ============================================================ */
:root {
  --content: 1200px;                 /* shared max content width */
  --gutter: clamp(16px, 4vw, 48px);  /* responsive side margins */
}
.container {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
}

/* ============================================================
   HEADER  (components/layout/Header.tsx)
   ============================================================ */
.header {
  position: relative;
  z-index: 30;
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
  padding: 24px 0 0;
}

.brand {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy-ink);
  white-space: nowrap;
}
.brand__logo {
  height: 58px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.brand__tag {
  font-size: 12px;
  font-style: italic;
  font-weight: 500;
  color: #084a48;
  letter-spacing: 0.005em;
  white-space: nowrap;
  line-height: 1;
}
.brand__tag b { color: #a8927a; font-weight: 800; }

.nav {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav__link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: rgba(10, 31, 58, 0.9);
  transition: color 0.2s ease;
}
/* sliding underline indicator: highlights the open page, slides in on hover */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal-deep);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease-out);
}
.nav__link:hover {
  color: var(--teal-deep);
}
.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}

/* mobile menu: mark the open page */
.mobile-menu__link[aria-current="page"] {
  color: var(--teal-deep);
  font-weight: 600;
  background: var(--teal-card);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header__login {
  display: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-ink);
  transition: color 0.2s ease;
}
.header__login:hover {
  color: var(--teal-deep);
}
/* Higher specificity so it beats .btn's display:inline-flex (hidden on mobile) */
.header__actions .header__cta {
  display: none;
}
/* Tap-to-call in the header (injected by js/site.js). Hidden on small screens —
   the sticky mobile call bar covers phones — shown from 640px up. */
.header__phone {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal-deep);
  background: var(--teal-card);
  border-radius: var(--r-full);
  padding: 9px 15px;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.header__phone svg { height: 17px; width: 17px; }
.header__phone:hover { background: var(--teal-mist); transform: translateY(-1px); }

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: var(--r-full);
  color: var(--navy-ink);
  transition: background-color 0.2s ease;
}
.menu-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}
.menu-toggle__close {
  display: none;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__open {
  display: none;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__close {
  display: block;
}

.mobile-menu {
  display: block;
  margin: 12px 16px 0;
  border-radius: var(--r-3xl);
  border: 1px solid var(--frame);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-card);
  animation: scale-in 0.4s var(--ease-spring) both;
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
}
.mobile-menu__link {
  border-radius: 12px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--navy-ink);
  transition: background-color 0.2s ease;
}
.mobile-menu__link:hover {
  background: var(--cream);
}
.mobile-menu__divider {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--frame);
  padding-top: 12px;
}
.mobile-menu__cta {
  width: 100%;
}

/* ============================================================
   BUTTONS  (components/ui/Button.tsx)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.025em;
  border-radius: var(--r-full);
  text-decoration: none;
  cursor: pointer;
  will-change: transform;
  transition: all 0.3s var(--ease-out);
}
.btn--sm {
  height: 40px;
  padding-inline: 20px;
  font-size: 14px;
}
.btn--md {
  height: 48px;
  padding-inline: 24px;
  font-size: 15px;
}
.btn--lg {
  height: 58px;
  padding-inline: 28px;
  font-size: 16px;
}
.btn--primary {
  background: var(--navy-deep);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover {
  background: var(--navy);
  transform: translateY(-2px);
}
.btn--primary:active {
  transform: translateY(0);
}
.btn--secondary {
  background: var(--frame-soft);
  color: var(--navy);
}
.btn--secondary:hover {
  background: var(--frame);
  transform: translateY(-2px);
}
.btn--secondary:active {
  transform: translateY(0);
}

.btn__arrow {
  height: 18px;
  width: 18px;
  transition: transform 0.3s ease;
}
.btn:hover .btn__arrow {
  transform: translateX(4px);
}

.btn__play {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 28px;
  border-radius: var(--r-full);
  background: var(--navy);
  color: #fff;
  transition: transform 0.3s ease;
}
.btn:hover .btn__play {
  transform: scale(1.05);
}
.icon--play {
  height: 14px;
  width: 14px;
  margin-left: 2px;
}

/* ============================================================
   HERO  (components/home/Hero.tsx)
   ============================================================ */
.hero {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
  padding: 48px 0 64px;
}

.hero__grid {
  display: grid;
  align-items: center;
  gap: 48px;
}

.hero__copy {
  max-width: 46rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-deep);
}
.eyebrow__dot {
  height: 4px;
  width: 4px;
  border-radius: var(--r-full);
  background: rgba(45, 140, 140, 0.5);
}
.eyebrow__tagline {
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: var(--muted);
}

.hero__headline {
  margin-top: 16px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--navy-ink);
  text-wrap: balance;
}

.hero__sub {
  margin-top: 20px;
  max-width: 40rem;
  font-size: 16px;
  line-height: 1.625;
  color: var(--muted);
}

.hero__ctas {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__trust {
  margin-top: 40px;
}

.hero__visual {
  position: relative;
  margin-inline: auto;
  width: 100%;
  max-width: 680px;
}

/* ---------- Trust row (components/home/TrustRow.tsx) ---------- */
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 28px;
  row-gap: 12px;
  color: var(--muted);
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trust__icon {
  color: rgba(109, 112, 120, 0.8);
}
.trust__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

/* ============================================================
   ILLUSTRATION  (components/home/HeroIllustration.tsx)
   ============================================================ */
.illustration {
  position: relative;
}
.illustration__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-28);
  background: var(--teal-card);
  box-shadow: var(--shadow-card);
}
.illustration__ratio {
  position: relative;
  aspect-ratio: 5 / 4;
  width: 100%;
}
/* SVG fallback and the real photo stack in the same box */
.illustration__media {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}
/* The real photo sits on top and fills the rounded panel, cropping evenly.
   If its file is missing it hides (via onerror), revealing the SVG beneath. */
.illustration__photo {
  object-fit: cover;
  object-position: center;
}

/* ---------- Floating cards around the illustration ---------- */
@keyframes card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
.hcard {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--r-2xl);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), var(--shadow-float);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: box-shadow 0.3s ease;
  /* gentle, continuous float (duration/delay varied per card below) */
  animation: card-float 4.4s var(--ease-spring) infinite;
}
.hcard:hover {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), var(--shadow-card);
}
.icon--16 {
  height: 16px;
  width: 16px;
}

/* Small horizontal cards (regimen + check) */
.hcard--regimen,
.hcard--check {
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
}
/* Hidden on small screens; revealed at lg (see media query) */
.hcard--secondary {
  display: none;
}
.hcard--regimen {
  top: 7%;
  left: -22px;
  animation-duration: 4s;
}
.hcard--check {
  top: 25%;
  right: -20px;
  animation-duration: 5.2s;
  animation-delay: 0.6s;
}

.hcard__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  width: 34px;
  flex-shrink: 0;
}
.hcard__icon--soft {
  border-radius: 10px;
  background: var(--frame-soft);
  color: var(--navy-ink);
}
.hcard__icon--teal {
  border-radius: var(--r-full);
  background: rgba(45, 140, 140, 0.12);
  color: var(--teal);
}

.hcard__eyebrow {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.hcard__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-ink);
}
.hcard__line {
  font-size: 11.5px;
  color: var(--muted);
}
.hcard__line--strong {
  color: var(--navy-ink);
  font-weight: 500;
}

/* Bottom-left score card */
.hcard--score {
  bottom: -18px;
  left: -8px;
  width: 230px;
  padding: 16px;
  animation-duration: 4.8s;
  animation-delay: 1.1s;
}
.hcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hcard__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  border-radius: var(--r-full);
  background: rgba(45, 140, 140, 0.1);
  color: var(--teal);
}
.hcard__track {
  margin-top: 12px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-full);
  background: rgba(45, 140, 140, 0.15);
}
.hcard__fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(to right, var(--teal), var(--teal-soft));
}
.hcard__score {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy-ink);
}
.hcard--score .hcard__line {
  margin-top: 4px;
}

/* ============================================================
   VIDEO MODAL  (components/ui/VideoModal.tsx)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 0.6s ease-out both;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 58, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative;
  z-index: 10;
  width: 100%;
  /* 84vh of height can only ever fill 84vh * 16/9 of width at 16:9. Capping
     width by that keeps .modal__media exactly 16:9, so the frame never gets
     black bars down the sides on a short viewport. */
  max-width: min(1100px, 94vw, calc(84vh * 16 / 9));
  overflow: hidden;
  border-radius: var(--r-3xl);
  background: #000;
  box-shadow: var(--shadow-card);
  animation: scale-in 0.4s var(--ease-spring) both;
}
.modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy-ink);
  transition: background-color 0.2s ease;
}
.modal__close:hover {
  background: #fff;
}
.modal__media {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
}
.modal__media iframe,
.modal__media video {
  height: 100%;
  width: 100%;
  max-height: 100%;
  border: 0;
  display: block;
  background: #000;
  object-fit: contain;
}
.modal__placeholder {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(to bottom right, var(--navy), var(--navy-deep));
}
.modal__placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.15);
}
.modal__placeholder-icon .icon {
  margin-left: 4px;
}
.modal__placeholder-title {
  font-size: 18px;
  font-weight: 600;
}
.modal__placeholder-sub {
  margin-top: 4px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   SCROLL-REVEAL  (js/script.js toggles .is-visible via IntersectionObserver)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* staggered "pop" variant for card grids (added by script.js) */
.reveal--pop {
  transform: translateY(26px) scale(0.96);
}

/* scroll progress bar (element injected by script.js) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(to right, var(--teal), var(--amber));
  pointer-events: none;
  transition: transform 0.08s linear;
}

/* ============================================================
   SHARED SECTION LAYOUT
   ============================================================ */
.section {
  padding: 64px 0;
}
.section__head {
  width: min(100% - 2 * var(--gutter), 46rem);
  margin-inline: auto;
  text-align: center;
}
.eyebrow--center {
  justify-content: center;
}
.section__title {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-ink);
  text-wrap: balance;
}
.section__title--left {
  text-align: left;
}
.section__intro {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.section__intro--alt {
  margin-top: 10px;
  font-size: 14px;
  font-style: italic;
  color: var(--teal-deep);
}

/* ============================================================
   HOW WE HELP — services grid
   ============================================================ */
.how-we-help {
  background: var(--cream);
}

.services {
  margin: 40px auto 0;
  display: grid;
  gap: 20px;
  width: min(100% - 2 * var(--gutter), var(--content));
  grid-template-columns: 1fr;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--r-2xl);
  background: #fff;
  padding: 22px;
  box-shadow: 0 0 0 1px rgba(2, 43, 91, 0.05);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px rgba(2, 43, 91, 0.05), var(--shadow-float);
}

.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  width: 64px;
  flex-shrink: 0;
  border-radius: 18px;
  /* gentle, continuous bob (staggered into a wave below) */
  animation: icon-bob 3.2s var(--ease-spring) infinite;
}
@keyframes icon-bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.05);
  }
}
/* Cycle three soft gradient tiles across the grid */
.service-card:nth-child(3n + 1) .service-card__icon {
  background: linear-gradient(135deg, var(--teal-card), var(--teal-mist));
}
.service-card:nth-child(3n + 2) .service-card__icon {
  background: linear-gradient(135deg, var(--navy-mist), #fff);
}
.service-card:nth-child(3n) .service-card__icon {
  background: linear-gradient(135deg, var(--frame-soft), var(--frame));
}

.service-card__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy-ink);
}
.service-card__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Stagger the reveal across the grid */
.services .service-card:nth-child(3n + 1) {
  --delay: 0ms;
}
.services .service-card:nth-child(3n + 2) {
  --delay: 90ms;
}
.services .service-card:nth-child(3n) {
  --delay: 180ms;
}

/* Stagger the icon bob into a wave across the grid */
.services .service-card:nth-child(3n + 1) .service-card__icon {
  animation-delay: 0ms;
}
.services .service-card:nth-child(3n + 2) .service-card__icon {
  animation-delay: 240ms;
}
.services .service-card:nth-child(3n) .service-card__icon {
  animation-delay: 480ms;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials {
  background: #fff;
}

.testimonial-grid {
  margin: 40px auto 0;
  display: grid;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), var(--content));
  grid-template-columns: 1fr;
}

.testimonial-card {
  position: relative;
  border-radius: var(--r-3xl);
  background: var(--teal-card);
  padding: 32px 28px;
}
.testimonial-card:nth-child(2) {
  --delay: 120ms;
}

.testimonial-card__quote-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-deep);
}

.testimonial-card__quote {
  margin: 18px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--navy-ink);
  text-wrap: balance;
}

.testimonial-card__author {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  flex-shrink: 0;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.85);
  color: var(--teal-deep);
}
.testimonial-card__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-ink);
}
.testimonial-card__role {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.testimonial-card__note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.75;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--cream);
}

.contact__grid {
  width: min(100% - 2 * var(--gutter), var(--content));
  margin-inline: auto;
  display: grid;
  gap: 32px;
}

.contact__intro .section__title {
  margin-top: 12px;
}

.contact__call {
  margin-top: 24px;
}

.contact__jump {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-deep);
  text-decoration: underline;
  text-decoration-color: rgba(45, 140, 140, 0.35);
  text-underline-offset: 3px;
}
.contact__jump:hover {
  text-decoration-color: var(--teal-deep);
}

.social {
  margin-top: 40px;
}
.social__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.social__row {
  margin-top: 12px;
  display: flex;
  gap: 12px;
}
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: var(--r-full);
  background: #fff;
  color: var(--navy-ink);
  box-shadow: 0 0 0 1px rgba(2, 43, 91, 0.05);
  transition: transform 0.3s ease, color 0.2s ease;
}
.social__link:hover {
  transform: translateY(-2px);
  color: var(--teal-deep);
}

/* ---------- Form ---------- */
.contact__form {
  border-radius: var(--r-3xl);
  background: #fff;
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.contact__form-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-ink);
}

.form-row {
  margin-top: 16px;
}
.form-row--split {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-ink);
}

.form-input {
  width: 100%;
  border: 1px solid var(--frame);
  border-radius: 12px;
  background: var(--cream);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--navy-ink);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  background: #fff;
}
.form-input--textarea {
  resize: vertical;
  min-height: 100px;
}

.contact__submit {
  margin-top: 24px;
  width: 100%;
}

.contact__success {
  margin-top: 16px;
  border-radius: 12px;
  background: rgba(45, 140, 140, 0.12);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-deep);
}

/* ============================================================
   RESPONSIVE  — sm 640px
   ============================================================ */
@media (min-width: 640px) {
  .header__bar {
    padding-top: 32px;
  }
  .brand {
    font-size: 22px;
  }
  .brand__logo {
    height: 78px;
  }
  .brand__tag {
    font-size: 14px;
  }
  .header__actions {
    gap: 20px;
  }
  .header__login {
    display: inline-block;
  }
  .header__actions .header__cta {
    display: inline-flex;
  }
  .header__phone {
    display: inline-flex;
  }

  .hero {
    padding-block: 64px 80px;
  }
  .hero__headline {
    font-size: 44px;
  }
  .hero__sub {
    font-size: 17px;
  }
  .hero__ctas {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .illustration__ratio {
    aspect-ratio: 6 / 5;
  }

  .hcard--score {
    bottom: -22px;
    left: 0;
    width: 260px;
  }

  .section {
    padding-block: 80px;
  }
  .section__title {
    font-size: 36px;
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row--split {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE  — lg 1024px
   ============================================================ */
@media (min-width: 1024px) {
  .header__bar {
    padding-top: 32px;
  }
  .nav {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .mobile-menu {
    display: none;
  }

  .hero {
    padding-block: 64px 96px;
  }
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  .hero__visual {
    margin-inline: 0;
  }

  /* Reveal the surrounding cards on desktop */
  .hcard--secondary {
    display: flex;
  }

  .section {
    padding-block: 96px;
  }

  .services {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 64px;
  }
}

/* ============================================================
   RESPONSIVE  — xl 1280px
   ============================================================ */
@media (min-width: 1280px) {
  .nav {
    gap: 36px;
  }
  .hero__grid {
    gap: 64px;
  }
  /* keep "Someone in your corner," on one line; the <br> handles the rest */
  .hero__headline { white-space: nowrap; }
}

/* ============================================================
   HERO HEADLINE — large screens
   ============================================================ */
@media (min-width: 1024px) {
  .hero__headline {
    font-size: 48px;
  }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   SERVICE CARDS — hover-to-flip (front: icon+blurb, back: bullets)
   ============================================================ */
.services { grid-auto-rows: 1fr; }
.service-card {
  position: relative; height: 100%; min-height: 272px;
  background: transparent; padding: 0; gap: 0; box-shadow: none;
  perspective: 1100px; transition: none;
}
.service-card:hover { transform: none; box-shadow: none; }
.service-card__inner {
  position: relative; width: 100%; height: 100%; min-height: inherit;
  transition: transform 0.6s var(--ease-spring); transform-style: preserve-3d;
}
.service-card:hover .service-card__inner,
.service-card:focus-within .service-card__inner { transform: rotateY(180deg); }
.service-card__face {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
  border-radius: var(--r-2xl); background: #fff; padding: 22px;
  box-shadow: 0 0 0 1px rgba(2, 43, 91, 0.05);
  -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden;
}
/* front: illustration tile top-right, text below */
.service-card__front { position: relative; gap: 9px; padding: 20px; }
.service-card__img {
  position: absolute; top: 16px; right: 16px;
  width: 104px; height: 104px; border-radius: 22px;
  object-fit: cover; background: var(--cream);
  box-shadow: 0 8px 20px -12px rgba(2, 43, 91, 0.4);
  animation: svc-float 3.6s var(--ease-spring) infinite;
  will-change: transform;
}
@keyframes svc-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-1.5deg); }
}
/* stagger the float into a wave across the grid */
.services .service-card:nth-child(3n + 1) .service-card__img { animation-delay: 0ms; }
.services .service-card:nth-child(3n + 2) .service-card__img { animation-delay: 300ms; }
.services .service-card:nth-child(3n) .service-card__img { animation-delay: 600ms; }
/* a little pop when you hover the card */
.service-card:hover .service-card__img { animation-play-state: paused; }
.service-card__front .service-card__title { margin-top: 92px; } /* clear the icon */

.service-card__back {
  transform: rotateY(180deg); justify-content: center; gap: 14px;
  background: linear-gradient(150deg, var(--navy-deep), var(--navy));
  box-shadow: 0 0 0 1px rgba(2, 43, 91, 0.05), var(--shadow-float);
}
.service-card__back .service-card__title { color: #fff; }
.service-card__bullets { display: flex; flex-direction: column; gap: 10px; }
.service-card__bullets li {
  position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.5; color: #d7e3f2;
}
.service-card__bullets li::before {
  content: ""; position: absolute; left: 0; top: 7px; height: 8px; width: 8px;
  border-radius: 50%; background: var(--orange);
}
.service-card__hint {
  margin-top: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--teal-deep); opacity: 0.9;
}

/* ============================================================
   SITE FOOTER (injected by js/site.js)
   ============================================================ */
.site-footer { background: var(--navy-deep); color: #cdd9ea; }
.site-footer__inner {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  display: grid; gap: 22px; grid-template-columns: 1fr; padding: 40px 0 22px;
}
.sf-logo { height: 74px; width: auto; display: block; }
.sf-slogan { margin: 7px 0 0; font-size: 13px; font-style: italic; font-weight: 500; color: #cdd9ea; line-height: 1; }
.sf-slogan b { color: #d8c3a8; font-weight: 800; }
.sf-tag { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: #9fb0c7; max-width: 40ch; }
.sf-phone {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 16px;
  background: rgba(255, 255, 255, 0.08); color: #fff; border-radius: var(--r-full);
  padding: 10px 16px; font-size: 13.5px; font-weight: 700;
}
.sf-phone svg { height: 18px; width: 18px; }
.sf-phone:hover { background: rgba(255, 255, 255, 0.15); }
.sf-col { display: flex; flex-direction: column; gap: 10px; }
.sf-h { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #7f93ac; }
.sf-col a { font-size: 13.5px; color: #cdd9ea; }
.sf-col a:hover { color: #fff; }
.sf-socials { display: flex; gap: 10px; }
.sf-soc {
  display: inline-flex; align-items: center; justify-content: center; height: 38px; width: 38px;
  border-radius: var(--r-full); background: rgba(255, 255, 255, 0.08); color: #fff;
  transition: background-color 0.2s ease;
}
.sf-soc svg { height: 19px; width: 19px; }
.sf-soc:hover { background: var(--teal); }
/* Billing & payments disclosure (merchant-underwriting compliance) */
.billing-note { max-width: 820px; margin: 28px auto 0; border: 1px solid var(--frame); border-radius: 16px; background: #fff; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.billing-note p { margin: 0 0 12px; font-size: 14px; line-height: 1.65; color: #3a4457; }
.billing-note strong { color: var(--navy-ink); }
.billing-note a { color: var(--teal-deep); font-weight: 600; text-decoration: underline; }
.pay-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.pay-row__label { font-size: 12px; color: var(--muted); font-weight: 700; }
.pay-row__note { font-size: 12px; color: var(--muted); }
.pay-badge { font-size: 11px; font-weight: 800; letter-spacing: 0.03em; color: var(--navy-ink); background: var(--frame-soft); border: 1px solid var(--frame); border-radius: 6px; padding: 4px 8px; }

.sf-legal {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  display: flex; flex-wrap: wrap; gap: 7px 18px; padding: 16px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sf-legal a { font-size: 12.5px; font-weight: 600; color: #cdd9ea; }
.sf-legal a:hover { color: #fff; }
.sf-disclaimer {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  padding: 12px 0 2px; font-size: 11.5px; line-height: 1.6; color: #8ea0b8; max-width: none;
}
.site-footer__bar {
  width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 10px 0 13px;
  font-size: 12.5px; color: #9aabc2;
}
@media (min-width: 760px) {
  .site-footer__inner { grid-template-columns: 2.4fr 1fr 1fr; gap: 36px; }
}

/* ============================================================
   BACK-TO-TOP BUTTON (injected by js/site.js)
   ============================================================ */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 80; height: 46px; width: 46px;
  border-radius: var(--r-full); background: var(--navy-deep); color: #fff;
  box-shadow: var(--shadow-cta); display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}
.to-top.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--navy); }
.to-top svg { height: 20px; width: 20px; }

/* Sticky tap-to-call bar (injected by js/site.js) — mobile only; see media query below. */
.call-bar { display: none; }

/* ============================================================
   MOBILE POLISH (small screens)
   ============================================================ */
@media (max-width: 559px) {
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { width: 100%; }
  .hero__headline { font-size: 30px; }
  .section__title { font-size: 25px; }
  .section { padding-block: 52px; }
  .contact__call { width: 100%; }
  .testimonial-grid { gap: 16px; }
  .to-top { height: 42px; width: 42px; right: 14px; bottom: 14px; }
}

/* Sticky mobile call bar — shown below 640px (complements the header phone,
   which shows from 640px up). */
@media (max-width: 639px) {
  .call-bar {
    display: flex; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-top: 1px solid var(--frame);
    box-shadow: 0 -8px 24px -14px rgba(2, 43, 91, 0.35);
  }
  .call-bar__btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; border-radius: var(--r-full); font-size: 15px; font-weight: 700;
    transition: transform 0.15s ease;
  }
  .call-bar__btn:active { transform: scale(0.98); }
  .call-bar__btn svg { height: 18px; width: 18px; }
  .call-bar__btn--call { background: var(--teal-card); color: var(--teal-deep); }
  .call-bar__btn--cb { background: var(--navy-deep); color: #fff; }
  /* keep the last of the page clear of the fixed bar, and lift the to-top button above it */
  body { padding-bottom: 74px; }
  .to-top { bottom: 86px; }
}

/* ============================================================
   HERO HEADLINE — letter-by-letter reveal
   ============================================================ */
.hero__headline[data-typewriter] .tw-char {
  display: inline-block; white-space: pre;
  opacity: 0; transform: translateY(0.4em);
  animation: tw-in 0.42s var(--ease-out) forwards;
}
@keyframes tw-in { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   TESTIMONIALS — horizontal auto-scroll marquee
   ============================================================ */
.tmarquee {
  overflow: hidden; width: 100%; margin-top: 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tmarquee__track {
  display: flex; gap: 22px; width: max-content;
  animation: tmarquee-scroll 55s linear infinite;
}
.tmarquee:hover .tmarquee__track { animation-play-state: paused; }
@keyframes tmarquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tmarquee .testimonial-card { width: 380px; flex-shrink: 0; margin: 6px 0; }
@media (max-width: 559px) { .tmarquee .testimonial-card { width: 300px; } }

/* testimonial star rating */
.tstars { color: #f3a52e; font-size: 16px; letter-spacing: 3px; line-height: 1; margin-bottom: 12px; }

/* gentle pulse on section-divider icons (site-wide section headers) */
@keyframes pulse-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.sol-divider__icon { animation: pulse-soft 3.4s var(--ease-spring) infinite; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .sol-divider__icon { animation: none; } }

/* ---- form consent gate (required Privacy Policy checkbox) ---- */
.form-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: #33435c; cursor: pointer; }
.form-consent input { margin-top: 2px; width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--teal-deep); cursor: pointer; }
.form-consent a { color: var(--teal-deep); font-weight: 600; text-decoration: underline; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* consent checkbox stays locked until the Privacy Policy is opened */
.form-consent input:disabled { cursor: not-allowed; opacity: 0.55; }
.form-consent__hint { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--orange-deep); }
