/* ==========================================================================
   HOME PAGE: FONTS + GRID, header to footer, matched to the client's site.
   The client's layout is designed at 1280px and scales up to 1.25x at 1600px and wider
   (--u = 1px at 1280px and below, 1.25px at 1600px and above). Fixed gaps stay fixed.
   Everything section-specific is scoped to body.home; the header and footer are shared.
   ========================================================================== */

:root {
  --u: clamp(1px, calc(100vw / 1280), 1.25px);
  --f-sora: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-kepler: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --f-fraunces: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-mtext: 'Wix Madefor Text', 'Sora', system-ui, sans-serif;
  --f-mdisp: 'Wix Madefor Display', 'Sora', system-ui, sans-serif;
  --wrap-pad: var(--space-container-x);
  /* 0px at 1280px and below, 1px at 1600px and above: scales the extra spacing the client's site adds on wide screens */
  --t: clamp(0px, calc((100vw - 1280px) / 320), 1px);
}

/* ---- Fonts: Sora for the interface and body copy, a light serif for headings ---------------- */
.site-header, .site-footer, body.home { --font-body: var(--f-sora); --font-heading: var(--f-kepler); font-family: var(--f-sora); }
.site-header .site-nav__link { padding-inline: 0; font-family: var(--f-sora); font-size: 18px; font-weight: 400; }
.site-footer h2, .site-footer h3, .site-footer p, .site-footer a, .site-footer li, .site-footer label, .site-footer legend, .site-footer input, .site-footer button { font-family: var(--f-sora); }

body.home .hero__title, body.home .about__title, body.home .about__title span, body.home .wwd__title, body.home .care__title,
body.home .care-card__title, body.home .reviews__title, body.home .review blockquote p, body.home .blog__title,
body.home .contact__title, body.home .questions__title, body.home .marquee__item, .site-footer .footer__news-title { font-family: var(--f-kepler); font-weight: 300; letter-spacing: 0; }
/* the client's Fraunces is a light cut; the bold is the browser's synthesised bold, so only the light cut is loaded */
body.home .solutions__title, body.home .svc__title { font-family: var(--f-fraunces); font-weight: 700; letter-spacing: .02em; font-synthesis: weight; }
body.home .svc__text, body.home .care-card__text, body.home .care-card__more, body.home .questions__text, body.home .questions__mail { font-family: var(--f-mtext); }
body.home .post, body.home .post__title, body.home .post__title a, body.home .post__excerpt, body.home .post__meta, body.home .post__author { font-family: var(--f-mdisp); }

/* Sora copy is regular weight on the client's site */
body.home .hero__eyebrow { font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; }
body.home .pill { font-size: 14px; font-weight: 400; letter-spacing: 0; }
body.home .hero__cta .btn, body.home .form .btn, body.home .about p, body.home .wwd__card, body.home .care__intro,
body.home .contact__lead, body.home .reviews figcaption { font-weight: 400; }
body.home .solutions__eyebrow { font-weight: 400; letter-spacing: 0; }
body.home .reviews figcaption { font-size: 17px; line-height: 1.6; }
body.home .field label, body.home .fieldset legend { font-size: 15px; font-weight: 400; }
body.home .form .btn { font-size: 15px; }
body.home .about p, body.home .care__intro, body.home .contact__lead { line-height: 1.5; }
body.home .wwd__card { font-size: 16px; line-height: 1.5; }
body.home .svc__text { font-size: 15px; line-height: 1.6; }
body.home .care-card__text { font-size: 14px; }
body.home .care-card__more { font-size: 16px; font-weight: 400; }
body.home .questions__text { font-size: 16px; font-weight: 600; }
body.home .post__title { font-size: 20px; font-weight: 400; line-height: 1.4; }
body.home .post__title a { font-weight: 400; }
body.home .post__excerpt { font-size: 14px; line-height: 1.5; }
body.home .post__meta, body.home .post__author, body.home .post__meta span { font-size: 12px; font-weight: 400; }
.site-footer { font-size: 14px; }
.site-footer .footer__heading { font-size: 15px; font-weight: 400; }
.site-footer .footer__col a, .site-footer .footer__col p, .site-footer .footer__legal, .site-footer .footer__legal p { font-size: 14px; line-height: 1.6; text-decoration: none; }
.site-footer .field label { font-size: 14px; font-weight: 400; }
.site-footer .check, .site-footer .btn { font-size: 16px; font-weight: 400; }
.site-footer .footer__news-title { font-size: 38px; line-height: 1; }

