:root {
  --site-header-height: clamp(168px, 15.5vw, 225px);
  --site-header-logo-width: clamp(315px, 30vw, 435px);
  --site-header-logo-height: clamp(125px, 12vw, 181px);
}

html:has(body[data-shared-layout]) {
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

body[data-shared-layout] {
  min-height: 100%;
  height: 100%;
  padding-top: var(--site-header-height);
  overflow-x: hidden;
  overflow-y: auto;
  background: #000;
  scrollbar-gutter: stable;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--site-header-height);
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  padding: clamp(5px, 0.5vw, 8px) 0 clamp(5px, 0.45vw, 8px);
  background: #000;
  pointer-events: none;
}

.site-header a,
.site-header nav {
  pointer-events: auto;
}

.site-header__logo {
  display: flex;
  width: var(--site-header-logo-width);
  height: var(--site-header-logo-height);
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.site-header__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.site-header .top-nav {
  position: static;
  width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: clamp(18px, 3.25vw, 52px);
  padding: 0 clamp(14px, 3.5vw, 64px);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header .top-nav a {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 26px;
  min-height: 26px;
  padding: 0;
  color: #fff;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.42em;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
  white-space: nowrap;
  transition: none;
}

.site-header .top-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.42em;
  bottom: 0;
  height: 2px;
  background: #fff;
  opacity: 0;
  transform: none;
  transform-origin: center;
  transition: none;
}

.site-header .top-nav a:hover,
.site-header .top-nav a:focus-visible,
.site-header .top-nav a.is-active {
  opacity: 1;
}

.site-header .top-nav a:hover::after,
.site-header .top-nav a:focus-visible::after,
.site-header .top-nav a.is-active::after {
  opacity: 1;
  transform: none;
}

[data-page-content] {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

html.is-shell-leaving [data-page-content] {
  opacity: 0;
  transform: translateY(8px);
}

html.is-shell-entering [data-page-content] {
  animation: nbs-page-enter 260ms ease both;
}

body[data-shared-layout][data-page-route="index"] .home-reference-stage {
  background: #000;
}

body[data-shared-layout][data-page-route="index"] .home-reference-stage::after {
  content: none;
}

body[data-shared-layout][data-page-route="contact"] {
  overflow-y: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body[data-shared-layout][data-page-route="contact"] .contact-stage {
  width: min(100%, calc((100dvh - var(--site-header-height)) * 1536 / 1024));
  height: auto;
  min-height: 0;
  aspect-ratio: 1536 / 1024;
  flex: 0 0 auto;
}

body[data-shared-layout][data-page-route="login"] .login-page {
  width: 100%;
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

body[data-shared-layout][data-page-route="login"] .login-stage {
  width: min(100%, calc((100dvh - var(--site-header-height)) * 1724 / 912));
  height: auto;
  min-height: 0;
  aspect-ratio: 1724 / 912;
  flex: 0 0 auto;
}

body[data-shared-layout][data-page-route="login"] .login-art {
  object-fit: fill;
}

body[data-shared-layout][data-page-route="contact"] .contact-nav {
  display: none;
}

body[data-shared-layout][data-page-route="index"] .home-header nav {
  display: none;
}

body[data-shared-layout] .page-header nav {
  display: none;
}

body[data-shared-layout] .page-header {
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  justify-content: flex-start;
}

body[data-shared-layout] .register-main {
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  padding-top: clamp(30px, 4vw, 54px);
}

body[data-shared-layout][data-page-route="training-coaching"] .tc-hero {
  min-height: calc(100vh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
  padding-top: clamp(28px, 4vw, 54px);
}

body[data-shared-layout].legal-page .legal-shell {
  padding-top: clamp(42px, 6vw, 78px);
}

@keyframes nbs-page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  :root {
    --site-header-height: clamp(160px, 39vw, 225px);
    --site-header-logo-width: clamp(300px, 70vw, 435px);
    --site-header-logo-height: clamp(120px, 27vw, 181px);
  }

  .site-header {
    padding: 7px 0 8px;
  }

  .site-header .top-nav {
    gap: clamp(8px, 3vw, 24px);
    padding: 0 10px;
  }

  .site-header .top-nav a {
    height: 22px;
    min-height: 22px;
    font-size: clamp(0.5rem, 1.55vw, 0.68rem);
    letter-spacing: 0.18em;
  }

  body[data-shared-layout][data-page-route="login"] .login-page {
    min-height: calc(100dvh - var(--site-header-height));
    height: auto;
  }

  body[data-shared-layout][data-page-route="contact"] .contact-stage {
    width: min(100%, calc((100dvh - var(--site-header-height)) * 1536 / 1024));
    aspect-ratio: 1536 / 1024;
  }

  body[data-shared-layout][data-page-route="login"] .login-stage {
    width: min(100%, calc((100dvh - var(--site-header-height)) * 1724 / 912));
    aspect-ratio: 1724 / 912;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-page-content] {
    transition: none;
  }

  html.is-shell-entering [data-page-content] {
    animation: none;
  }
}
