/* ==========================================================================
   Acorn Estate Solutions – shared stylesheet (all pages)
   Sizing: everything is in rem. From 1024px up the root font-size follows
   the viewport width, so the layout scales with the 90% container on large
   screens (1440px = 16px, 1920px = 21.3px ...). Same system as Hospice Docs.
   ========================================================================== */

:root {
  --blue: #3a5970;        /* headings */
  --navy: #43607b;        /* logo, buttons, links */
  --rust: #b3543d;        /* accent */
  --sky: #edf4fc;         /* light blue sections */
  --gray: #f2f2f2;        /* light gray sections */
  --header-bg: #eeeeee;
  --line: #b9c3cc;
  --ghost: #e9edf1;
  --text: #1c1c1c;
  --white: #fff;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --header-h: 4.6rem;     /* real value is measured in main.js */
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* up to 1920px everything is 10% smaller (1vw instead of 1.1111vw);
   above 1920px it grows back towards the original ratio without a jump */
@media (min-width: 1024px) {
  html { font-size: max(13px, 1vw); }
}
@media (min-width: 1921px) {
  html { font-size: calc(1.1111vw - 2.13px); }
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
body.nav-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0 0 1.5em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; display: block; }

.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  background: var(--navy); color: var(--white); padding: .6rem 1rem; border-radius: .5rem;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.container { width: 90%; margin-inline: auto; }
.container--narrow { max-width: 70rem; }
@media (min-width: 1024px) { .container { width: 85%; } }
.center { text-align: center; }

/* ---------- Typography ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--blue); line-height: 1.25; }
h2 { font-size: clamp(1.7rem, 6vw, 3.1rem); }
h2 > span, h1 > span { display: block; }
.h-light { display: block; font-weight: 300; color: var(--text); font-size: .9em; }
.t-rust { color: var(--rust); }

.eyebrow { margin: 0 0 .3rem; font-size: clamp(1.15rem, 3.6vw, 1.85rem); font-weight: 600; color: var(--blue); }
.center-head { text-align: center; margin-bottom: 3rem; }
@media (min-width: 1024px) { .center-head { margin-bottom: 4.5rem; } }
.h-sub { font-size: clamp(1.3rem, 3.6vw, 1.75rem); margin-bottom: .8rem; }

.rule { display: block; width: 7.5rem; height: 2px; background: var(--rust); margin: 1.8rem 0; }

.dot-list { margin-bottom: 1.8rem; }
.dot-list li { position: relative; padding-left: 1rem; margin-bottom: .35rem; line-height: 1.6; }
.dot-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .38rem; height: .38rem; border-radius: 50%; background: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1.2; text-align: center;
  border: 1px solid currentColor; border-radius: .75rem;
  padding: .95rem 1.4rem; font-size: 1.1rem; background: var(--white);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); color: var(--white); }
.btn--rust { color: var(--rust); }
.btn--rust:hover { background: var(--rust); border-color: var(--rust); }
.btn--blue { color: var(--navy); }
.btn--blue:hover { background: var(--navy); border-color: var(--navy); }

/* ---------- Placeholder (missing images) ---------- */
.placeholder {
  display: grid; place-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, #e4e8ec 0 12px, #edf0f3 12px 24px);
  color: #7a8794; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
}

/* ==========================================================================
   Header – fixed, shrinks after scrolling (.is-scrolled is set in main.js)
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: .8rem;
  transition: padding .4s var(--ease);
}
/* background on a pseudo element so the header never becomes a containing
   block for the fixed mobile drawer */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--header-bg);
  transition: box-shadow .4s var(--ease);
}
.site-header.is-scrolled::before { box-shadow: 0 .3rem 1.5rem rgba(30, 45, 60, .12); }
.site-header.is-scrolled { padding-block: .5rem; }

.header__inner { position: relative; display: flex; align-items: center; }
.logo { flex: none; }
.logo img { width: 13rem; transition: width .4s var(--ease); }
.is-scrolled .logo img { width: 11rem; }

