/* The shared shell uses the existing AI Soft navigation and glass tokens. */
.site-shell .logo,
.site-shell .btn {
  flex: none;
  white-space: nowrap;
}

.site-shell .topbar__in > .nav {
  display: flex;
}

.site-shell .topbar__in > .nav a {
  white-space: nowrap;
}

.site-shell .site-menu {
  display: none;
}

.site-shell.site-shell--after-hero {
  position: fixed;
  inset: 0 0 auto;
  transform: translateY(-105%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 220ms cubic-bezier(.22, .68, .28, 1), opacity 160ms ease-out,
    visibility 0s 220ms;
}

.site-shell.site-shell--after-hero.is-visible {
  transform: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  .site-shell.site-shell--after-hero {
    transform: none;
    transition: none;
  }
}

@media (max-width: 960px) {
  .site-shell .topbar__in {
    position: relative;
    gap: 8px;
  }

  .site-shell .topbar__in > .nav {
    display: none;
  }

  .site-shell .topbar__in > .logo,
  .site-shell .topbar__in > .btn,
  .site-shell .site-menu > summary {
    min-height: 44px;
  }

  .site-shell .topbar__in > .btn {
    margin-left: auto;
    padding-inline: 12px;
  }

  .site-shell .site-menu {
    display: block;
    flex: none;
  }

  .site-shell .site-menu > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: var(--glass-2);
    box-shadow: inset 0 0 0 1px var(--edge);
    color: var(--white);
    font: 500 14px/1.2 var(--font);
    cursor: pointer;
    list-style: none;
  }

  .site-shell .site-menu > summary::-webkit-details-marker {
    display: none;
  }

  .site-shell .site-menu > summary::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
  }

  .site-shell .site-menu[open] > summary {
    background: var(--glass-3);
    box-shadow: inset 0 0 0 1px var(--edge-strong);
  }

  .site-shell .site-menu[open] > summary::after {
    margin-top: 3px;
    transform: rotate(225deg);
  }

  .site-shell .site-menu[open] > .nav {
    display: grid;
    position: absolute;
    inset-block-start: calc(100% + 4px);
    inset-inline-end: var(--gutter);
    width: min(18rem, calc(100% - 2 * var(--gutter)));
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--edge);
    border-radius: var(--radius-card);
    background: #080a14;
    box-shadow: var(--shadow-float);
  }

  .site-shell .site-menu .nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: var(--radius-badge);
  }

  .site-shell .site-menu .nav a:focus-visible {
    outline-offset: -2px;
  }
}

.footer.site-footer {
  padding: clamp(20px, 3vw, 30px) 0 18px;
  background: #080a14;
}

.direct-page .site-footer {
  margin-top: var(--d-section);
}

.site-footer .footer__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px clamp(20px, 3vw, 40px);
}

.site-footer .footer__brand p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.site-footer .footer__title {
  margin: 0 0 3px;
  color: var(--text-head);
  font-size: 14px;
  font-weight: 550;
}

.site-footer .footer__nav {
  gap: 0 16px;
}

.site-footer .footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.site-footer .footer__legal {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 4px 24px;
  padding-top: 10px;
  border-top: 1px solid var(--edge);
}

.site-footer .footer__copy,
.site-footer .footer__copy p {
  max-width: none;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.site-footer .footer__legal .footer__nav {
  justify-content: flex-end;
}

.site-footer .footer__legal a {
  font-size: 13px;
}

@media (max-width: 760px) {
  .site-footer .footer__in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }

  .site-footer .footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer .footer__legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer .footer__legal .footer__nav {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .site-footer .footer__in {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Native shared dialogs use the same panel and type roles as Direct. */
html:has(.site-dialog[open]) {
  overflow: hidden;
}

.site-dialog {
  --site-dialog-inset: clamp(16px, 3vw, 28px);
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: min(88vh, calc(100vh - 32px));
  max-height: min(88dvh, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-card);
  color: var(--text);
  background: #101422;
  box-shadow: var(--shadow-float);
}

.site-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.site-dialog--contact {
  width: min(440px, calc(100% - 32px));
}

.site-dialog::backdrop {
  background: rgba(4, 6, 12, .79);
  backdrop-filter: blur(5px);
}

.site-dialog__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--site-dialog-inset);
  border-bottom: 1px solid var(--edge);
  background: #121625;
}

.site-dialog .site-dialog__bar h2 {
  margin: 0;
  color: var(--text-head);
  font-size: clamp(19px, 3vw, 27px);
  font-weight: 550;
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.site-dialog__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: var(--glass-2);
  color: var(--text-head);
  cursor: pointer;
}

.site-dialog__close:hover {
  background: var(--glass-3);
}

.site-dialog svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}

.site-dialog__body {
  padding: var(--site-dialog-inset);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}

.site-dialog--legal .site-dialog__body {
  scrollbar-gutter: stable;
}

.site-dialog__body:focus-visible {
  outline-offset: -4px;
}

.site-dialog .site-dialog__body h3 {
  margin: 1.6em 0 .55em;
  color: var(--text-head);
  font-size: 1.125rem;
  font-weight: 550;
  line-height: 1.3;
  text-wrap: wrap;
}

.site-dialog__body h3:first-child {
  margin-top: 0;
}

.site-dialog__body div + div {
  margin-top: 1em;
}

.site-dialog__body ul {
  margin: .3em 0 .7em;
  padding-inline-start: 1.3em;
}

.site-dialog__body li + li {
  margin-top: .2em;
}

.site-dialog--legal a {
  color: var(--blueprint);
  text-underline-offset: .16em;
}

.site-dialog--contact .site-dialog__body {
  display: grid;
  grid-auto-rows: max-content;
  gap: 8px;
}

.site-dialog .site-dialog__action {
  justify-content: space-between;
  min-height: 48px;
}

@media (max-width: 480px) {
  .site-dialog--legal {
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .site-dialog--legal .site-dialog__bar {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .site-dialog--legal .site-dialog__body {
    padding-bottom: max(var(--site-dialog-inset), env(safe-area-inset-bottom));
  }
}
