/* ==========================================================================
   Shared layout: header, navigation, footer, back-to-top button.
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--cream);
}
.site-header__inner { position: relative; width: var(--column); height: 100%; margin-inline: auto; }

.site-logo {
  position: absolute; left: -14.3rem; top: 3rem;
  width: 14.3rem; height: 5rem;
  color: var(--green-800);
}
.site-logo svg { width: 100%; height: 100%; }

.site-nav { position: absolute; left: 6.6rem; top: 3.9rem; }
.site-nav__list { display: flex; gap: .4rem; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: block; padding: .9rem 1.4rem;
  border-radius: 10rem;
  font-size: 1.5rem; line-height: 1; white-space: nowrap;
  color: var(--green-800); text-decoration: none;
  transition: background-color .2s ease;
}
.site-nav__link:hover { background: var(--white); }
.site-nav__link.is-active { background: var(--lilac-100); color: var(--purple); }

.site-nav__sub {
  position: absolute; left: 0; top: 100%;
  padding: 1rem 1rem 0;
  background: var(--white); border-radius: 2rem;
  box-shadow: 0 -.8rem 3rem rgba(0, 63, 40, .14);
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s;
}
.site-nav__item:hover > .site-nav__sub,
.site-nav__item:focus-within > .site-nav__sub { visibility: visible; opacity: 1; }
.site-nav__sub li { padding-bottom: 1rem; }
.site-nav__sub a {
  display: block; padding: 1rem;
  font-size: 1.5rem; line-height: 1; letter-spacing: .03rem; white-space: nowrap;
  color: var(--green-800); text-decoration: none;
}
.site-nav__sub a:hover { background: var(--paper); }
.site-nav__sub a.is-current { display: flex; align-items: center; }
.site-nav__sub a.is-current::before { /* the current page: a purple dot before its label, as on the original */
  content: ""; flex: none; width: .7rem; height: .7rem; margin-right: .8rem;
  border-radius: 50%; background: var(--purple); transform: translateY(-.15rem);
}

.nav-toggle, .site-nav__sub-toggle { display: none; }

/* Desktop: logo and menu as one group centred on the page (deliberately different from the Wix original,
   where the logo hung left of the content column and the menu ended short of its right edge). */
@media (min-width: 601px) {
  .site-header__inner { display: flex; justify-content: center; align-items: flex-start; gap: 5rem; width: auto; }
  .site-logo { position: static; flex: none; margin-top: 3rem; }
  .site-nav { position: static; margin-top: 3.9rem; }
}

@media (max-width: 600px) {
  .site-header__inner { width: auto; }
  .site-header::after { /* hairline under the logo row */
    content: ""; position: absolute; left: 3.1rem; width: 11.4rem; top: 4.8rem; height: 1px;
    background: #c7d4ca;
  }
  .site-logo { left: 2.5rem; top: 2.3rem; width: 12rem; height: 4.2rem; z-index: 3; }

  .nav-toggle {
    display: block; position: absolute; left: 25.7rem; top: 1.9rem; z-index: 3;
    width: 5rem; height: 5rem; padding: 0; border: 0; background: none;
  }
  .nav-toggle span {
    position: absolute; left: 1.4rem; width: 2.2rem; height: .2rem;
    border-radius: .2rem; background: var(--ink);
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav-toggle span:nth-child(1) { top: 1.5rem; }
  .nav-toggle span:nth-child(2) { top: 2.4rem; }
  .nav-toggle span:nth-child(3) { top: 3.3rem; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(.9rem) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-.9rem) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: 0; z-index: 2;
    padding: 12.2rem 0 4rem; overflow-y: auto;
    background: var(--cream);
    visibility: hidden; opacity: 0;
    transition: opacity .25s ease, visibility .25s;
  }
  .nav-open .site-nav { visibility: visible; opacity: 1; }
  .nav-open .site-logo { visibility: hidden; }
  .nav-open .site-header::after { display: none; }
  .nav-open body { overflow: hidden; }

  .site-nav__list { flex-direction: column; align-items: center; gap: 0; }
  .site-nav__item { width: 21.1rem; }
  .site-nav__link, .site-nav__link:hover, .site-nav__link.is-active {
    padding: 0; border-radius: 0; background: none;
    font-size: 1.8rem; line-height: 4.1rem; text-align: center;
    color: var(--sage);
  }
  .site-nav__sub-toggle {
    display: block; position: absolute; right: 0; top: 0;
    width: 5rem; height: 4.1rem; padding: 0; border: 0; background: none;
    color: var(--sage);
  }
  .site-nav__sub-toggle svg { width: 1.2rem; margin: auto; transition: transform .2s ease; }
  .site-nav__sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

  .site-nav__sub {
    position: static; display: none;
    margin: .3rem 0 .6rem; padding: .5rem 0 .4rem;
    border-radius: 1.5rem; box-shadow: none;
    background: #e6e0fc;
    visibility: visible; opacity: 1; transition: none;
  }
  .site-nav__item.is-open > .site-nav__sub { display: block; }
  .site-nav__sub li { padding: 0; }
  .site-nav__sub a.is-current { display: block; }
  .site-nav__sub a.is-current::before { content: none; }
  .site-nav__sub a, .site-nav__sub a:hover {
    padding: 0; background: none;
    font-size: 1.5rem; line-height: 4.1rem; letter-spacing: 0; text-align: center;
    color: var(--sage);
  }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--green-800); color: var(--paper); }
