/* TsawerLink shared shell: the light-leak backdrop, the glass surface and the top bar.
   Used by the public waitlist (linked in index.html) and imported by the HQ dashboard (src/app/hq.css). Needs tokens.css. */
@media (prefers-color-scheme: light) {
  .bar .logo-dark { display: none; }
  .bar .logo-light { display: block; }
  .dust { opacity: 0; }
}
/* ---------- Aura: light leaks, dust and film grain ---------- */
.aura { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.leak {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: bloom 2.2s var(--ease) both, drift 26s ease-in-out infinite alternate;
}
.leak-1 { width: 62vmax; height: 62vmax; left: -22vmax; bottom: -30vmax; background: radial-gradient(circle, var(--leak-a), transparent 65%); }
.leak-2 { width: 48vmax; height: 48vmax; right: -18vmax; top: -22vmax; background: radial-gradient(circle, var(--leak-b), transparent 62%); opacity: 0.4; animation-delay: 0.15s, -8s; }
.leak-3 { width: 22vmax; height: 22vmax; right: 8vw; bottom: 6vh; background: radial-gradient(circle, var(--leak-c), transparent 65%); opacity: 0.22; animation-delay: 0.3s, -14s; }
.leak-4 { width: 30vmax; height: 30vmax; left: 30vw; top: 38vh; background: radial-gradient(circle, var(--leak-a), transparent 70%); opacity: 0.16; animation-delay: 0.45s, -4s; }
@keyframes bloom { from { opacity: 0; transform: scale(0.6); } }
@keyframes drift { to { translate: 6vw -5vh; scale: 1.12; } }
.dust {
  position: absolute;
  inset: -20%;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgb(255 255 255 / 70%), transparent),
    radial-gradient(1px 1px at 72% 34%, rgb(255 255 255 / 55%), transparent),
    radial-gradient(1.4px 1.4px at 38% 76%, rgb(255 255 255 / 50%), transparent),
    radial-gradient(1px 1px at 86% 82%, rgb(255 255 255 / 60%), transparent),
    radial-gradient(1px 1px at 54% 12%, rgb(255 255 255 / 45%), transparent),
    radial-gradient(1.2px 1.2px at 24% 56%, rgb(255 255 255 / 40%), transparent);
  background-size: 420px 420px;
  opacity: 0.6;
  animation: dust 60s linear infinite;
}
@keyframes dust { to { transform: translate3d(-120px, -420px, 0); } }
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Glass ---------- */
.bar, .panel, .bar-status, .hero-roles, .ghost, .chip,
input:not([type='checkbox']):not([type='radio']), select {
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
}

/* ---------- Bar ---------- */
.bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: max(12px, env(safe-area-inset-top)) 16px 0;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  animation: rise 1s 0.2s var(--ease) both;
}
.bar-logo { display: flex; }
.logo { height: 38px; width: auto; display: block; }
.logo-light { display: none; }
.bar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--field);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-strong); box-shadow: 0 0 10px 2px rgb(91 155 255 / 70%); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes rise { from { opacity: 0; transform: translateY(-10px); } }

main { position: relative; z-index: 1; flex: 1; display: grid; }
[data-theme='dark'] .bar .logo-dark { display: block; }
[data-theme='dark'] .bar .logo-light { display: none; }
[data-theme='light'] .bar .logo-dark { display: none; }
[data-theme='light'] .bar .logo-light { display: block; }
