/* ================================================================
   VETTRI GROUPS — Background Animation Layer
   Full-site ambient graphics: particles, gradients, grid, orbs
   ================================================================ */

/* ── Canvas background layer ── */
#vg-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* ── Ensure page content sits above canvas ── */
.page-wrapper,
.main-header,
.main-footer {
  position: relative;
  z-index: 1;
}

/* ── Body: deep dark gradient base ── */
body {
  background: #07070d !important;
}

/* ── Ambient gradient orbs (CSS-driven, no JS) ── */
#vg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.vg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  will-change: transform;
}

.vg-orb-1 {
  width: 600px; height: 600px;
  top: -150px; left: -200px;
  background: radial-gradient(circle, #b8860b 0%, transparent 70%);
  animation: orb-drift-1 18s ease-in-out infinite alternate;
}

.vg-orb-2 {
  width: 500px; height: 500px;
  top: 30%; right: -150px;
  background: radial-gradient(circle, #d4a017 0%, transparent 70%);
  animation: orb-drift-2 22s ease-in-out infinite alternate;
  opacity: 0.09;
}

.vg-orb-3 {
  width: 700px; height: 700px;
  bottom: -200px; left: 30%;
  background: radial-gradient(circle, #b8860b 0%, transparent 70%);
  animation: orb-drift-3 26s ease-in-out infinite alternate;
  opacity: 0.08;
}

.vg-orb-4 {
  width: 350px; height: 350px;
  top: 60%; left: 10%;
  background: radial-gradient(circle, #ffffff 0%, transparent 70%);
  animation: orb-drift-4 20s ease-in-out infinite alternate;
  opacity: 0.03;
}

@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, 120px) scale(1.20); }
}
@keyframes orb-drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, -100px) scale(1.10); }
}
@keyframes orb-drift-4 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, -70px) scale(1.25); }
}

/* ── Subtle grid overlay ── */
#vg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(184,134,11,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,134,11,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Floating star-dust particles (CSS only, small) ── */
.vg-stardust {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.vg-star {
  position: absolute;
  border-radius: 50%;
  background: rgba(184,134,11, 0.55);
  animation: star-float linear infinite;
}

@keyframes star-float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Scan-line shimmer across sections ── */
.vg-scanline {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(184,134,11,0.025) 50%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
  animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
  0%   { top: -200px; }
  100% { top: 110%; }
}

/* ── Noise texture overlay ── */
#vg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.018;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: noise-shift 0.15s steps(2) infinite;
}

@keyframes noise-shift {
  0%   { background-position: 0 0; }
  25%  { background-position: -10px 5px; }
  50%  { background-position: 5px -10px; }
  75%  { background-position: 10px 5px; }
  100% { background-position: 0 0; }
}

/* ── Hero section: enhanced particle canvas area ── */
.banner-section,
.slider-section,
.page-title {
  position: relative;
  overflow: hidden;
}

.banner-section::before,
.slider-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(184,134,11,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(184,134,11,0.07) 0%, transparent 60%);
  z-index: 1;
  pointer-events: none;
}

/* ── Section-level decorative bg pulses ── */
.services-section,
.about-section,
.counter-section,
.team-section {
  position: relative;
}

.services-section::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,134,11,0.06) 0%, transparent 70%);
  top: 50%; left: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  animation: section-pulse 6s ease-in-out infinite alternate;
}

.counter-section::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,134,11,0.05) 0%, transparent 70%);
  top: 50%; right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
  animation: section-pulse 7s ease-in-out infinite alternate-reverse;
}

@keyframes section-pulse {
  0%   { transform: translateY(-50%) scale(1); opacity: 1; }
  100% { transform: translateY(-50%) scale(1.3); opacity: 0.5; }
}

/* ── Glowing horizontal dividers ── */
hr,
.separator {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,134,11,0.4), transparent);
  position: relative;
}

hr::after {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold, #b8860b), var(--gold-light, #d4a017));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(184,134,11,0.5);
}

/* ── Animated border glow on sections ── */
@keyframes border-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(184,134,11,0.10); }
  50%       { box-shadow: 0 0 0 1px rgba(184,134,11,0.25), 0 0 20px rgba(184,134,11,0.08); }
}

/* ── Floating dots decorations in footer area ── */
.main-footer {
  position: relative;
  overflow: hidden;
}

.main-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,134,11,0.5), transparent);
  box-shadow: 0 0 20px rgba(184,134,11,0.3);
}

/* ── Page-title: keep background-image from inline style visible ── */
.page-title {
  background-color: transparent !important;
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .vg-orb,
  .vg-star,
  .vg-scanline,
  #vg-noise,
  .services-section::after,
  .counter-section::after {
    animation: none !important;
  }
}