/* Headings: sizes measured at 1280px, growing to 1.25x by 1600px (the same steps as the client's site) */
body.home .hero__title { font-size: clamp(2rem, 4.1vw, 65.6px); line-height: 1; }
body.home .about__title { font-size: clamp(1.9rem, 3.89vw, 62.3px); line-height: 1; }
body.home .about__title span + span { font-weight: 300; }
body.home .wwd__title, body.home .care__title, body.home .blog__title, body.home .contact__title { font-size: clamp(2.4rem, 5.26vw, 84.2px); line-height: 1; }
body.home .solutions__title { font-size: clamp(2.4rem, 5.31vw, 68px); line-height: 1.2; }
body.home .svc__title { font-size: 28px; line-height: 1.2; }
body.home .care-card__title { font-size: clamp(1.4rem, 2.02vw, 32.3px); line-height: 1; }
body.home .reviews__title { font-size: clamp(2rem, 4.22vw, 67.5px); line-height: 1.1; }
body.home .review blockquote p { font-size: clamp(1.1rem, 1.64vw, 26.25px); line-height: 1.2; }
body.home .questions__title { font-size: clamp(1.4rem, 2.36vw, 45.4px); line-height: 1.2; }
body.home .marquee__item { font-size: clamp(2rem, 5.05vw, 80.8px); line-height: 1.2; text-transform: capitalize; }

/* ==========================================================================
   GRID (desktop). Content widths follow the client's site: 1360px for most sections,
   1660px for What We Do, Blogs and the footer.
   ========================================================================== */
