/* Header, footer and browser chrome pass */

html {
  scrollbar-color: #c56535 #f8f3eb;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f8f3eb;
}

::-webkit-scrollbar-thumb {
  background: #c56535;
  border: 3px solid #f8f3eb;
}

::-webkit-scrollbar-thumb:hover {
  background: #172239;
}

/* Header: calmer editorial navigation */
.site-header {
  background: rgba(255, 253, 250, 0.94) !important;
  border-bottom: 1px solid rgba(23, 34, 57, 0.08) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px);
}

.site-header__inner {
  min-height: 82px;
}

.site-header__logo img,
.site-header__brand img {
  max-height: 46px;
}

.site-header__brand-name {
  color: #172239 !important;
  font-size: 0.96rem;
  font-weight: 900;
}

.site-header nav a,
.site-header__nav a {
  color: #172239 !important;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header__nav a:hover,
.site-header nav a[aria-current="page"],
.site-header__nav a[aria-current="page"] {
  color: #c56535 !important;
}

.site-header__cta,
.site-header .button,
.site-header a.button {
  background: #172239 !important;
  color: #fffdfa !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  box-shadow: none !important;
}

.site-header__cta:hover,
.site-header .button:hover,
.site-header a.button:hover {
  background: #c56535 !important;
}

/* Add a subtle route-line feel to footer instead of block heaviness */
.site-footer {
  position: relative;
  overflow: hidden;
  background: #172239 !important;
  color: #fffdfa !important;
}

.site-footer::before {
  content: "";
  position: absolute;
  right: clamp(28px, 7vw, 110px);
  top: clamp(28px, 6vw, 86px);
  width: clamp(180px, 22vw, 340px);
  height: clamp(180px, 22vw, 340px);
  opacity: 0.16;
  pointer-events: none;
  background:
    linear-gradient(90deg, #fffdfa 0 52%, transparent 52% 100%) 0 14% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 22%, #fffdfa 22% 76%, transparent 76% 100%) 0 40% / 100% 2px no-repeat,
    linear-gradient(90deg, #fffdfa 0 34%, transparent 34% 100%) 0 68% / 100% 2px no-repeat,
    linear-gradient(90deg, transparent 0 42%, #fffdfa 42% 100%) 0 90% / 100% 2px no-repeat,
    linear-gradient(180deg, #fffdfa 0 42%, transparent 42% 100%) 18% 0 / 2px 100% no-repeat,
    linear-gradient(180deg, transparent 0 18%, #fffdfa 18% 74%, transparent 74% 100%) 48% 0 / 2px 100% no-repeat,
    linear-gradient(180deg, #fffdfa 0 64%, transparent 64% 100%) 78% 0 / 2px 100% no-repeat;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.site-footer,
.site-footer p,
.site-footer a,
.site-footer li,
.site-footer span,
.site-footer strong,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  color: #fffdfa !important;
}

.site-footer a {
  text-decoration-color: rgba(255, 253, 250, 0.32);
}

.site-footer a:hover {
  color: #e5b092 !important;
  text-decoration-color: #e5b092;
}

.site-footer__heading {
  color: #e5b092 !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
}

.site-footer__brand-name {
  color: #fffdfa !important;
}

.site-footer__contact-row {
  border-top-color: rgba(255, 253, 250, 0.16) !important;
}

.site-footer__bottom {
  border-top-color: rgba(255, 253, 250, 0.12) !important;
}

@media (max-width: 860px) {
  .site-header__inner {
    min-height: 72px;
  }

  .site-header__cta,
  .site-header .button,
  .site-header a.button {
    padding: 10px 16px !important;
  }

  .site-footer::before {
    opacity: 0.08;
  }
}

/* Contact modal */
.mm-contact-modal[hidden] {
  display: none !important;
}

.mm-contact-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.mm-contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 34, 57, 0.58);
}

.mm-contact-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #fffdfa;
  padding: clamp(28px, 4vw, 48px);
}

.mm-contact-modal__close {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  background: #172239;
  color: #fffdfa;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.mm-contact-modal__intro {
  max-width: 560px;
  margin-bottom: 28px;
}

.mm-contact-modal__intro .eyebrow {
  margin: 0 0 12px;
  color: #c56535;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mm-contact-modal__intro h2 {
  margin: 0;
  color: #172239;
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 3vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.mm-contact-modal__intro p:last-child {
  margin: 14px 0 0;
  color: #6f756d;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

/* Contact modal final correction */
.mm-contact-modal[hidden] {
  display: none !important;
}

.mm-contact-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
}

.mm-contact-modal__backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(23, 34, 57, 0.62) !important;
}

.mm-contact-modal__panel {
  position: relative !important;
  z-index: 1 !important;
  width: min(100%, 720px) !important;
  max-height: min(84vh, 760px) !important;
  overflow: auto !important;
  background: #fffdfa !important;
  padding: clamp(28px, 4vw, 46px) !important;
  border-radius: 0 !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24) !important;
}

.mm-contact-modal__close {
  position: sticky !important;
  top: 0 !important;
  float: right !important;
  z-index: 2 !important;
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #172239 !important;
  color: #fffdfa !important;
  cursor: pointer !important;
  font-size: 1.7rem !important;
  line-height: 1 !important;
}

.mm-contact-modal__intro {
  max-width: 560px !important;
  margin: 44px 0 28px !important;
}

.mm-contact-modal__intro .eyebrow {
  margin: 0 0 12px !important;
  color: #c56535 !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
}

.mm-contact-modal__intro h2 {
  margin: 0 !important;
  color: #172239 !important;
  font-family: var(--ff-serif) !important;
  font-size: clamp(2rem, 3vw, 3.05rem) !important;
  line-height: 1.04 !important;
  letter-spacing: -0.045em !important;
}

.mm-contact-modal__intro p:last-child {
  margin: 14px 0 0 !important;
  color: #6f756d !important;
  line-height: 1.6 !important;
}

.mm-contact-modal .hs-form-frame {
  min-height: 480px;
}

html.modal-open,
body.modal-open {
  overflow: hidden !important;
}

/* Prevent duplicate HubSpot form instances showing below the page/footer */
body > .hs-form-frame,
.site-footer .hs-form-frame,
.hs-form-frame:not(#hubspot-contact-modal .hs-form-frame) {
  display: none !important;
}

#hubspot-contact-modal .hs-form-frame {
  display: block !important;
}

/* Keep modal content properly centred and contained */
.mm-contact-modal {
  align-items: center !important;
  justify-items: center !important;
}

.mm-contact-modal__panel {
  margin: 0 auto !important;
}

/* HubSpot controlled modal target */
.hs-form-frame {
  display: none !important;
}

#hubspot-contact-modal .hs-form-frame,
#hubspot-contact-modal .mm-hubspot-form {
  display: block !important;
}

.mm-hubspot-form {
  min-height: 480px;
}

.mm-hubspot-form iframe {
  max-width: 100% !important;
}

/* Hide any injected HubSpot/close-only artefacts outside our controlled modal */
body > .hbspt-form,
body > .hs-form-frame,
body > [class*="hubspot"],
body > [class*="hs-"],
body > dialog:not(#hubspot-contact-modal),
.site-footer .hbspt-form,
.site-footer .hs-form-frame,
.site-footer [class*="hubspot"],
.site-footer [class*="hs-"] {
  display: none !important;
}

#hubspot-contact-modal .hbspt-form,
#hubspot-contact-modal .hs-form-frame,
#hubspot-contact-modal [class*="hubspot"],
#hubspot-contact-modal [class*="hs-"],
#hubspot-contact-modal .mm-hubspot-form {
  display: block !important;
}

/* Header final layout correction after backend-driven Header Settings */
.site-header {
  width: 100% !important;
  background: rgba(255, 253, 250, 0.96) !important;
  border-bottom: 1px solid rgba(23, 34, 57, 0.08) !important;
}

.site-header__inner {
  width: min(88vw, 1680px) !important;
  margin: 0 auto !important;
  min-height: 82px !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto minmax(160px, 1fr) !important;
  gap: clamp(22px, 4vw, 52px) !important;
  align-items: center !important;
  padding: 0 44px !important;
}

.site-header__brand {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #172239 !important;
  text-decoration: none !important;
}

.site-header__brand img,
.site-header__logo {
  display: block !important;
  width: auto !important;
  height: 54px !important;
  max-height: 54px !important;
  object-fit: contain !important;
}

.site-header__brand-name {
  display: inline-block !important;
  color: #172239 !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

.site-header__nav {
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
}

.site-header__nav ul {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-header__nav a {
  color: #172239 !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

.site-header__cta {
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 12px 22px !important;
  background: #172239 !important;
  color: #fffdfa !important;
  border: 0 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 1fr auto !important;
    padding: 0 20px !important;
  }

  .site-header__nav {
    display: none !important;
  }

  .site-header__brand img,
  .site-header__logo {
    height: 46px !important;
    max-height: 46px !important;
  }
}

/* Header-only final correction */
.site-header {
  position: relative !important;
  z-index: 100 !important;
  width: 100% !important;
  background: rgba(255, 253, 250, 0.96) !important;
  border-bottom: 1px solid rgba(23, 34, 57, 0.08) !important;
  box-shadow: none !important;
}

.site-header__inner {
  width: min(88vw, 1680px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  min-height: 84px !important;
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) auto minmax(180px, 1fr) !important;
  align-items: center !important;
  gap: clamp(24px, 4vw, 58px) !important;
}

.site-header__brand {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  color: #172239 !important;
  text-decoration: none !important;
  border: 0 !important;
}

.site-header__brand:hover,
.site-header__brand:focus {
  color: #172239 !important;
  text-decoration: none !important;
}

.site-header__brand img,
.site-header__logo {
  display: block !important;
  width: auto !important;
  height: 50px !important;
  max-width: 62px !important;
  max-height: 50px !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}

.site-header__brand-name {
  display: inline-block !important;
  color: #172239 !important;
  font-size: 0.98rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  border: 0 !important;
}

.site-header__nav {
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.site-header__nav ul,
.site-header__nav .menu,
.site-header__nav nav {
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.site-header__nav li {
  margin: 0 !important;
  padding: 0 !important;
}

.site-header__nav a {
  color: #172239 !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  border: 0 !important;
}

.site-header__nav a:hover,
.site-header__nav a[aria-current="page"] {
  color: #c56535 !important;
}

.site-header__cta {
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 12px 22px !important;
  background: #172239 !important;
  color: #fffdfa !important;
  border: 0 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 0.86rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.site-header__cta:hover {
  background: #c56535 !important;
  color: #fffdfa !important;
}

@media (max-width: 900px) {
  .site-header__inner {
    width: min(88vw, 1680px) !important;
    min-height: 74px !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 18px !important;
  }

  .site-header__nav {
    display: none !important;
  }

  .site-header__brand img,
  .site-header__logo {
    height: 44px !important;
    max-height: 44px !important;
    max-width: 54px !important;
  }

  .site-header__brand-name {
    font-size: 0.9rem !important;
  }

  .site-header__cta {
    min-height: 40px !important;
    padding: 11px 16px !important;
    font-size: 0.82rem !important;
  }
}
