/* ════════════════════════════════════════════════════════════════ */
/* 🎨 PREMIUM MICRO-INTERACTIONS & MAGIC ENHANCEMENTS 🎨 */
/* Apply to all pages for consistent premium experience */
/* ════════════════════════════════════════════════════════════════ */

/* 1️⃣ PREMIUM CUBIC BEZIER - Apple-style smooth deceleration */
:root {
  --ease-premium: cubic-bezier(0.19, 1, 0.22, 1);
}

/* 2️⃣ FILM GRAIN OVERLAY - Removes flat digital look with subtle noise texture */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' seed='2' /%3E%3C/filter%3E%3Crect width='400' height='400' fill='black' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.03;
}

/* 3️⃣ SCROLL PROGRESS BAR - Tracks user scroll position */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #B48512, #ffd966);
  width: 0%;
  z-index: 10000;
  transition: width 50ms linear;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* 4️⃣ GLASS NAVIGATION ON SCROLL - Elevates and floats when scrolling */
nav.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(30px) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}

/* 5️⃣ GLOWING BORDER GRADIENT - Subtle glow on nav when scrolled */
nav.scrolled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  border-radius: 100px;
  pointer-events: none;
  opacity: 0;
  animation: navGlow 3s ease-in-out infinite;
}

@keyframes navGlow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* 6️⃣ TEXT REVEAL ANIMATION - Hero h1 emerges from clip-path mask */
.hero h1, h1[data-reveal-text] {
  animation: textReveal 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
}

@keyframes textReveal {
  0% {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    opacity: 0;
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    opacity: 1;
  }
}

/* 7️⃣ ADAPTIVE GOLD SHADOWS - Cards glow with premium gold tint */
.bento-card,
.pricing-card,
.card,
[class*="card"] {
  transition: all 320ms cubic-bezier(0.19, 1, 0.22, 1);
}

.bento-card:hover,
.pricing-card:hover,
.card:hover,
[class*="card"]:hover {
  box-shadow: 0 24px 56px rgba(212, 175, 55, 0.15), 0 0 1px rgba(212, 175, 55, 0.2) !important;
}

/* 8️⃣ BREATHING ANIMATION - CTA buttons have subtle pulsing glow */
.btn-gold,
.btn-primary,
[class*="btn-gold"],
[class*="cta"] {
  position: relative;
  transition: all 280ms cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-gold::before,
.btn-primary::before,
[class*="btn-gold"]::before,
[class*="cta"]::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent);
  border-radius: 10px;
  z-index: -1;
  opacity: 0;
  animation: breathingPulse 3s ease-in-out infinite;
}

@keyframes breathingPulse {
  0%, 100% {
    opacity: 0;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* 9️⃣ STAGGERED REVEAL - Elements waterfall down as user scrolls */
.reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 600ms cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Calculate stagger based on data attribute */
.reveal-item[data-stagger="0"] { transition-delay: 0ms; }
.reveal-item[data-stagger="1"] { transition-delay: 80ms; }
.reveal-item[data-stagger="2"] { transition-delay: 160ms; }
.reveal-item[data-stagger="3"] { transition-delay: 240ms; }
.reveal-item[data-stagger="4"] { transition-delay: 320ms; }
.reveal-item[data-stagger="5"] { transition-delay: 400ms; }

/* 🔟 MAGNETIC BUTTON EFFECT - Button follows cursor within 20px */
.magnetic-btn {
  position: relative;
  transition: transform 150ms ease-out;
}

/* 1️⃣1️⃣ UPDATE ALL TRANSITIONS TO PREMIUM BEZIER */
nav,
.nav-links a,
.nav-cta,
.btn-gold,
.btn-secondary-live,
.bento-card,
.pricing-card,
[class*="button"],
[class*="btn"] {
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1) !important;
}

/* 1️⃣2️⃣ IMPACT WORDS - Emphasize key phrases with serif */
.impact-word {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: #B48512;
  font-weight: 600;
}

/* 1️⃣3️⃣ SMOOTH TRANSITIONS ON ALL INTERACTIVE ELEMENTS */
a, button, [role="button"], input, select, textarea {
  transition: all 200ms cubic-bezier(0.19, 1, 0.22, 1);
}

/* 1️⃣4️⃣ FORM INPUT GLOW - Inputs glow on focus */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2), 0 0 15px rgba(212, 175, 55, 0.15) !important;
}

