* { box-sizing: border-box; }

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  caret-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

footer .container {
  width: calc(100% - 24px);
  max-width: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(7, 11, 22, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 14px 34px rgba(0,0,0,.22),
    0 0 36px rgba(124,156,255,.05);
}

.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(124,156,255,.05) 22%,
      rgba(127,216,221,.04) 50%,
      rgba(124,156,255,.05) 78%,
      transparent 100%
    );
  opacity: .9;
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(124,156,255,.18) 14%,
      rgba(198,176,118,.14) 28%,
      rgba(216,225,238,.24) 50%,
      rgba(127,216,221,.16) 72%,
      rgba(124,156,255,.18) 86%,
      transparent 100%
    );
  box-shadow: 0 0 10px rgba(148,166,208,.08);
  opacity: .95;
  pointer-events: none;
}

.nav-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 2px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.brand:hover {
  transform: translateY(-1px);
  text-shadow: 0 0 18px rgba(124,156,255,.08);
}

.brand span {
  color: #f6f9ff;
  text-shadow: 0 0 16px rgba(124,156,255,.10);
}

.brand .logo,
footer .logo {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(124,156,255,.16));
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a,
.nav-links button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: rgba(225,233,248,.80);
  background: rgba(255,255,255,.02);
  border: 1px solid transparent;
  transition:
    color .18s ease,
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
  cursor: pointer;
  font: inherit;
}

.nav-links a::before,
.nav-links button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 48%);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.nav-links a:hover,
.nav-links button:hover {
  color: #f6f9ff;
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.10);
  background:
    linear-gradient(135deg, rgba(124,156,255,.10), rgba(127,216,221,.05) 60%, rgba(255,255,255,.02)),
    rgba(255,255,255,.03);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 22px rgba(0,0,0,.16),
    0 0 22px rgba(124,156,255,.06);
}

.nav-links a:hover::before,
.nav-links button:hover::before {
  opacity: .9;
}

.nav-links .nav-accent {
  border-color: rgba(127,216,221,.16);
  background:
    linear-gradient(135deg, rgba(127,216,221,.10), rgba(124,156,255,.05)),
    rgba(255,255,255,.03);
  color: #eefcff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 10px 20px rgba(0,0,0,.14),
    0 0 18px rgba(127,216,221,.06);
}

.nav-links .nav-accent:hover {
  border-color: rgba(127,216,221,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 12px 24px rgba(0,0,0,.18),
    0 0 24px rgba(127,216,221,.08);
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  overflow: hidden;
  padding: 4px 0 6px;
  color: var(--muted);
  backdrop-filter: blur(16px);
  background:
    linear-gradient(
      0deg,
      rgba(255,255,255,calc(var(--footer-bg-opacity, 0.12) * 0.12)),
      rgba(255,255,255,calc(var(--footer-bg-opacity, 0.12) * 0.04))
    ),
    rgba(7,11,22,var(--footer-bg-opacity, 0.12));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 -14px 34px rgba(0,0,0,.18),
    0 0 36px rgba(124,156,255,.04);
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(124,156,255,.05) 22%,
      rgba(127,216,221,.04) 50%,
      rgba(124,156,255,.05) 78%,
      transparent 100%
    );
  opacity: .9;
}

footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(124,156,255,.18) 14%,
      rgba(198,176,118,.14) 28%,
      rgba(216,225,238,.24) 50%,
      rgba(127,216,221,.16) 72%,
      rgba(124,156,255,.18) 86%,
      transparent 100%
    );
  box-shadow: 0 0 10px rgba(148,166,208,.08);
  opacity: .95;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  z-index: 2;
  padding-top: 4px;
  display: grid;
  grid-template-columns: 1fr 48px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.footer-inner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 1px;
  background:
    linear-gradient(
      90deg,
      transparent 0%,
      rgba(255,255,255,.04) 18%,
      rgba(255,255,255,.10) 50%,
      rgba(255,255,255,.04) 82%,
      transparent 100%
    );
  box-shadow: 0 0 8px rgba(150,168,206,.04);
  opacity: .85;
  pointer-events: none;
}

.footer-inner > :first-child {
  justify-self: start;
  text-align: left;
  width: 100%;
}

.footer-inner > :last-child {
  justify-self: end;
  text-align: right;
  width: 100%;
  padding-right: 84px;
}

footer .footer-inner .logo {
  justify-self: center;
  width: 56px;
  height: auto;
  opacity: 0.95;
}

@media (max-width: 980px) {
  .nav-inner {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    gap: 8px;
  }

  .nav-links a,
  .nav-links button {
    min-height: 38px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-inner > :first-child,
  .footer-inner > :last-child,
  footer .footer-inner .logo {
    justify-self: center;
    text-align: center;
  }

  .footer-inner > :last-child {
    padding-right: 0;
  }
}