.header__top { display: none; align-items: center; gap: 1.5rem; }
.header__contact { display: flex; align-items: center; gap: .55rem; font-size: .85rem; font-weight: 500; color: var(--text); transition: color .25s; }
.header__contact:hover { color: var(--rust); }
.header__contact .icon { width: 1.05rem; height: 1.05rem; color: #555; }

.socials { display: flex; align-items: center; gap: .9rem; color: var(--navy); }
.socials a { display: block; transition: transform .3s var(--ease), color .3s; }
.socials a:hover { transform: translateY(-2px); opacity: .7; }
.social-icon { display: block; width: auto; height: 1.35rem; }
.social-icon--youtube { height: 1.2rem; }

/* hamburger */
.nav-toggle {
  margin-left: auto; flex: none; width: 2.75rem; height: 2.75rem; border-radius: .7rem;
  display: grid; place-content: center; gap: .36rem;
}
.nav-toggle span { display: block; width: 1.6rem; height: .16rem; border-radius: 2px; background: var(--navy); }

/* ---------- Navigation: mobile drawer ---------- */
.main-nav {
  position: fixed; top: 0; right: 0; z-index: 2;
  width: min(23rem, 88vw); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--white); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -1rem 0 3rem rgba(30, 45, 60, .2);
  transform: translateX(105%); visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s .45s;
}
.nav-open .main-nav { transform: none; visibility: visible; transition: transform .45s var(--ease), visibility 0s; }

.nav-overlay {
  position: fixed; inset: 0; z-index: 1; height: 100vh; height: 100dvh;
  background: rgba(30, 45, 60, .55);
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s .45s;
}
.nav-open .nav-overlay { opacity: 1; visibility: visible; transition: opacity .45s var(--ease), visibility 0s; }

.main-nav__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--gray);
}
.main-nav__head img { width: 11rem; }
.nav-close { width: 2.5rem; height: 2.5rem; display: grid; place-content: center; color: var(--navy); font-size: 1.2rem; }

.main-nav__list { padding: .5rem 0; }
.main-nav__list > li > a {
  display: block; padding: .9rem 1.25rem;
  font-size: .95rem; font-weight: 500; text-transform: uppercase; color: var(--text);
}
.main-nav__list > li > a[aria-current="page"] { font-weight: 700; color: var(--navy); }

.main-nav__extra {
  margin-top: auto; padding: 1.5rem 1.25rem 2rem; border-top: 1px solid var(--gray);
  display: flex; flex-direction: column; gap: 1rem;
}
.main-nav__contact { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: var(--navy); font-size: .9rem; }

/* ---------- Navigation: desktop ---------- */
@media (min-width: 1024px) {
  .site-header { padding-block: 1rem; }
  .site-header.is-scrolled { padding-block: .6rem; }
  .logo img { width: 23rem; }
  .is-scrolled .logo img { width: 14rem; }

  .header__right { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .9rem; transition: gap .4s var(--ease); }
  .is-scrolled .header__right { gap: 0; }
  .header__top {
    display: flex; max-height: 3rem; overflow: hidden;
    transition: max-height .4s var(--ease), opacity .3s var(--ease), visibility 0s;
  }
  .is-scrolled .header__top {
    max-height: 0; opacity: 0; visibility: hidden;
    transition: max-height .4s var(--ease), opacity .3s var(--ease), visibility 0s .4s;
  }
  .header__divider { width: 1px; height: 1.6rem; background: var(--navy); }

  .nav-toggle, .nav-overlay, .main-nav__head, .main-nav__extra { display: none; }

  .main-nav {
    position: static; width: auto; height: auto; display: block;
    background: none; overflow: visible; box-shadow: none;
    transform: none; visibility: visible; transition: none;
  }
  .main-nav__list { display: flex; align-items: center; gap: 1.9rem; padding: 0; }
  .main-nav__list > li > a { position: relative; padding: .35rem 0 .55rem; font-size: .9rem; font-weight: 600; letter-spacing: .12em; color: #2b2b2b; transition: color .25s; }
  .main-nav__list > li > a:hover { color: var(--navy); }
  .main-nav__list > li > a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--navy);
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .main-nav__list > li > a:hover::after,
  .main-nav__list > li > a[aria-current="page"]::after { transform: scaleX(1); }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: 4rem; position: relative; }
