:root {
  --nav-size: clamp(48px, 7.8vw, 96px);
  --nav-step: calc(var(--nav-size) * 1.16);
  --nav-left: clamp(24px, 9vw, 150px);
  --nav-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.site-home {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  width: 100%;
  transition:
    transform 850ms var(--nav-ease),
    opacity 650ms ease;
}
body.navigation-open {
  overflow: hidden;
}
body.navigation-open .site-home {
  transform: translateX(-32vw);
  opacity: 0;
  pointer-events: none;
}
.site-menu-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 50;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  background: #0a191b60;
  backdrop-filter: blur(8px);
  color: #e0e7ee;
}
.site-menu-toggle span {
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 400ms var(--nav-ease);
}

.site-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: transparent;
  backdrop-filter: none;
  transform: translateX(100%);
  transition: transform 850ms var(--nav-ease);
  scrollbar-width: thin;
  overflow-x: hidden;
  scrollbar-color: #ffffffb8 transparent;
}
.site-panel[hidden] {
  display: none;
}
.site-panel::-webkit-scrollbar {
  width: 5px;
}
.navigation-open .site-panel {
  transform: translateX(0);
}
.panel-brand {
  position: absolute;
  top: 32px;
  left: var(--nav-left);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #edf2f7;
  text-decoration: none;
  z-index: 3;
}
.panel-brand img {
  filter: brightness(0) invert(1);
}
.panel-navigation {
  position: relative;
  height: calc(20svh + var(--nav-step) * 5 + 110px);
  transition: height 800ms var(--nav-ease);
}
.panel-title {
  position: absolute;
  top: calc(20svh + var(--item) * var(--nav-step));
  left: var(--nav-left);
  font-size: var(--nav-size);
  line-height: 1.16;
  letter-spacing: -0.065em;
  font-weight: 500;
  color: #aab9b6;
  text-decoration: none;
  white-space: nowrap;
  transition:
    top 800ms var(--nav-ease),
    opacity 350ms ease,
    transform 700ms var(--nav-ease),
    color 250ms ease;
}
.panel-title:hover,
.panel-title:focus-visible,
.panel-title.is-selected {
  color: #fff;
}
.panel-title:hover {
  transform: translateX(8px);
}
.site-panel.is-detail .panel-navigation {
  height: calc(124px + var(--nav-step));
}
.site-panel.is-detail .panel-title {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}
.site-panel.is-detail .panel-title.is-selected {
  top: 124px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.panel-content {
  position: relative;
  margin: 24px var(--nav-left) 80px;
  max-width: 920px;
}
.panel-content article {
  opacity: 0;
  transform: translateY(70px);
  transition:
    opacity 400ms ease,
    transform 700ms var(--nav-ease);
}
.panel-content article[hidden] {
  display: none;
}
.site-panel.is-detail .panel-content article.is-visible {
  opacity: 1;
  transform: none;
  transition-delay: 220ms;
}
.panel-content p {
  color: #becbc7;
  font-size: 17px;
  line-height: 1.8;
  max-width: 720px;
  margin: 0 0 24px;
}
.panel-content .panel-intro {
  color: #edf2f7;
  font-size: clamp(23px, 3.1vw, 36px);
  line-height: 1.45;
  letter-spacing: -0.025em;
  margin-bottom: 40px;
}
.panel-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 52px;
}
.panel-content h2 {
  font-size: 19px;
  font-weight: 500;
  color: #edf2f7;
  margin: 0 0 12px;
}
.panel-contact-link {
  display: inline-block;
  margin-top: 20px;
  color: #edf2f7;
  text-decoration: none;
  border-bottom: 1px solid #ffffff45;
  padding-bottom: 8px;
}
.panel-email {
  display: block;
  font-size: clamp(18px, 3vw, 30px);
  letter-spacing: -0.025em;
  color: #edf2f7;
  text-decoration: none;
  margin: 32px 0;
  overflow-wrap: anywhere;
}
.panel-footer {
  margin: 0 var(--nav-left) 32px;
  color: #778e87;
  font-size: 12px;
}
.site-panel:not(.is-detail) .panel-content {
  pointer-events: none;
}
body.chat-active .chat-meta {
  right: 80px;
}
@media (max-width: 600px) {
  :root {
    --nav-size: clamp(44px, 11.5vw, 68px);
    --nav-left: 24px;
  }
  .site-menu-toggle {
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
  body.chat-active .chat-meta {
    right: 58px;
  }
  body.chat-active .chat-meta #resetChat {
    font-size: 11px;
  }
  .panel-brand {
    top: 24px;
  }
  .panel-title {
    top: calc(23svh + var(--item) * var(--nav-step));
  }
  .panel-navigation {
    height: calc(23svh + var(--nav-step) * 5 + 100px);
  }
  .site-panel.is-detail .panel-title.is-selected {
    top: 106px;
  }
  .site-panel.is-detail .panel-navigation {
    height: calc(106px + var(--nav-step));
  }
  .panel-content {
    margin-top: 28px;
  }
  .panel-columns {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .panel-content p {
    font-size: 16px;
    line-height: 1.7;
  }
}
@media (prefers-reduced-motion: reduce) {
  .site-home,
  .site-panel,
  .panel-title,
  .panel-navigation,
  .panel-content article,
  .site-menu-toggle span {
    transition: none !important;
  }
}

/* White reveal grows from the centre of the menu button. */
.site-menu-toggle {
  overflow: hidden;
  isolation: isolate;
  transition:
    color 360ms ease,
    border-color 360ms ease;
}
.site-menu-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #ebeff3;
  transform: scale(0);
  transition: transform 460ms cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: -1;
}
@media (hover: hover) and (pointer: fine) {
  .site-menu-toggle:hover {
    color: #1c2731;
    border-color: #ebeff3;
  }
  .site-menu-toggle:hover::before {
    transform: scale(1);
  }
}
.site-menu-toggle:focus-visible {
  color: #1c2731;
  border-color: #ebeff3;
}
.site-menu-toggle:focus-visible::before {
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .site-menu-toggle,
  .site-menu-toggle::before {
    transition: none;
  }
}
/* Keep only the menu strokes visible at rest. */
.site-menu-toggle {
  border-color: transparent;
  background: transparent;
  backdrop-filter: none;
}

