/* Shared geometry for the public pages. Page-specific colors and actions remain local. */
@media (min-width: 1321px) {
  .haven-header {
    align-items: center !important;
    min-height: 90px;
    /* Keep the full-width surface while aligning its contents with the home sections. */
    padding: 0 max(clamp(1.25rem, 5vw, 5rem), calc((100vw - 1220px) / 2)) !important;
  }

  .haven-header:not(.haven-header--simple) {
    display: grid !important;
    /* Reserve the same space for the logo and contact on each page. */
    grid-template-columns: 152px minmax(0, 1fr) 318px;
    gap: 0 !important;
  }

  .haven-header:not(.haven-header--simple) .brand { justify-self: start; }
  .haven-header:not(.haven-header--simple) .site-nav {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: clamp(.8rem, 2vw, 1.7rem) !important;
    justify-content: center;
    justify-self: center;
    margin: 0 !important;
    width: max-content;
  }
  .haven-header:not(.haven-header--simple) .site-nav a {
    font-size: .86rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.55;
    white-space: nowrap;
  }
  .haven-header:not(.haven-header--simple) .header-contact {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    justify-self: end;
    margin: 0 !important;
    min-width: 0;
  }
  .haven-header--simple { display: flex !important; justify-content: space-between; }
}

/* Mark the current page without changing the menu spacing. */
.haven-header > .site-nav > a[aria-current="page"] {
  position: relative;
}
.haven-header > .site-nav > a[aria-current="page"]::after {
  background: #ae7c34;
  bottom: -.35rem;
  content: "";
  height: 1px;
  inset-inline: 0;
  pointer-events: none;
  position: absolute;
}
@media (max-width: 1320px) {
  .haven-header > .site-nav > a[aria-current="page"]::after {
    background: #d7a85d;
    bottom: auto;
    height: 1rem;
    inset-inline: -.45rem auto;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
  }
}

@media (max-width: 1320px) {
  .haven-header {
    min-height: 76px;
    padding-block: 1rem !important;
    padding-inline: clamp(1rem, 4vw, 4rem) !important;
  }
}

@media (max-width: 620px) {
  .haven-header { padding-inline: 1rem !important; }
}

/* Keep the shared header surface lightly translucent on every page and viewport. */
.haven-header:not(.haven-header--main) {
  --header-scroll-progress: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--white, #fff) calc(56% + 34% * var(--header-scroll-progress)), transparent),
    color-mix(in srgb, var(--white, #fff) calc(90% * var(--header-scroll-progress)), transparent)) !important;
  border-bottom: 0 !important;
  box-shadow: 0 12px 28px rgba(8, 23, 34, calc(.12 * var(--header-scroll-progress))) !important;
}

/* The home header stays over the hero, then gains a darker surface for scrolling. */
#page-top.haven-header--main {
  left: 0;
  position: fixed !important;
  right: 0;
  top: 0;
  z-index: 50;
  --header-scroll-progress: 0;
  background: linear-gradient(180deg,
    rgba(15, 39, 57, calc(.56 + .31 * var(--header-scroll-progress))),
    rgba(15, 39, 57, calc(.87 * var(--header-scroll-progress)))) !important;
  border-bottom: 0 !important;
  box-shadow: 0 12px 28px rgba(8, 23, 34, calc(.18 * var(--header-scroll-progress)));
}

/* One brand lockup, matching the home page at every viewport. */
header.haven-header .brand {
  align-items: center !important;
  display: flex !important;
  gap: .72rem !important;
}
header.haven-header .brand img {
  display: block !important;
  flex: 0 0 auto !important;
  height: 36px !important;
  object-fit: contain !important;
  width: 36px !important;
}
header.haven-header .brand > span {
  display: flex !important;
  flex-direction: column !important;
  line-height: 1 !important;
}
header.haven-header .brand > span > :first-child {
  display: block !important;
  font-family: Cinzel, serif !important;
  font-size: 1.28rem !important;
  font-weight: 700 !important;
  letter-spacing: .18em !important;
  line-height: 1 !important;
}
header.haven-header .brand > span > :last-child {
  display: block !important;
  font-family: 'Josefin Sans', sans-serif !important;
  font-size: .58rem !important;
  font-weight: 400 !important;
  letter-spacing: .18em !important;
  line-height: 1 !important;
  margin-top: .38rem !important;
  text-transform: uppercase !important;
}
@media (max-width: 620px) {
  header.haven-header .brand img { height: 30px !important; width: 30px !important; }
  header.haven-header .brand > span > :first-child { font-size: 1.04rem !important; }
  header.haven-header .brand > span > :last-child { font-size: .48rem !important; margin-top: .30rem !important; }
}
