/* Header restore after Elemental Kin header template rebuild */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 253, 250, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(23, 34, 57, 0.08);
}

.site-header__inner {
  width: min(88vw, 1680px);
  margin: 0 auto;
  min-height: 78px;
  padding: 14px clamp(22px, 4vw, 54px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__brand img {
  display: block;
  width: auto;
  max-width: 190px;
  max-height: 48px;
}

.site-header__nav {
  justify-self: center;
}

.site-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.5vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__nav-link {
  color: var(--ek-colour-primary, #172239);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.035em;
}

.site-header__nav-link:hover,
.site-header__nav-link--active {
  color: var(--ek-colour-accent, #c56535);
}

.site-header__contact {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(23, 34, 57, 0.18);
  border-radius: 999px;
  background: var(--ek-colour-primary, #172239);
  color: var(--ek-colour-light, #fffdfa);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.site-header__contact:hover {
  background: var(--ek-colour-accent, #c56535);
  border-color: var(--ek-colour-accent, #c56535);
  color: var(--ek-colour-light, #fffdfa);
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: auto auto;
  }

  .site-header__nav {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    overflow-x: auto;
  }

  .site-header__nav-list {
    justify-content: flex-start;
    gap: 18px;
    white-space: nowrap;
  }

  .site-header__contact {
    justify-self: end;
  }
}

/* Anchor offset for sticky header */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

.section[id],
[id="reset-packs"] {
  scroll-margin-top: 96px;
}

.elemental-kin-anchor-marker {
  display: block;
  position: relative;
  top: -96px;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
}



/* Messy Middle design system: fixed scroll header */
:root {
  --mm-header-height: 92px;
  --mm-header-height-scrolled: 68px;
}

body {
  padding-top: var(--mm-header-height);
}

.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  width: 100% !important;
  background: #fffdfa !important;
  color: #172239 !important;
  border-bottom: 1px solid rgba(23, 34, 57, 0.12);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    min-height 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.site-header__inner {
  min-height: var(--mm-header-height);
  transition:
    min-height 180ms ease,
    padding-top 180ms ease,
    padding-bottom 180ms ease;
}

html.mm-header-scrolled body {
  padding-top: var(--mm-header-height);
}

html.mm-header-scrolled .site-header {
  background: #172239 !important;
  color: #fffdfa !important;
  border-bottom-color: rgba(255, 253, 250, 0.16) !important;
  box-shadow: 0 0.65rem 1.8rem rgba(23, 34, 57, 0.18);
}

html.mm-header-scrolled .site-header__inner {
  min-height: var(--mm-header-height-scrolled);
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

html.mm-header-scrolled .site-header a,
html.mm-header-scrolled .site-header button,
html.mm-header-scrolled .site-header .site-header__brand,
html.mm-header-scrolled .site-header .site-header__nav a {
  color: #fffdfa !important;
}

html.mm-header-scrolled .site-header a:hover {
  color: #f0a15f !important;
}

html.mm-header-scrolled .site-header__contact a,
html.mm-header-scrolled .site-header__contact .button,
html.mm-header-scrolled .site-header a.button {
  background: #fffdfa !important;
  color: #172239 !important;
  border-color: #fffdfa !important;
}

html.mm-header-scrolled .site-header img {
  max-height: 2.35rem;
}

html.mm-header-scrolled .site-header .site-logo img,
html.mm-header-scrolled .site-header__brand img {
  filter: brightness(0) invert(1);
}
