/* =============================================
   ANTIGRAVITY.CSS — Animation & Effect Styles
   Anti-Gravity Interaction Suite
   ============================================= */

/* ─── CURSOR ENHANCEMENTS ─── */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0;
  left: 0;
  will-change: transform;
  transition: background 0.3s, opacity 0.3s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  top: 0;
  left: 0;
  will-change: transform;
  transition: border-color 0.3s, opacity 0.3s;
}

/* ─── HERO CURSOR GLOW ─── */
.ag-hero-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(201, 168, 76, 0.08) 0%,
    rgba(201, 168, 76, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  top: 0;
  left: 0;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.6s ease;
  filter: blur(30px);
}

/* ─── FILM GRAIN OVERLAY ─── */
.ag-grain {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  animation: ag-grain-shift 0.5s steps(6) infinite;
}

@keyframes ag-grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-2px, 3px, 0); }
  40%  { transform: translate3d(3px, -1px, 0); }
  60%  { transform: translate3d(-3px, -2px, 0); }
  80%  { transform: translate3d(2px, 1px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ─── FLOATING ELEMENTS ─── */
[data-float] {
  will-change: transform;
}

/* ─── DEPTH LAYERED ELEMENTS ─── */
[data-depth] {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ─── MAGNETIC ELEMENTS ─── */
[data-magnetic] {
  will-change: transform;
  transition: box-shadow 0.3s ease;
}

[data-magnetic]:hover {
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.08);
}

/* ─── 3D TILT ELEMENTS ─── */
[data-tilt] {
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* ─── SCROLL HINT ENHANCED ─── */
.scroll-hint {
  will-change: transform;
}

.scroll-line {
  will-change: transform, opacity;
}

/* ─── HERO ELEMENTS DEPTH LAYER STYLING ─── */
#hero .hero-bg,
#hero .hero-grid,
.page-hero .hero-bg,
.page-hero .hero-grid {
  will-change: transform;
  backface-visibility: hidden;
}

/* ─── CARD HOVER LIFT (complements magnetic) ─── */
.disc-card,
.tool-card,
.tl-card,
.contact-card,
.wc,
.wci {
  will-change: transform;
  backface-visibility: hidden;
}

/* ─── CTA BUTTON GLOW ─── */
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-gold:hover::after {
  transform: translateX(100%);
}

/* ─── SMOOTH PAGE TRANSITION ─── */
body {
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.ag-loaded {
  opacity: 1;
}

/* ─── STAGGER REVEAL OVERRIDES (for GSAP control) ─── */
.reveal {
  will-change: transform, opacity;
}

/* ─── MARQUEE ENHANCED ─── */
.marquee-wrap {
  will-change: transform;
}

/* ─── PERFORMANCE: DISABLE ON MOBILE ─── */
@media (max-width: 900px) {
  .ag-hero-glow,
  .ag-grain {
    display: none !important;
  }

  .cursor,
  .cursor-ring {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  [data-depth],
  [data-float],
  [data-magnetic],
  [data-tilt] {
    will-change: auto !important;
  }
}

/* ─── REDUCED MOTION: Respect user preference ─── */
@media (prefers-reduced-motion: reduce) {
  .ag-grain {
    animation: none !important;
    display: none !important;
  }

  .ag-hero-glow {
    display: none !important;
  }

  [data-float] {
    animation: none !important;
  }

  .btn-gold::after {
    display: none !important;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