/* No outer stroke around the menu button, including hover and focus. */
.site-menu-toggle {
  border: 0;
}
.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  border-color: transparent;
}

/* Two menu bars rotate around their shared centre into a close icon. */
.site-menu-toggle span {
  flex-shrink: 0;
  transform-origin: center;
  border-radius: 2px;
}
.navigation-open .site-menu-toggle:not(.is-detail-toggle) span:first-child {
  transform: translateY(4.25px) rotate(45deg);
}
.navigation-open .site-menu-toggle:not(.is-detail-toggle) span:last-child {
  transform: translateY(-4.25px) rotate(-45deg);
}
/* Give the menu brand more presence without changing its proportions. */
.panel-brand {
  font-size: 20px;
  gap: 17px;
}
.panel-brand img {
  width: 46px;
  height: 46px;
}
@media (max-width: 600px) {
  .panel-brand {
    font-size: 17px;
    gap: 14px;
  }
  .panel-brand img {
    width: 39px;
    height: 39px;
  }
}
/* Menu, page titles, brand and content share one centred 1040px column. */
:root {
  --nav-left: max(24px, calc((100vw - 1040px) / 2));
}
@media (max-width: 600px) {
  :root {
    --nav-left: 20px;
  }
}
.site-panel .panel-footer {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto 32px;
}
@media (max-width: 600px) {
  .site-panel .panel-footer {
    width: calc(100% - 40px);
  }
}
.site-panel::-webkit-scrollbar-thumb {
  background: #ffffffb8;
  border-radius: 999px;
}
html:has(body.navigation-open) {
  overflow: hidden;
}
body[data-navigation-input="pointer"] .panel-title:focus-visible {
  outline: none;
} /* Fit the menu to the viewport; only unusually short screens need scrolling. */
.site-panel:not(.is-detail) {
  --menu-size: min(var(--nav-size), calc((100dvh - 180px) / 6));
  --menu-step: calc(var(--menu-size) * 1.16);
}
.site-panel:not(.is-detail) .panel-navigation {
  height: calc(100dvh - 76px);
  min-height: 320px;
}
.site-panel:not(.is-detail) .panel-title {
  font-size: var(--menu-size);
  top: calc(
    max(96px, (100dvh - 76px - var(--menu-step) * 5) / 2) + var(--item) *
      var(--menu-step)
  );
}
.site-panel:not(.is-detail) .panel-content {
  margin: 0;
  height: 0;
  overflow: hidden;
}
@media (min-height: 480px) {
  .site-panel:not(.is-detail) {
    overflow-y: hidden;
  }
}
