/* =========================================================
   VenturaX waitlist — what both pages share: the night sky behind
   everything, the floating nav pill, the animation switch and the account menu.
   ========================================================= */

/* ---------- Night sky ---------- */

/* Shown until the 3D field fades in, and instead of it without WebGL */
.sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 32% at 50% 62%, rgba(124, 84, 245, 0.42), transparent 72%),
    radial-gradient(ellipse 120% 85% at 50% 8%, #0a0826 0%, #0d0b2c 40%, #1a1450 62%, #05040e 64%, #05040e 100%);
}
.sky::before {
  content: "";
  position: absolute;
  inset: 0 0 38% 0;
  opacity: 0.7;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 44%, #e6defe 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 41% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 33%, #b9a4ff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 73% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 38%, #e6defe 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 94% 16%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 52%, #b9a4ff 50%, transparent 51%);
  background-size: 340px 260px;
}

.field {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.field.is-ready { opacity: 1; }
.no-webgl .field { display: none; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  z-index: 40;
  top: 14px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  pointer-events: none;
  animation: drop-in 0.9s var(--ease-out) both;
}
.topbar > * { pointer-events: auto; }

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-10px); }
}

.nav-pill {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 50px;
  padding: 0 6px 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 8, 26, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 32px -14px rgba(0, 0, 0, 0.7);
}

.nav-pill .brand {
  font-size: 18px;
  margin-right: 12px;
  border-radius: 999px;
}

.nav-link {
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.nav-link:hover { color: #fff; }
.nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Account (avatar + menu) ---------- */

.account { position: relative; margin-left: 4px; }

.avatar-btn {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffb38a, #9d7bff 55%, #6236f0);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.14), 0 6px 18px -6px rgba(124, 77, 255, 0.9);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.account-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: -6px;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(14, 11, 34, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  animation: menu-in 0.25s var(--ease-out);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
}

.account-who {
  display: grid;
  gap: 2px;
  padding: 8px 10px 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.account-who span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-muted);
}

.account-menu [role="menuitem"] {
  display: block;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}
.account-menu [role="menuitem"]:hover,
.account-menu [role="menuitem"]:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

/* ---------- Animation switch ---------- */

.motion-toggle {
  grid-column: 3;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 46px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.motion-track {
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s, border-color 0.3s;
}
.motion-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(185, 164, 255, 0.8);
  transition: transform 0.3s var(--ease-out);
}
.motion-toggle[aria-checked="true"] .motion-track {
  background: rgba(124, 77, 255, 0.45);
  border-color: rgba(185, 164, 255, 0.5);
}
.motion-toggle[aria-checked="true"] .motion-thumb { transform: translateX(16px); }

@media (max-width: 480px) {
  .topbar { top: 10px; padding: 0 10px; grid-template-columns: 0 auto 1fr; }
  .nav-pill { height: 46px; padding-left: 7px; }
  .nav-pill .brand { font-size: 16px; margin-right: 4px; }
  .nav-link { padding: 8px 9px; font-size: 13px; }
}
