/* ═══════════════════════════════════════════════════
   HERO 3D BACKGROUND — Apple-Style on Cream Theme
   Scoped to #hero-v11 only — NO theme changes
   ═══════════════════════════════════════════════════ */

/* ── 3D Scene ── */
.hero-3d-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  perspective: 1000px;
  perspective-origin: 50% 45%;
  overflow: hidden;
}

.hero-3d-layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-3d-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  backface-visibility: hidden;
}

/* ═══ BACK LAYER — Large vivid gradient blurs ═══ */

/* Big violet/purple glow — top left */
.hero-3d-orb-1 {
  width: 650px;
  height: 650px;
  top: -15%;
  left: -8%;
  background: radial-gradient(
    circle at 45% 45%,
    rgba(139, 92, 246, 0.35) 0%,
    rgba(155, 142, 196, 0.18) 35%,
    rgba(139, 92, 246, 0.06) 55%,
    transparent 70%
  );
  filter: blur(40px);
  animation: orb3dFloat1 18s ease-in-out infinite alternate;
  transform: translateZ(-180px) scale(1.3);
}

/* Rose/pink glow — top right */
.hero-3d-orb-2 {
  width: 580px;
  height: 580px;
  top: -8%;
  right: -6%;
  background: radial-gradient(
    circle at 55% 40%,
    rgba(212, 96, 122, 0.32) 0%,
    rgba(242, 196, 206, 0.18) 35%,
    rgba(212, 96, 122, 0.05) 55%,
    transparent 70%
  );
  filter: blur(45px);
  animation: orb3dFloat2 22s ease-in-out infinite alternate;
  transform: translateZ(-220px) scale(1.35);
}

/* Blue glow — bottom center */
.hero-3d-orb-7 {
  width: 700px;
  height: 700px;
  bottom: -25%;
  left: 15%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(96, 165, 250, 0.28) 0%,
    rgba(96, 165, 250, 0.12) 35%,
    rgba(96, 165, 250, 0.04) 55%,
    transparent 70%
  );
  filter: blur(50px);
  animation: orb3dFloat7 20s ease-in-out infinite alternate;
  transform: translateZ(-200px) scale(1.25);
}

/* ═══ MID LAYER — Visible glass sphere ═══ */

/* Large glass sphere — left side */
.hero-3d-orb-3 {
  width: 260px;
  height: 260px;
  top: 20%;
  left: 5%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.2) 25%, transparent 45%),
    radial-gradient(circle at 65% 70%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.25) 0%, rgba(230, 225, 240, 0.15) 40%, rgba(200, 190, 220, 0.05) 65%, transparent 75%);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 -20px 50px rgba(139, 92, 246, 0.06),
    inset 0 5px 15px rgba(255, 255, 255, 0.3),
    0 20px 60px rgba(139, 92, 246, 0.12),
    0 8px 25px rgba(28, 26, 24, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: orb3dFloat3 15s ease-in-out infinite alternate;
  transform: translateZ(-50px) scale(1);
}

/* ═══ FRONT LAYER — Prominent glass spheres ═══ */

/* Medium rose glass sphere — bottom left */
.hero-3d-orb-4 {
  width: 180px;
  height: 180px;
  top: 58%;
  left: 3%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.15) 28%, transparent 42%),
    radial-gradient(circle at 68% 72%, rgba(212, 96, 122, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(242, 196, 206, 0.12) 40%, rgba(212, 96, 122, 0.04) 65%, transparent 75%);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 -15px 40px rgba(212, 96, 122, 0.06),
    inset 0 4px 12px rgba(255, 255, 255, 0.35),
    0 16px 50px rgba(212, 96, 122, 0.1),
    0 6px 20px rgba(28, 26, 24, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: orb3dFloat4 12s ease-in-out infinite alternate;
  transform: translateZ(80px) scale(0.95);
}

/* Blue glass sphere — top right area */
.hero-3d-orb-5 {
  width: 130px;
  height: 130px;
  top: 12%;
  right: 30%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.12) 26%, transparent 40%),
    radial-gradient(circle at 60% 70%, rgba(96, 165, 250, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(200, 220, 245, 0.12) 42%, transparent 70%);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 -10px 30px rgba(96, 165, 250, 0.06),
    inset 0 3px 10px rgba(255, 255, 255, 0.35),
    0 12px 40px rgba(96, 165, 250, 0.1),
    0 5px 15px rgba(28, 26, 24, 0.04);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: orb3dFloat5 11s ease-in-out infinite alternate;
  transform: translateZ(120px) scale(0.9);
}

