/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: #0a0a0f;
  color: #f6f7fb;
  font-family: "Poppins", sans-serif;
  overflow-x: hidden;
}

/* -------------------------
   Interactive gradient overlay
   ------------------------- */
.background-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;                
  pointer-events: none;     
  will-change: background-position, filter;

  /* dynamic variables (updated by JS) */
  --x: 50%;
  --y: 50%;
  --hue: 180;

  /* Two colored radial glows + dark base gradient */
  background:
    radial-gradient(circle at var(--x) var(--y),
      rgba(0,255,200,0.14) 0%,
      rgba(0,255,200,0.06) 18%,
      transparent 45%),
    radial-gradient(circle at calc(100% - var(--x)) calc(100% - var(--y)),
      rgba(255,0,200,0.12) 0%,
      rgba(255,0,200,0.04) 16%,
      transparent 44%),
    linear-gradient(120deg,
      hsl(var(--hue) 60% 8%) 0%,
      hsl(calc(var(--hue) + 40) 60% 6%) 100%);

  /* subtle smoothing */
  filter: saturate(1.03) brightness(0.96);
  transition: filter 180ms linear;
}

/* ========== Header & Nav ========== */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 5%;
  position: relative; z-index: 10;
}
.logo-h1-binder { display: flex; align-items: center; gap: 12px; }
.logo-img-content {
  width: 55px; height: 55px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgb(0,255,200);
  box-shadow: 0 0 12px rgba(0,255,200,0.6);
}
.logo-img { width: 100%; height: 100%; object-fit: cover; }
.logo { font-size: 1.3rem; color: rgb(0,255,200); text-shadow: 0 0 10px rgba(0,255,200,0.7); }

nav a {
  margin: 0 12px; color: #cfd3dc; text-decoration: none; font-weight: 500;
  transition: color .25s ease;
}
nav a:hover { color: rgb(0,255,200); }

.btn-signing {
  background: linear-gradient(90deg, rgb(0,255,200), rgb(255,0,200));
  border: 0; padding: 10px 18px; border-radius: 12px; color: #fff; font-weight: 600;
  box-shadow: 0 0 15px rgba(0,255,200,.45); cursor: pointer; transition: transform .2s;
}
.btn-signing:hover { transform: scale(1.05); }

/* ========== Main Hero ========== */
main {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 60px 5%; gap: 40px; position: relative; z-index: 2;
}
.content { flex: 1; min-width: 300px; }
.tag { display: inline-block; padding: 6px 12px; border-radius: 10px;
  background: rgba(255,0,200,.18); border: 1px solid rgba(255,0,200,.5);
  animation: floatTag 3s ease-in-out infinite;
}
.content h1 {
  font-size: 2.8rem; margin: 15px 0; line-height: 1.25;
  color: #fff; text-shadow: 0 0 15px rgba(0,255,200,.35);
}
.description { color: #b8bdc9; max-width: 520px; }
.buttons { margin-top: 22px; }
.buttons a {
  display: inline-block; margin-right: 14px; padding: 12px 20px; border-radius: 12px;
  text-decoration: none; font-weight: 600; transition: transform .2s, box-shadow .3s;
}
.btn-get-started { background: transparent; border: 2px solid rgb(0,255,200); color: rgb(0,255,200); }
.btn-get-started:hover { background: rgb(0,255,200); color: #000; }
.btn-signing-main { background: linear-gradient(90deg, rgb(0,255,200), rgb(255,0,200)); color: #fff; }
.buttons a:hover { transform: translateY(-3px); box-shadow: 0 0 12px rgba(0,255,200,.55); }

@keyframes floatTag { 0%{transform:translateY(0)}50%{transform:translateY(-6px)}100%{transform:translateY(0)} }

/* ========== Spline ========== */
.spline-wrapper {
  flex: 1; min-width: 320px; max-width: 640px; aspect-ratio: 1 / 1; position: relative; z-index: 3;
}
spline-viewer { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; }
spline-viewer::part(watermark) { display: none !important; } /* hide "Built with Spline" */

.orbit-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 0; height: 0; pointer-events: none; z-index: 5;
}

/* ========== Bubble Field (decorative floating) ========== */
/* Fixed overlay that the script populates with bubbles */
.bubble-field {
  position: fixed; top: 0; left: 50vw; width: 50vw; height: 100vh;    /* ✅ right half on desktop */
  pointer-events: none; z-index: 2;
}

/* Mobile: bubbles can float anywhere */
@media (max-width: 768px) {
  .bubble-field { left: 0; width: 100vw; height: 100vh; }
}

/* Base bubble style (sizes & positions set by JS) */
.bubble {
  position: absolute; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,255,200,0.5);
  color: #fff;
  box-shadow: 0 0 10px rgba(0,255,200,0.55);
  transform: translateZ(0);
  will-change: transform;
  /* Each bubble gets: animation: floatY Xs ease-in-out infinite alternate; set in JS */
}

/* Vertical floating (amplitude set via --amp from JS) */
@keyframes floatY {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, var(--amp, -40px), 0); }
}