@media (min-width: 1025px) {
  /* ---- Header: navigation items 18px apart ---------------------- */
  .site-header__inner { max-width: none; }
  .site-nav__list { gap: 18px; margin-right: 11rem; }
  .sub-toggle { width: 16px; margin-left: 0; justify-content: flex-end; }
  .sub-toggle svg { width: 10px; height: 10px; }

  /* ---- Vertical rhythm (measured on the client's site at 1280px, scaled like the rest) ------- */
  body.home .hero { min-height: max(100vh, calc(860 * var(--u))); }
  body.home .about { padding-block: calc(38 * var(--u) + 51 * var(--t)) calc(29 * var(--u) + 53 * var(--t)); }
  body.home .wwd { padding-block: calc(56 * var(--u)) calc(55 * var(--u) - 29 * var(--t)); }
  body.home .solutions { padding-block: calc(56 * var(--u)) calc(41 * var(--u) + 49 * var(--t)); }
  body.home .care { padding-block: calc(64 * var(--u) + 16 * var(--t)) calc(8 * var(--u)); }
  body.home .insurance { padding-block: calc(9 * var(--u)) calc(60 * var(--u) + 30 * var(--t)); margin: 0px 15%; }
  body.home .insurance__pill { margin-bottom: 6px; }
  body.home .reviews { padding-block: calc(52 * var(--u) + 11 * var(--t)) calc(38 * var(--u) + 46 * var(--t)); }
  body.home .blog { padding-block: calc(38 * var(--u) + 21 * var(--t)) calc(38 * var(--u) + 10 * var(--t)); }
  body.home .contact { padding-block: calc(49 * var(--u) + 13 * var(--t)) calc(43 * var(--u) + 10 * var(--t)); }
  body.home .questions { padding-block: calc(37 * var(--u)) calc(40 * var(--u) + 6 * var(--t)); }
  .site-footer { padding-block: calc(57 * var(--u)) calc(57 * var(--u) - 27 * var(--t)); }

  /* ---- Hero ---------------------------------------------------------------------------------- */
  body.home .hero__inner { position: relative; top: 12px; max-width: min(calc(1064 * var(--u)), calc(100% - 2 * var(--wrap-pad))); padding-inline: 0; }
  body.home .hero__title { max-width: calc(676 * var(--u)); }
  body.home .hero__title-last { display: block; }
  body.home .hero__eyebrow { margin-bottom: 10px; }
  body.home .hero__cta { align-items: flex-start; gap: calc(30 * var(--u)); margin-top: calc(45 * var(--u)); padding-left: calc(8 * var(--u)); }
  body.home .hero__cta .btn { font-weight: 400; }
  body.home .hero__cta .btn--primary { color: #fff; }
  body.home .hero__cta .btn:first-child { width: calc(330 * var(--u)); min-height: 67px; border-radius: 300px; font-size: calc(15 * var(--u)); }
  body.home .hero__cta .btn:nth-child(2) { width: calc(299 * var(--u)); min-height: calc(49 * var(--u)); margin-top: calc(2 * var(--u)); padding-inline: 12px; border-radius: calc(24 * var(--u)); font-size: calc(14.5 * var(--u)); }
  body.home .hero__logo { left: calc(50% + 280 * var(--u)); right: auto; width: calc(264 * var(--u)); top: 37%; }

  /* ---- About --------------------------------------------------------------------------------- */
  body.home .about > .container { max-width: min(calc(1064 * var(--u)), calc(100% - 2 * var(--wrap-pad))); padding-inline: 0; }
  body.home .about__title { max-width: calc(845 * var(--u)); margin-inline: auto; }
  body.home .about__title { margin-top: 39px; }
  body.home .about__body { max-width: 62rem; margin: 28px auto 0; color: #1c1f30; }
  body.home .about__body p { margin: 0; }

  /* ---- What We Do: 1660px box, 1200 (x1.25) of content -------------------------------------- */
  body.home .wwd > .container { max-width: 1660px; padding-inline: 0; }
  body.home .wwd__grid { width: min(calc(1200 * var(--u)), calc(100% - 2 * var(--wrap-pad))); margin-inline: auto; grid-template-columns: minmax(0, 1fr) minmax(0, calc(346 * var(--u))) minmax(0, calc(347 * var(--u))); column-gap: calc(81 * var(--u)); align-items: center; }
  body.home .wwd__cards { display: contents; }
  body.home .wwd__card { align-self: start; min-height: calc(258 * var(--u)); padding: 35px calc(30 * var(--u)); border-radius: calc(18 * var(--u)); }
  body.home .wwd__card:nth-child(2) { display: flex; flex-direction: column; justify-content: center; /* min-height: calc(289 * var(--u)); */ padding: calc(20 * var(--u)) calc(9 * var(--u)); }
  body.home .wwd__card p { margin-bottom: 24px; }
  body.home .wwd__card p:has(+ ul) { margin-bottom: 0; }
  body.home .wwd__card ul { margin: 0 0 24px; padding: 0; list-style: none; }
  body.home .wwd__card li { margin: 0; }
  body.home .wwd__card li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; background: currentColor; vertical-align: .12em; }
  body.home .wwd__card > :last-child { margin-bottom: 0; }

  /* ---- Services (navy band) ------------------------------------------------------------------ */
  body.home .solutions > .container { max-width: 1360px; padding-inline: 0; }
  body.home .svc__title { margin-top: calc(24 * var(--u)); }
  body.home .svc__text { margin-top: calc(16 * var(--u)); }
  body.home .solutions__grid { width: min(calc(956 * var(--u)), calc(100% - 2 * var(--wrap-pad))); margin-inline: auto; gap: 40px; }

  /* ---- Client-focused care: left-aligned block, three 323px cards 64px apart ---------------- */
  body.home .care > .container { max-width: none; width: min(calc(1130 * var(--u)), calc(100% - 2 * var(--wrap-pad))); margin-left: max(var(--wrap-pad), calc(50% - 520 * var(--u))); margin-right: 0; padding-inline: 0; }
  body.home .care__intro { max-width: none; margin-top: 39px; }
  body.home .care__grid { width: min(calc(1098 * var(--u)), 100%); margin-left: calc(6 * var(--u)); gap: calc(40 * var(--u)) min(calc(64 * var(--u)), 5vw); }
  body.home .care-card { padding: calc(20 * var(--u)) 10px calc(16 * var(--u)); }
  body.home .care-card__icon { height: calc(56 * var(--u)); margin-bottom: 0; }
  body.home .care-card__text { margin-top: calc(6 * var(--u)); line-height: 1.25; }
  body.home .care-card__more { min-height: calc(20 * var(--u)); margin-top: 0; padding: 0; line-height: calc(20 * var(--u)); }
  body.home .care__grid { margin-top: 28px; }
  body.home .care-card { border-radius: calc(24.2 * var(--u)); }
  /* one-line description with an ellipsis; icon tinted in a tone of its card */
  body.home .care-card:not(.is-expanded) .care-card__text > p:first-child { -webkit-line-clamp: 1; line-clamp: 1; }
  body.home .care-card--sage .care-card__icon { filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='t' color-interpolation-filters='sRGB'%3E%3CfeColorMatrix values='0 0 0 0 .3255 0 0 0 0 .5137 0 0 0 0 .5569 0 0 0 1 0'/%3E%3C/filter%3E%3C/svg%3E#t"); }
  body.home .care-card--periwinkle .care-card__icon { filter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='t' color-interpolation-filters='sRGB'%3E%3CfeColorMatrix values='0 0 0 0 .6627 0 0 0 0 .7647 0 0 0 0 .9922 0 0 0 1 0'/%3E%3C/filter%3E%3C/svg%3E#t"); }

  /* ---- Reviews / Contact / Questions: 1360px at most (86.4% of the screen below that) ------ */
  body.home .questions__text { margin: 14px auto 0; }
  body.home .questions__mail { min-height: 42px; margin-top: 20px; }
  body.home .reviews > .container, body.home .contact > .container, body.home .questions > .container { max-width: min(86.4vw, 1360px); padding-inline: 0; }
  body.home .reviews__title { max-width: calc(515 * var(--u)); }
  body.home .reviews__grid { gap: calc(24.5 * var(--u)); }
  body.home .contact__lead { max-width: calc(605 * var(--u)); margin-left: calc(15 * var(--u)); }
  body.home .contact .form { max-width: calc(578 * var(--u)); margin-left: calc(24 * var(--u)); }
  body.home .contact .field { margin-bottom: 18px; }
  body.home .contact .fieldset:has(.dt) { margin-bottom: 0; }
  body.home .contact .form .btn { min-height: 42px; }
  body.home .contact .checks { gap: 12px; }
  body.home .contact .check { min-height: 24px; }
  body.home .contact__grid { grid-template-columns: 56.8% 37.8%; justify-content: space-between; gap: 0; }
  body.home .contact__media { max-width: none; width: 100%; aspect-ratio: auto; max-height: none; height: clamp(980px, calc(980px + (100vw - 1280px) * .0375), 1004px); }

  /* ---- Blogs: 1660px box, cards fill the width (1600px at most), 32px apart ---------------- */
  body.home .blog > .container { max-width: 1660px; padding-inline: 0; }
  body.home .blog__title { padding-inline: var(--wrap-pad); }
  body.home .blog__grid { width: min(100%, 1600px); margin-inline: auto; gap: 32px; }
  body.home .post { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
  body.home .post__media { aspect-ratio: 4 / 3; }
  body.home .post__body { min-height: 320px; padding: 20px 24px 16px; }

  /* ---- Footer: four equal columns, 86.4% of the screen up to 1660px ------------------------- */
  .site-footer > .container { max-width: min(86.4vw, 1660px); padding-inline: 0; }
  .site-footer .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .site-footer .footer__grid > .footer__col { padding-inline: 8px; }
  .site-footer .footer__grid > .footer__col:last-child { padding-inline: 28px 8px; }
  .site-footer .footer__col a { min-height: 0; }
  .site-footer .footer__col li { margin-bottom: 2px; }
  .site-footer .footer__legal { margin-top: 0; padding-top: 20px; }
}

/* Reviews: same navy as the Services band, with light text */
body.home .reviews { background: var(--color-bg-navy); color: var(--color-text-inverse); }
body.home .reviews__title, body.home .reviews blockquote, body.home .reviews blockquote p, body.home .reviews figcaption { color: var(--color-text-inverse); }
body.home .reviews .pill { background: #fff; color: var(--color-bg-navy); }

/* Contact: paragraph + button (no form) */
body.home .contact__content { align-self: center; }
body.home .contact__content .btn { margin-top: 28px; margin-left: calc(15 * var(--u)); }
@media (min-width: 1025px) {
  body.home .contact__grid { align-items: center; }
  body.home .contact__media { height: clamp(560px, 52vw, 700px); }
}