@media (min-width: 1024px) { .section { padding-block: 6.5rem; } }
.section--sky { background: var(--sky); }
.section--gray { background: var(--gray); }

/* soft wave background (intro + "What Acorn Coordinates") */
.section--wave { background-color: #f5f5f5; overflow: hidden; }
.section--wave::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 600' preserveAspectRatio='none'%3E%3Cpath d='M0 260C260 200 520 230 760 330s480 140 680 60V600H0z' fill='%23fff' fill-opacity='.55'/%3E%3Cpath d='M380 0C620 60 900 40 1100 20s280 0 340 30V0z' fill='%23fff' fill-opacity='.7'/%3E%3Cpath d='M0 560C200 520 420 540 600 600H0z' fill='%23fff' fill-opacity='.6'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.section--wave > .container { position: relative; }
.section--wave.section--gray { background-color: #ececec; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--white); background: #1d2a35; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 30, .75) 0%, rgba(30, 50, 70, .45) 55%, rgba(30, 50, 70, .1) 100%);
}
.hero__text { position: relative; z-index: 1; padding-block: 4rem; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 8vw, 4rem); line-height: 1.25; }
.hero__tagline { margin: 1.4rem 0 0; font-size: clamp(1.15rem, 3.6vw, 1.9rem); font-weight: 600; font-style: italic; line-height: 1.5; max-width: 40rem; }
.hero__lead { font-size: clamp(1rem, 2.8vw, 1.4rem); line-height: 1.45; max-width: 31rem; }
@media (min-width: 1024px) {
  .hero__text { padding-block: 7rem 6rem; }
}

/* ---------- Intro ---------- */
.intro h2 { margin-bottom: 2.5rem; }
.intro .h-light { font-size: .95em; }
.intro p { font-size: 1.1rem; line-height: 2.05; }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3.5rem; margin-top: 3rem; }
.btn-row .btn { width: min(100%, 30rem); }

/* ---------- Who we work with ---------- */
.cards2 { display: grid; gap: 2rem; }
@media (min-width: 900px) { .cards2 { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.wcard {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--white); border-radius: 2.2rem; padding: 2.5rem 1.5rem;
}
@media (min-width: 1024px) { .wcard { padding: 3.2rem 2.5rem 2.2rem; } }
.wcard h3 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin-bottom: 1.4rem; }
.wcard p { font-size: 1.05rem; line-height: 2.05; margin-bottom: 2.5rem; }
.wcard img { border-radius: 2rem; margin-bottom: 2.2rem; width: 100%; }
.wcard .btn { margin-top: auto; }

/* ---------- Split (text + image) ---------- */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .split--media-left { grid-template-columns: .75fr 1fr; gap: 4.5rem; }
}
.split__media img { width: 100%; border-radius: 2rem; }
.split__text { font-size: 1.05rem; }
.split__text > p { line-height: 2.05; }

/* ---------- Features (What Acorn coordinates) ---------- */
.features { display: grid; gap: 2.5rem 6rem; max-width: 72rem; margin-inline: auto; }
@media (min-width: 900px) { .features { grid-template-columns: 1fr 1fr; gap: 3.5rem 6rem; } }
.feature h3 { display: flex; align-items: center; gap: 1.6rem; font-size: clamp(1.4rem, 4vw, 2.1rem); margin-bottom: 1.1rem; }
.feature h3 img { width: auto; height: 3.6rem; flex: none; }
.feature p { font-size: 1.05rem; line-height: 2.05; }