/* Small violet glass — center bottom */
.hero-3d-orb-6 {
  width: 90px;
  height: 90px;
  top: 68%;
  left: 42%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.1) 24%, transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, rgba(200, 190, 230, 0.1) 45%, transparent 70%);
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 -8px 20px rgba(139, 92, 246, 0.05),
    inset 0 3px 8px rgba(255, 255, 255, 0.4),
    0 8px 28px rgba(139, 92, 246, 0.08),
    0 4px 12px rgba(28, 26, 24, 0.04);
  animation: orb3dFloat6 9s ease-in-out infinite alternate;
  transform: translateZ(150px) scale(0.85);
}

/* Amber glass — far right */
.hero-3d-orb-8 {
  width: 110px;
  height: 110px;
  bottom: 18%;
  right: 5%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.12) 25%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(240, 225, 200, 0.12) 42%, rgba(201, 133, 58, 0.04) 65%, transparent 75%);
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 -10px 25px rgba(201, 133, 58, 0.05),
    inset 0 3px 10px rgba(255, 255, 255, 0.35),
    0 10px 35px rgba(201, 133, 58, 0.1),
    0 5px 15px rgba(28, 26, 24, 0.04);
  animation: orb3dFloat8 10s ease-in-out infinite alternate;
  transform: translateZ(100px) scale(0.88);
}

/* ═══ 3D SPINNING RINGS ═══ */
.hero-3d-ring {
  position: absolute;
  border-radius: 50%;
  background: transparent;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-3d-ring-1 {
  width: 300px;
  height: 300px;
  top: 35%;
  left: 2%;
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.05);
  animation: ring3dSpin1 32s linear infinite;
  transform: translateZ(20px) rotateX(65deg) rotateZ(0deg);
}

.hero-3d-ring-2 {
  width: 200px;
  height: 200px;
  top: 8%;
  right: 14%;
  border: 1px solid rgba(212, 96, 122, 0.12);
  box-shadow: 0 0 20px rgba(212, 96, 122, 0.04);
  animation: ring3dSpin2 26s linear infinite reverse;
  transform: translateZ(60px) rotateX(55deg) rotateY(30deg) rotateZ(0deg);
}

/* ═══ GLOWING PARTICLES ═══ */
.hero-3d-dot {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.hero-3d-dot-1 {
  width: 7px;
  height: 7px;
  top: 22%;
  left: 32%;
  background: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4), 0 0 25px rgba(139, 92, 246, 0.15);
  animation: dot3dFloat 7s ease-in-out infinite alternate;
}

.hero-3d-dot-2 {
  width: 5px;
  height: 5px;
  top: 70%;
  left: 52%;
  background: rgba(212, 96, 122, 0.5);
  box-shadow: 0 0 8px rgba(212, 96, 122, 0.4), 0 0 20px rgba(212, 96, 122, 0.15);
  animation: dot3dFloat 9s 1.5s ease-in-out infinite alternate;
}

.hero-3d-dot-3 {
  width: 6px;
  height: 6px;
  top: 45%;
  right: 22%;
  background: rgba(96, 165, 250, 0.45);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.35), 0 0 22px rgba(96, 165, 250, 0.12);
  animation: dot3dFloat 11s 3s ease-in-out infinite alternate;
}

.hero-3d-dot-4 {
  width: 4px;
  height: 4px;
  top: 80%;
  left: 22%;
  background: rgba(201, 133, 58, 0.5);
  box-shadow: 0 0 7px rgba(201, 133, 58, 0.4), 0 0 18px rgba(201, 133, 58, 0.12);
  animation: dot3dFloat 8s 2s ease-in-out infinite alternate;
}

.hero-3d-dot-5 {
  width: 5px;
  height: 5px;
  top: 14%;
  right: 40%;
  background: rgba(122, 158, 135, 0.5);
  box-shadow: 0 0 9px rgba(122, 158, 135, 0.4), 0 0 20px rgba(122, 158, 135, 0.12);
  animation: dot3dFloat 10s 4s ease-in-out infinite alternate;
}

/* ═══════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════ */

