/* ═══════════════════════════════════════════════════════════
   MEZE NETWORK — 01-base.css
   Scene base, site header, theme toggle, logo swap
   ═══════════════════════════════════════════════════════════ */

/* ─── ACCESSIBILITY ──────────────────────────────────── */

/* Skip-link: hidden until focused via keyboard tab */
.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--mp);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Visible focus rings — keyboard nav users need to see where they are.
   Mouse users won't see this thanks to :focus-visible. */
*:focus-visible {
  outline: 2px solid var(--mp);
  outline-offset: 3px;
  border-radius: 3px;
}
[data-theme="day"] *:focus-visible {
  outline-color: var(--m);
}

/* No-JS fallback message */
.noscript-notice {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9998;
  padding: 16px 24px;
  background: #06030D;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  border-bottom: 1px solid var(--mp);
}
.noscript-notice a {
  color: var(--mp);
  text-decoration: underline;
}

/* Honor reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── SCENE BASE ─────────────────────────────────────────── */
.compass-scene {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 60px;
  gap: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.compass-scene.scene-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  /* Collapse height so hidden compass doesn't add page scroll length */
  min-height: 0;
  height: 0;
  overflow: hidden;
  padding: 0;
}

/* ─── SITE HEADER (logo only) ────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;          /* always above panels (z-index 50) */
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
  /* Smooth fade in/out when switching between gateway and compass */
  transition: opacity 0.35s ease;
}

/* On the gateway (homepage) the welcome block has its own logo —
   hide the fixed header logo to avoid showing it twice */
body.on-gateway .site-header {
  opacity: 0;
  pointer-events: none;
}

.site-logo {
  height: 32px;
  width: auto;
  display: block;
  pointer-events: auto;
  opacity: 0.92;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.site-logo:hover { opacity: 1; }

/* ─── LOGO THEME SWAP ────────────────────────────────────── */
/* !important needed to beat .footer-brand-logo { display: block } specificity tie */
.logo-day               { display: none  !important; }
.logo-night             { display: block !important; }

[data-theme="day"] .logo-day   { display: block !important; }
[data-theme="day"] .logo-night { display: none  !important; }

/* ─── THEME TOGGLE — floating pill ──────────────────────── */
.theme-toggle {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 200;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="day"] .theme-toggle {
  background: rgba(28, 18, 8, 0.07);
  border-color: rgba(28, 18, 8, 0.14);
}

[data-theme="day"] .theme-toggle:hover {
  background: rgba(28, 18, 8, 0.12);
  color: var(--text);
}