/* ---------- Steps ---------- */
.steps { display: grid; gap: 1.5rem; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  /* cards keep their own height; the middle column sits higher (staggered) */
  .steps { grid-template-columns: repeat(3, 1fr); align-items: start; gap: 2.8rem 3.6rem; padding-top: 4.5rem; }
  .step { min-height: 16.5rem; }
  .step:nth-child(3n+2) { position: relative; top: -4.5rem; }
}
.step {
  position: relative; overflow: hidden; z-index: 0;
  border: 1px solid var(--navy); border-radius: .5rem; background: var(--white);
  padding: 2.2rem 1.6rem 2.4rem; text-align: center;
}
/* big light number behind the text */
.step::after {
  content: attr(data-n); position: absolute; z-index: -1; left: 50%; top: 58%; transform: translate(-50%, -50%);
  font-size: 8.5rem; font-weight: 700; line-height: 1; color: #e6eaee; letter-spacing: -.01em;
}
.step h3 { color: var(--rust); font-size: clamp(1.25rem, 3.4vw, 1.75rem); margin-bottom: 1.2rem; }
.step p { font-size: 1.1rem; line-height: 2.1; max-width: 21rem; margin-inline: auto; }

/* ---------- About ---------- */
.about .split__media img { border-radius: 0; max-width: 28rem; margin-inline: auto; }
.h-left { font-size: clamp(1.8rem, 6vw, 3.1rem); margin-bottom: 2rem; }
.eyebrow--left { text-align: left; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--white); }
.cta-band__bg { width: 100%; }
.cta-band__text { position: relative; z-index: 1; padding-block: 2.5rem 4rem; }
.cta-band__text p { font-size: 1.1rem; line-height: 2.05; max-width: 33rem; }
.cta-band__text .btn { margin-top: 1rem; }
@media (min-width: 900px) {
  .cta-band__bg { position: absolute; inset: 0; height: 100%; object-fit: cover; object-position: right center; }
  .cta-band__text { padding-block: 6.5rem; }
  .cta-band__text h2, .cta-band__text p { max-width: 36rem; }
}

/* ---------- Testimonials ---------- */
.testimonials .center-head { margin-bottom: 3rem; }
.slider__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.slider__track::-webkit-scrollbar { display: none; }
.t-card {
  flex: 0 0 100%; scroll-snap-align: start;
  display: grid; gap: 2rem; align-items: center; padding-inline: 1px;
}
@media (min-width: 900px) {
  .t-card { grid-template-columns: .8fr 1.2fr; gap: 4.5rem; padding-inline: 3rem; }
}
.t-card__media { aspect-ratio: 427 / 393; width: 100%; }
.t-card__media img { width: 100%; height: 100%; object-fit: cover; }
.stars { width: 10.5rem; height: auto; margin-bottom: 1rem; }
.t-card h3 { color: #000; font-weight: 700; font-size: clamp(1.25rem, 3.4vw, 1.9rem); line-height: 1.4; margin-bottom: 1.2rem; max-width: 30rem; }
.t-card p { font-size: 1.1rem; line-height: 2.2; margin-bottom: 1rem; }
.t-card cite { font-style: normal; font-size: clamp(1.2rem, 3vw, 1.9rem); color: var(--navy); }
.t-card cite strong { font-weight: 700; }

.slider__nav { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 3rem; color: var(--navy); }
.slider__btn { width: 2rem; height: 2rem; display: grid; place-content: center; transition: color .25s; }
.slider__btn:hover { color: var(--rust); }
.slider__btn .icon { width: 1.1rem; height: 1.1rem; }
.slider__dots { display: flex; gap: .45rem; }
.slider__dots button { width: 1.1rem; height: 1.2rem; position: relative; }
.slider__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--navy); transition: background-color .25s; }
.slider__dots button.is-active::before, .slider__dots button:hover::before { background: var(--rust); }