.site-footer__inner {
  position: relative; width: 106rem; height: 39.9rem; margin-inline: auto; padding-top: 6.4rem;
  display: grid; grid-template-columns: 31.4rem 25.7rem 31.5rem 1fr; align-content: start;
}
.site-footer a { text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--lime); }

.site-footer__logo { display: block; width: 14.9rem; height: 5.2rem; color: var(--paper); }
.site-footer .site-footer__logo:hover { color: var(--paper); } /* no hover change; must outrank .site-footer a:hover */
.site-footer__logo svg { width: 100%; height: 100%; }
.site-footer__tagline {
  width: 25rem; margin-top: 1.6rem;
  font-size: 1.4rem; line-height: 2.17rem; color: rgba(244, 243, 239, .9);
}

.site-footer__heading {
  margin-bottom: .78rem;
  font-size: 1.3rem; line-height: 1.82rem; letter-spacing: .104rem; text-transform: uppercase;
  color: var(--lilac-300);
}
.site-footer__col li { font-size: 1.45rem; line-height: 2.755rem; }
.site-footer__col .site-footer__phone { font-weight: var(--heavy); font-size: 1.5rem; line-height: 2.85rem; }
.site-footer__contact li:first-child { line-height: 2.85rem; }

.site-footer__addresses li {
  --address-lh: 2.1rem; position: relative; margin-bottom: .8rem; padding-left: 1.5rem;
  font-size: 1.4rem; line-height: var(--address-lh);
}
.site-footer__addresses li::before { /* map pin with a small hole, left edge in line with the heading, 1px above the address line's centre */
  content: ""; position: absolute; left: 0; top: calc((var(--address-lh) - .98rem) / 2 - .1rem);
  width: .735rem; height: .98rem; background: var(--lilac-300);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.37 0 0 5.3 0 11.85 0 20.75 12 32 12 32s12-11.25 12-20.15C24 5.3 18.63 0 12 0zm0 7a4.5 4.5 0 1 0 0 9 4.5 4.5 0 1 0 0-9z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill-rule='evenodd' d='M12 0C5.37 0 0 5.3 0 11.85 0 20.75 12 32 12 32s12-11.25 12-20.15C24 5.3 18.63 0 12 0zm0 7a4.5 4.5 0 1 0 0 9 4.5 4.5 0 1 0 0-9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-footer__addresses span {
  display: block; width: 19rem;
  font-size: 1.25rem; line-height: 1.812rem; color: rgba(244, 243, 239, .75);
}

.site-footer__social { position: absolute; left: 0; top: 22.3rem; display: flex; gap: .8rem; }
.site-footer__social a {
  display: grid; place-items: center; width: 3.8rem; height: 3.8rem;
  border-radius: 50%; background: var(--lilac-300); color: var(--green-800);
}
.site-footer__social a { transition: background-color .2s ease; }
.site-footer__social a:hover { background: var(--lime); color: var(--green-800); }
.site-footer__social svg { width: 2.7rem; height: 2.7rem; }

.site-footer__copy {
  position: absolute; left: 0; right: 0; top: 30.9rem; padding-top: 2.7rem;
  border-top: 1px solid rgba(244, 243, 239, .15);
  font-size: 1.3rem; line-height: 1.82rem; color: rgba(244, 243, 239, .8);
}

@media (max-width: 600px) {
  .site-footer__inner { display: block; width: auto; height: auto; padding: 3.2rem 2.2rem 5.07rem; }
  .site-footer__logo { width: 12rem; height: 4.2rem; }
  .site-footer__tagline { width: auto; margin-top: 1.4rem; }
  .site-footer__contact { margin-top: 2.68rem; }
  .site-footer__addresses { margin-top: 2.24rem; }
  .site-footer__pages { margin-top: 2.55rem; }
  .site-footer__contact .site-footer__heading,
  .site-footer__addresses .site-footer__heading { font-size: 1.4rem; line-height: 1.96rem; letter-spacing: .112rem; margin-bottom: 1.3rem; }
  .site-footer__pages .site-footer__heading { margin-bottom: 1.1rem; }
  .site-footer__addresses li { --address-lh: 2.25rem; margin-bottom: 1.2rem; font-size: 1.5rem; }
  .site-footer__addresses li:last-child { margin-bottom: 0; }
  .site-footer__social { position: static; margin-top: 2.37rem; }
  .site-footer__copy { position: static; margin-top: 2.4rem; padding-top: 1.57rem; font-size: 1.4rem; line-height: 1.96rem; }
}

/* ---------- Back to top (phones only) ---------- */
.back-to-top { display: none; }
@media (max-width: 600px) {
  .back-to-top {
    display: block; position: fixed; right: 2rem; bottom: 3.3rem; z-index: 50;
    width: 3.7rem; height: 3.7rem; padding: 0; border: 0; background: none;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .back-to-top.is-visible { opacity: 1; visibility: visible; }
  .back-to-top svg { width: 100%; height: 100%; }
}

/* ---------- 404 ---------- */
.not-found { padding: 10rem 2rem 14rem; text-align: center; }
.not-found h1 { font-size: 5.2rem; line-height: 1.2; }
.not-found p { margin: 2rem 0 4rem; font-size: 1.9rem; }
