/* Source Protocol — Obsidian atmosphere (matches /foundation + OS mesh) */
:root {
  --sp-void: #050508;
}

html.sp-obsidian,
html.pm-premium,
html.pm-ultimate,
html.fn-body {
  background: var(--sp-void);
}

.sp-obsidian-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sp-obsidian-mesh__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  animation: sp-breathe 7s ease-in-out infinite;
  will-change: transform, opacity;
}

.sp-obsidian-mesh__orb--cyan {
  top: -12%;
  left: -2%;
  width: 820px;
  height: 820px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.48), rgba(0, 212, 255, 0.16) 45%, transparent 70%);
}

.sp-obsidian-mesh__orb--magenta {
  top: -6%;
  right: -4%;
  width: 860px;
  height: 860px;
  background: radial-gradient(circle, rgba(255, 80, 200, 0.42), rgba(255, 80, 200, 0.14) 45%, transparent 70%);
  animation-duration: 11s;
  animation-delay: -3s;
}

.sp-obsidian-mesh__orb--gold {
  bottom: -16%;
  left: 32%;
  width: 920px;
  height: 920px;
  background: radial-gradient(circle, rgba(255, 201, 64, 0.28), rgba(255, 201, 64, 0.1) 48%, transparent 72%);
  filter: blur(36px);
  animation-delay: -5s;
}

.sp-obsidian-mesh__orb--green {
  bottom: 8%;
  right: 10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.22), transparent 65%);
  filter: blur(32px);
  animation-duration: 11s;
  animation-delay: -7s;
}

.sp-obsidian-mesh__orb--cyan-soft {
  top: 36%;
  left: 14%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.24), transparent 70%);
  filter: blur(42px);
  animation-duration: 9s;
  animation-delay: -2s;
}

.sp-obsidian-mesh__orb--magenta-soft {
  top: 48%;
  right: 18%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 80, 200, 0.2), transparent 70%);
  filter: blur(38px);
  animation-duration: 13s;
  animation-delay: -4s;
}

.sp-obsidian-mesh__orb--gold-soft {
  bottom: 22%;
  left: 8%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(255, 201, 64, 0.16), transparent 72%);
  filter: blur(36px);
  animation-duration: 10s;
  animation-delay: -6s;
}

.sp-obsidian-mesh__wash {
  position: absolute;
  inset: -20%;
  background: linear-gradient(
    125deg,
    rgba(0, 212, 255, 0.16) 0%,
    transparent 28%,
    rgba(255, 80, 200, 0.14) 48%,
    transparent 68%,
    rgba(255, 201, 64, 0.1) 100%
  );
  background-size: 220% 220%;
  animation: sp-atmosphere-wash 14s ease-in-out infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

.sp-obsidian-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 720px;
  height: 720px;
  margin: -360px 0 0 -360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform, opacity;
}
.sp-obsidian-aura--cyan {
  background: radial-gradient(circle, rgba(0, 212, 255, 0.42) 0%, rgba(0, 212, 255, 0.14) 35%, transparent 68%);
}
.sp-obsidian-aura--magenta {
  width: 920px;
  height: 920px;
  margin: -460px 0 0 -460px;
  background: radial-gradient(circle, rgba(255, 80, 200, 0.32) 0%, transparent 68%);
}

@keyframes sp-breathe {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1) translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: scale(1.12) translate(2%, -1%);
  }
}

@keyframes sp-atmosphere-wash {
  0%,
  100% {
    opacity: 0.4;
    background-position: 0% 40%;
  }
  33% {
    opacity: 0.65;
    background-position: 60% 20%;
  }
  66% {
    opacity: 0.5;
    background-position: 30% 80%;
  }
}

.pm-synapse-layer,
#sp-neural-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#pm-synapse-canvas,
#sp-neural-canvas,
#neural.sp-neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .sp-obsidian-mesh__orb,
  .sp-obsidian-mesh__wash {
    animation: none;
    opacity: 0.65;
  }
  .sp-obsidian-aura {
    display: none !important;
  }
}
