/* ============================================================
   Senior Health — Compassion Beyond 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: #6d7078;
  --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;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--navy-ink);
  white-space: nowrap;
}

.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;
}

.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%;
  max-width: 768px;
  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%;
}
.modal__media iframe {
  height: 100%;
  width: 100%;
  border: 0;
}
.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;
  }
  .header__actions {
    gap: 20px;
  }
  .header__login {
    display: inline-block;
  }
  .header__actions .header__cta {
    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;
  }
}

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

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