/* 1️⃣5️⃣ PARALLAX SHINE EFFECT - Cards have subtle light reflection */
.bento-card,
.pricing-card,
.card {
  position: relative;
  overflow: hidden;
}

.bento-card::after,
.pricing-card::after,
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: var(--shine-x, 50%);
  pointer-events: none;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 300ms ease-out;
  transform: translate(-50%, -50%);
}

.bento-card:hover::after,
.pricing-card:hover::after,
.card:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 🌊 ADVANCED PREMIUM EFFECTS 🌊 */
/* ═══════════════════════════════════════════════════════════════ */

/* 1️⃣6️⃣ LIVING DATA BACKGROUND - Futuristic particle stream */
#living-data-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.02;
}

/* 1️⃣7️⃣ DEPTH-WINDOW EFFECT - Images parallax inside cards */
.bento-card img,
.pricing-card img,
.bento-card video,
.pricing-card video,
.card img,
.card video {
  transition: transform 500ms cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: center;
}

.depth-window {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.depth-window-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.2);
  transition: transform 800ms cubic-bezier(0.19, 1, 0.22, 1);
}

/* 1️⃣8️⃣ FLUID MORPH - Text morphing on hover */
h1, h2, h3, .nav-logo, .section-title {
  transition: font-weight 0.6s cubic-bezier(0.19, 1, 0.22, 1),
              letter-spacing 0.6s cubic-bezier(0.19, 1, 0.22, 1),
              text-shadow 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

h1:hover, h2:hover, h3:hover, .nav-logo:hover, .section-title:hover {
  font-weight: 700;
  letter-spacing: -1px;
  /* Chromatic aberration effect - very subtle red and blue shift */
  text-shadow:
    -2px 0 0 rgba(255, 0, 0, 0.1),
    2px 0 0 rgba(0, 100, 255, 0.1),
    0 0 20px rgba(212, 175, 55, 0.15);
}

/* 1️⃣9️⃣ LIQUID FLOW DIVIDER - Wavy section separator */
.liquid-divider {
  position: relative;
  width: 100%;
  height: 120px;
  margin: -1px 0;
}

.liquid-divider svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: liquidWave 60s ease-in-out infinite;
}

@keyframes liquidWave {
  0%, 100% {
    transform: translateY(0px);
  }
  25% {
    transform: translateY(8px);
  }
  50% {
    transform: translateY(0px);
  }
  75% {
    transform: translateY(-8px);
  }
}

/* 2️⃣0️⃣ LIQUID DIVIDER GRADIENT - Smooth color transition */
.liquid-divider-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(212, 175, 55, 0.03) 50%,
    rgba(212, 175, 55, 0.08) 100%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

/* 2️⃣1️⃣ IMAGE PARALLAX EFFECT - On scroll, images move differently */
.parallax-image {
  will-change: transform;
}

/* 2️⃣2️⃣ SECTION TRANSITIONS - Smooth entry with flowing effect */
section {
  position: relative;
  transition: all 800ms cubic-bezier(0.19, 1, 0.22, 1);
}

/* 2️⃣3️⃣ MORPHING TEXT ENHANCEMENT - Gradient text color on hover */
.morph-text {
  background: linear-gradient(90deg, #111827, #B48512);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

h1:hover .morph-text,
h2:hover .morph-text,
h3:hover .morph-text {
  opacity: 1;
}
