/**
 * SHU Promotion — refined fixed header
 */

:root {
  --shu-header-height: 96px;
  --shu-header-height-scrolled: 72px;
  --shu-header-mobile-height: 72px;
  --shu-header-side: clamp(22px, 3.2vw, 52px);
  --shu-header-ink: #111;
  --shu-header-muted: #666;
  --shu-header-line: rgba(17, 17, 17, .10);
  --shu-header-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Fixed to the viewport at all times. */
.shu-header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 99999;
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--shu-header-line);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  transition:
    background-color .35s var(--shu-header-ease),
    border-color .35s var(--shu-header-ease),
    box-shadow .35s var(--shu-header-ease);
}

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

body.admin-bar .shu-header {
  top: 32px !important;
}

body.admin-bar {
  padding-top: calc(var(--shu-header-height) + 32px);
}

.shu-header.is-scrolled {
  background: rgba(255, 255, 255, .90);
  border-bottom-color: rgba(17, 17, 17, .07);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .035);
}

.shu-header__inner {
  width: 100%;
  min-height: var(--shu-header-height);
  padding: 8px var(--shu-header-side);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 4vw, 68px);
  transition:
    min-height .42s var(--shu-header-ease),
    padding .42s var(--shu-header-ease),
    gap .42s var(--shu-header-ease);
}

.shu-header.is-scrolled .shu-header__inner {
  min-height: var(--shu-header-height-scrolled);
  padding-top: 5px;
  padding-bottom: 5px;
  gap: clamp(26px, 3.4vw, 56px);
}

.shu-header__logo {
  display: block;
  width: 56px;
  justify-self: start;
  flex: 0 0 auto;
  transform-origin: left center;
  transition:
    width .42s var(--shu-header-ease),
    opacity .2s ease;
}

.shu-header__logo:hover,
.shu-header__logo:focus-visible {
  opacity: .68;
}

.shu-header.is-scrolled .shu-header__logo {
  width: 44px;
}

.shu-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.shu-header__navigation-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(22px, 2.5vw, 42px);
}

.header-menu {
  min-width: 0;
}

.header-menu__list,
.header-menu > ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 1.8vw, 30px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-menu__item,
.header-menu .menu-item {
  margin: 0;
  padding: 0;
}

.header-menu__link,
.header-menu .menu-item > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 1px 0;
  color: var(--shu-header-ink);
  font-size: clamp(.96rem, 1.18vw, 1.25rem); /* max 20px */
  font-weight: 500;
  line-height: 1;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    color .22s ease,
    opacity .22s ease;
}

.header-menu__link::after,
.header-menu .menu-item > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .34s var(--shu-header-ease);
}

.header-menu__link:hover::after,
.header-menu__link:focus-visible::after,
.header-menu .menu-item > a:hover::after,
.header-menu .menu-item > a:focus-visible::after,
.header-menu .current-menu-item > a::after,
.header-menu .current_page_item > a::after,
.header-menu .current-menu-ancestor > a::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.header-menu__link:hover,
.header-menu .menu-item > a:hover {
  color: var(--shu-header-muted);
}

.header-menu__link:focus-visible,
.header-menu .menu-item > a:focus-visible,
.shu-header__social-link:focus-visible,
.shu-menu-toggle:focus-visible,
.shu-header__logo:focus-visible {
  outline: 1px solid #111;
  outline-offset: 5px;
}

.shu-header__social {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  padding-left: clamp(2px, .4vw, 8px);
}

.shu-header__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 34px;
  color: var(--shu-header-ink);
  font-size: 17px;
  line-height: 1;
  transform: translateZ(0);
  transition:
    opacity .22s ease,
    transform .32s var(--shu-header-ease);
}

.shu-header__social-link:hover {
  opacity: .50;
  transform: translateY(-2px);
}

.shu-menu-toggle {
  display: none;
}

