/* =============================================
   TBM BLOB BACKGROUND SYSTEM — SITEWIDE
   Import on every page. Requires blobs.js.
   ============================================= */

.tbm-blob-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-darker));
  z-index: -2;
  pointer-events: none;
}

.tbm-blob-container {
  filter: url(#tbm-goo) blur(40px);
  width: 100%;
  height: 100%;
  position: relative;
  will-change: filter;
}

.tbm-blob-container .blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: hard-light;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  opacity: 0.75;
  transition: background 1.2s ease;
  will-change: transform;
  transform: translateZ(0);
}

.tbm-blob-container .blob-1 {
  background: radial-gradient(circle at center, rgba(0, 66, 49, 0.9) 0, rgba(0, 66, 49, 0) 50%) no-repeat;
  animation: tbm-drift 30s ease-in-out infinite;
}

.tbm-blob-container .blob-2 {
  background: radial-gradient(circle at center, rgba(0, 55, 42, 0.85) 0, rgba(0, 55, 42, 0) 50%) no-repeat;
  transform-origin: calc(50% - 400px);
  animation: tbm-drift 25s ease-in-out infinite reverse;
}

.tbm-blob-container .blob-3 {
  background: radial-gradient(circle at center, rgba(10, 75, 55, 0.8) 0, rgba(10, 75, 55, 0) 50%) no-repeat;
  top: calc(10% + 200px);
  left: calc(10% - 500px);
  transform-origin: calc(50% + 400px);
  animation: tbm-float 35s ease-in-out infinite;
}

.tbm-blob-container .blob-4 {
  background: radial-gradient(circle at center, rgba(0, 60, 45, 0.8) 0, rgba(0, 60, 45, 0) 50%) no-repeat;
  transform-origin: calc(50% - 200px);
  animation: tbm-drift 28s ease-in-out infinite;
  opacity: 0.6;
}

.tbm-blob-container .blob-5 {
  background: radial-gradient(circle at center, rgba(5, 70, 52, 0.75) 0, rgba(5, 70, 52, 0) 50%) no-repeat;
  width: 160%;
  height: 160%;
  top: -30%;
  left: -30%;
  transform-origin: calc(50% - 800px) calc(50% + 200px);
  animation: tbm-float 38s ease-in-out infinite reverse;
}

@keyframes tbm-drift {
  0%   { transform: translateX(-30%) translateY(0%); }
  25%  { transform: translateX(10%) translateY(-10%); }
  50%  { transform: translateX(30%) translateY(5%); }
  75%  { transform: translateX(-10%) translateY(10%); }
  100% { transform: translateX(-30%) translateY(0%); }
}

@keyframes tbm-float {
  0%   { transform: translateX(20%) translateY(-15%); }
  33%  { transform: translateX(-15%) translateY(10%); }
  66%  { transform: translateX(10%) translateY(20%); }
  100% { transform: translateX(20%) translateY(-15%); }
}

/* SVG goo filter — hidden, required for the blob merge effect */
.tbm-blob-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Noise texture overlay */
.tbm-blob-noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