@keyframes orb3dFloat1 {
  0%   { transform: translateZ(-180px) translate(0, 0) scale(1.3); }
  50%  { transform: translateZ(-160px) translate(35px, 25px) scale(1.35); }
  100% { transform: translateZ(-200px) translate(-25px, 45px) scale(1.25); }
}
@keyframes orb3dFloat2 {
  0%   { transform: translateZ(-220px) translate(0, 0) scale(1.35); }
  50%  { transform: translateZ(-190px) translate(-40px, 30px) scale(1.42); }
  100% { transform: translateZ(-240px) translate(20px, -20px) scale(1.3); }
}
@keyframes orb3dFloat3 {
  0%   { transform: translateZ(-50px) translate(0, 0) scale(1); }
  50%  { transform: translateZ(-30px) translate(22px, -18px) scale(1.04); }
  100% { transform: translateZ(-70px) translate(-14px, 25px) scale(0.96); }
}
@keyframes orb3dFloat4 {
  0%   { transform: translateZ(80px) translate(0, 0) scale(0.95); }
  50%  { transform: translateZ(100px) translate(16px, -20px) scale(1); }
  100% { transform: translateZ(70px) translate(-10px, 14px) scale(0.92); }
}
@keyframes orb3dFloat5 {
  0%   { transform: translateZ(120px) translate(0, 0) scale(0.9); }
  50%  { transform: translateZ(140px) translate(-14px, 16px) scale(0.95); }
  100% { transform: translateZ(110px) translate(10px, -14px) scale(0.87); }
}
@keyframes orb3dFloat6 {
  0%   { transform: translateZ(150px) translate(0, 0) scale(0.85); }
  50%  { transform: translateZ(170px) translate(11px, -11px) scale(0.9); }
  100% { transform: translateZ(140px) translate(-9px, 13px) scale(0.82); }
}
@keyframes orb3dFloat7 {
  0%   { transform: translateZ(-200px) translate(0, 0) scale(1.25); }
  50%  { transform: translateZ(-180px) translate(-28px, -22px) scale(1.3); }
  100% { transform: translateZ(-220px) translate(22px, 18px) scale(1.2); }
}
@keyframes orb3dFloat8 {
  0%   { transform: translateZ(100px) translate(0, 0) scale(0.88); }
  50%  { transform: translateZ(118px) translate(-9px, 12px) scale(0.93); }
  100% { transform: translateZ(90px) translate(7px, -9px) scale(0.85); }
}
@keyframes ring3dSpin1 {
  from { transform: translateZ(20px) rotateX(65deg) rotateZ(0deg); }
  to   { transform: translateZ(20px) rotateX(65deg) rotateZ(360deg); }
}
@keyframes ring3dSpin2 {
  from { transform: translateZ(60px) rotateX(55deg) rotateY(30deg) rotateZ(0deg); }
  to   { transform: translateZ(60px) rotateX(55deg) rotateY(30deg) rotateZ(360deg); }
}
@keyframes dot3dFloat {
  0%   { opacity: 0.35; transform: translateY(0); }
  50%  { opacity: 1; transform: translateY(-14px); }
  100% { opacity: 0.4; transform: translateY(3px); }
}

/* ═══════════════════════════════════════════════════
   PERFORMANCE FALLBACKS
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-3d-orb, .hero-3d-ring, .hero-3d-dot { animation: none !important; }
}
.perf-lite .hero-3d-orb { animation-duration: 40s !important; }
.perf-lite .hero-3d-ring { animation-duration: 60s !important; }
.perf-lite .hero-3d-dot { display: none; }
.perf-lite .hero-3d-orb-8 { display: none; }
.mobile-perf .hero-3d-scene { perspective: none; }
.mobile-perf .hero-3d-orb { animation: none !important; }
.mobile-perf .hero-3d-ring, .mobile-perf .hero-3d-dot { display: none; }
.scroll-active .hero-3d-orb, .scroll-active .hero-3d-ring, .scroll-active .hero-3d-dot {
  animation-play-state: paused !important;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hero-3d-orb-1 { width: 480px; height: 480px; }
  .hero-3d-orb-2 { width: 420px; height: 420px; }
  .hero-3d-orb-7 { width: 520px; height: 520px; }
  .hero-3d-ring-1 { width: 220px; height: 220px; }
}
@media (max-width: 860px) {
  .hero-3d-orb-4 { width: 130px; height: 130px; }
  .hero-3d-orb-5 { width: 95px; height: 95px; }
  .hero-3d-orb-6 { display: none; }
  .hero-3d-ring-2 { display: none; }
}
@media (max-width: 560px) {
  .hero-3d-scene { perspective: 800px; }
  .hero-3d-orb-1 { width: 320px; height: 320px; }
  .hero-3d-orb-2 { width: 280px; height: 280px; }
  .hero-3d-orb-3 { width: 180px; height: 180px; }
  .hero-3d-orb-4, .hero-3d-orb-5, .hero-3d-orb-6, .hero-3d-orb-8 { display: none; }
  .hero-3d-ring-1 { display: none; }
  .hero-3d-dot { display: none; }
}