/* Medium desktop: preserve one-line navigation without making the header tall. */
@media (max-width: 1120px) and (min-width: 901px) {
  :root {
    --shu-header-side: clamp(18px, 2.2vw, 28px);
  }

  .shu-header__inner {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 26px;
  }

  .shu-header__logo {
    width: 50px;
  }

  .shu-header.is-scrolled .shu-header__logo {
    width: 42px;
  }

  .shu-header__navigation-wrap {
    gap: 18px;
  }

  .header-menu__list,
  .header-menu > ul {
    gap: 17px;
  }

  .header-menu__link,
  .header-menu .menu-item > a {
    font-size: clamp(.88rem, 1.45vw, 1.05rem);
    letter-spacing: .035em;
  }

  .shu-header__social {
    gap: 9px;
  }
}

/* Mobile */
@media (max-width: 900px) {
  :root {
    --shu-header-height: var(--shu-header-mobile-height);
  }

  body.shu-menu-open {
    overflow: hidden;
  }

  .shu-header,
  .shu-header.is-scrolled {
    background: rgba(255, 255, 255, .96);
    box-shadow: none;
  }

  .shu-header__inner,
  .shu-header.is-scrolled .shu-header__inner {
    min-height: var(--shu-header-mobile-height);
    grid-template-columns: 46px 1fr auto;
    padding: 7px 18px;
    gap: 18px;
  }

  .shu-header__logo,
  .shu-header.is-scrolled .shu-header__logo {
    width: 42px;
    position: relative;
    z-index: 1002;
  }

  .shu-menu-toggle {
    position: relative;
    z-index: 1002;
    grid-column: 3;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    font: inherit;
    cursor: pointer;
  }

  .shu-menu-toggle__text {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .14em;
  }

  .shu-menu-toggle__icon {
    position: relative;
    width: 23px;
    height: 12px;
    display: block;
  }

  .shu-menu-toggle__icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transition:
      top .3s var(--shu-header-ease),
      transform .3s var(--shu-header-ease);
  }

  .shu-menu-toggle__icon span:first-child { top: 2px; }
  .shu-menu-toggle__icon span:last-child { top: 9px; }

  .shu-menu-toggle[aria-expanded="true"] .shu-menu-toggle__icon span:first-child {
    top: 6px;
    transform: rotate(45deg);
  }

  .shu-menu-toggle[aria-expanded="true"] .shu-menu-toggle__icon span:last-child {
    top: 6px;
    transform: rotate(-45deg);
  }

  .shu-header__navigation-wrap {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 34px;
    min-height: 100dvh;
    padding: 94px 22px 30px;
    background: rgba(255, 255, 255, .985);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -10px, 0);
    pointer-events: none;
    transition:
      opacity .32s ease,
      visibility .32s linear,
      transform .42s var(--shu-header-ease);
  }

  .shu-header__navigation-wrap.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .header-menu__list,
  .header-menu > ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
  }

  .header-menu__item,
  .header-menu .menu-item {
    border-bottom: 1px solid rgba(17, 17, 17, .11);
  }

  .header-menu__item:first-child,
  .header-menu .menu-item:first-child {
    border-top: 1px solid rgba(17, 17, 17, .11);
  }

  .header-menu__link,
  .header-menu .menu-item > a {
    width: 100%;
    min-height: 58px;
    justify-content: flex-start;
    padding: 4px 0;
    font-size: clamp(1.55rem, 7.1vw, 2.05rem);
    font-weight: 500;
    letter-spacing: .035em;
  }

  .header-menu__link::after,
  .header-menu .menu-item > a::after {
    display: none;
  }

  .shu-header__social {
    justify-content: flex-start;
    gap: 18px;
    padding-left: 0;
  }

  .shu-header__social-link {
    width: 30px;
    height: 34px;
    font-size: 20px;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar .shu-header {
    top: 46px !important;
  }

  body.admin-bar {
    padding-top: calc(var(--shu-header-mobile-height) + 46px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shu-header,
  .shu-header *,
  .shu-header *::before,
  .shu-header *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