/* ---------- FAQ ---------- */
.faq__list { max-width: 72rem; margin-inline: auto; }
.faq__item { border-bottom: 1px solid #b5b5b5; }
.faq__item h3 { font-size: inherit; }
.faq__item button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.6rem 0; text-align: left;
  font-size: clamp(1.05rem, 3vw, 1.5rem); font-weight: 700; color: var(--navy); line-height: 1.4;
}
.faq__icon {
  position: relative; flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--rust);
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: .7rem; height: 2px; background: var(--navy);
  transform: translate(-50%, -50%); transition: transform .3s var(--ease);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.is-open .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq__panel > div { overflow: hidden; }
.is-open > .faq__panel { grid-template-rows: 1fr; }
.faq__panel p { padding-bottom: 1.8rem; max-width: 56rem; line-height: 1.9; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  --footer-bg: none; /* PLACEHOLDER: url("../images/home-page/footer-background.webp") */
  position: relative; border-top: 6px solid var(--rust);
  background: #e9e5df var(--footer-bg) center / cover no-repeat;
  padding-top: 3.5rem; color: var(--text);
}
.site-footer::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .72); }
.site-footer > * { position: relative; }

.footer__grid { display: grid; gap: 3rem; text-align: center; }
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.15fr 1fr 1fr; gap: 0; text-align: left; align-items: stretch; }
  /* columns stay full height (divider line), their content is centered vertically */
  .footer__grid > div { display: flex; flex-direction: column; justify-content: center; }
  .footer__contact { align-items: center; }
  .footer__brand { padding-right: 4rem; border-right: 1px solid var(--navy); }
  .footer__contact { padding-inline: 3rem; }
}
.footer__brand a img { width: 24rem; max-width: 100%; margin: 0 auto 2.5rem; }
.footer__brand p { font-size: 1.05rem; line-height: 2.05; text-align: center; }

.footer__contact { text-align: center; }
.footer__title { margin: 0 0 .8rem; font-weight: 700; font-size: 1.15rem; text-transform: uppercase; color: var(--navy); }
.footer__phone {
  display: block; width: fit-content; margin: 0 auto 1.6rem; padding: .35rem 2.8rem;
  background: var(--navy); color: var(--white); border-radius: .4rem;
  font-weight: 700; font-size: 1.75rem; transition: background-color .3s;
}
.footer__phone:hover { background: var(--rust); }
.footer__mail { display: block; font-weight: 600; font-size: 1.1rem; margin-bottom: 2.2rem; overflow-wrap: anywhere; }
.footer__mail:hover { color: var(--rust); }
.footer__menu li a { display: inline-block; padding: .15rem 0; font-size: .95rem; font-weight: 500; text-transform: uppercase; transition: color .25s; }
.footer__menu li a:hover { color: var(--rust); }

/* newsletter column: everything centered in one narrow block */
.footer__news { width: 100%; max-width: 20rem; margin-inline: auto; text-align: center; }
@media (min-width: 1024px) { .footer__news { margin-right: 0; } }
.footer__title--news { text-transform: none; font-weight: 600; font-size: 1.2rem; margin-bottom: 1.6rem; }
.news-form { height: 12.5rem; border-radius: .4rem; }

.footer__follow { display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin-top: 2.8rem; }
.footer__follow > span { font-size: 1.6rem; font-weight: 700; color: var(--navy); margin-right: .2rem; }
.footer__follow .socials { gap: 1.1rem; }
.footer__follow .social-icon { height: 1.9rem; }
.footer__follow .social-icon--youtube { height: 1.7rem; }

.footer__bottom { margin-top: 3rem; padding: 1rem 0 1.4rem; border-top: 1px solid var(--navy); text-align: center; font-size: .9rem; color: #8a8a8a; }
.footer__bottom p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
