/* LOADER */
#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity .5s ease, visibility .5s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--lilac);
  letter-spacing: .02em;
}

.loader-mark span {
  color: var(--violet-bright);
}

.loader-dots {
  display: flex;
  gap: 8px;
}

.loader-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--violet-bright);
  animation: bounce 1s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
  animation-delay: .15s;
}

.loader-dots span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .5;
  }

  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

@media(prefers-reduced-motion: reduce) {
  .loader-dots span {
    animation: none;
    opacity: 1;
  }
}

/* NAVIGATION & HEADER */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background .35s ease;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6vw;
}

@media(max-width: 420px) {
  nav {
    padding: 14px 5vw;
  }
}

.brand {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .02em;
  text-decoration: none;
}

.brand span {
  color: var(--violet-bright);
}

.navlinks {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navlinks a {
  text-decoration: none;
  color: var(--ink-dim);
  font-size: .92rem;
  transition: color .2s;
  position: relative;
}

.navlinks a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--violet-bright);
  transition: width .25s ease;
}

.navlinks a:hover::after,
.navlinks a:focus-visible::after {
  width: 100%;
}

.navlinks a:hover,
.navlinks a:focus-visible {
  color: var(--lilac);
}

.navlinks {
  display: none;
}

@media(min-width: 760px) {
  .navlinks {
    display: flex;
  }
}

/* MOBILE MENU */
.menu-btn {
  display: flex;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: .9rem;
}

@media(min-width: 760px) {
  .menu-btn {
    display: none;
  }
}

.mobile-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6vw;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.mobile-panel.open {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 6vw 16px;
}

.mobile-panel a {
  padding: 10px 0;
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}