/* Orbit animation for bubbles around a center (Spline or big bubble) */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-radius, 120px)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--orbit-radius, 120px)) rotate(-360deg); }
}

/* ========== Badge ========== */
.custom-badge {
  position: fixed; bottom: 20px; right: 20px;
  background: linear-gradient(90deg, rgb(0,255,200), rgb(255,0,200));
  color: #fff; padding: 8px 15px; border-radius: 12px; font-weight: 600;
  box-shadow: 0 0 15px rgba(0,255,200,.45);
  z-index: 8;
}

/* ========== Responsive tweaks ========== */
@media (max-width: 768px) {
  header { flex-direction: column; gap: 14px; }
  nav { display: flex; flex-wrap: wrap; justify-content: center; }
  main { flex-direction: column; text-align: center; }
}

/* ============================= */
/* SVG Bubble Field + Bubbles    */
/* ============================= */
.svg-bubble-field {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* bubbles don't block clicks except their own */
  overflow: hidden;
  z-index: 3; /* above spline, below header */
}

.svg-bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatBubble 12s infinite ease-in-out;
  pointer-events: auto; /* clickable */
  transition: transform 0.3s ease, filter 0.3s ease;
  z-index: 5;  
}

/* Random floating animation */
@keyframes floatBubble {
  0%   { transform: translateY(0) translateX(0) scale(1); }
  25%  { transform: translateY(-20px) translateX(15px) scale(1.05); }
  50%  { transform: translateY(-40px) translateX(-10px) scale(0.95); }
  75%  { transform: translateY(-20px) translateX(10px) scale(1.1); }
  100% { transform: translateY(0) translateX(0) scale(1); }
}

/* Orbiting effect (optional, applies randomly if JS toggles class) */
.svg-bubble.orbiting {
  animation: orbitBubble 16s infinite linear;
}
@keyframes orbitBubble {
  0%   { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

/* Hover interaction: grow + glow */
.svg-bubble:hover {
  transform: scale(2); /* ✅ double size on hover */
  z-index: 5;          /* bring above others */
  filter: drop-shadow(0 0 10px rgba(0, 200, 255, 0.6));
}

/* Make sure inline SVG scales nicely */
.svg-bubble svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.svg-bubble:hover svg {
  transform: scale(2);
}

/* Tooltip label */
.svg-bubble-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.svg-bubble:hover .svg-bubble-label {
  opacity: 1; /* ✅ show name when hovered */
}

/* Desktop: limit to right half of screen */
@media (min-width: 768px) {
  .svg-bubble-field {
    left: 50%;
    width: 50%;
  }
}

/* Mobile: keep bubbles smaller and fewer */
@media (max-width: 767px) {
  .svg-bubble {
    width: 50px;
    height: 50px;
    animation-duration: 9s;
  }
  /* optional: hide extra bubbles if >5 */
  .svg-bubble:nth-child(n+6) {
    display: none;
  }
}

