/* =====================================================
   BELYORE — SMOOTH UI LAYER
   Scroll behaviour · transitions · reveal animations
   ===================================================== */

/* ── 1. Global scroll & selection ── */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 107, 53, 0.30);
  color: #fff;
}

/* ── 2. Page-load fade-in ── */
#root {
  animation: pageReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pageReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 3. Smooth transitions on every interactive element ── */
a, button, input, textarea, select,
[role="button"] {
  transition:
    color            0.25s ease,
    background-color 0.25s ease,
    border-color     0.25s ease,
    box-shadow       0.30s ease,
    opacity          0.25s ease,
    transform        0.20s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* ── 4. Button press feel ── */
button:active,
a[class*="px-"]:active {
  transform: scale(0.96) !important;
}

/* ── 5. Link hover lift ── */
nav a:hover,
footer a:hover {
  transform: translateY(-1px);
}

/* ── 6. Scroll-reveal: sections fade up when entering viewport
        BUG FIX: Added a no-js fallback so sections are visible
        even before JS runs. JS adds bel-reveal class dynamically;
        we only apply the hidden state when that class is present.    ── */
.bel-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity   0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.bel-reveal.bel-visible {
  opacity: 1;
  transform: translateY(0);
}
.bel-reveal:nth-child(2) { transition-delay: 0.08s; }
.bel-reveal:nth-child(3) { transition-delay: 0.16s; }
.bel-reveal:nth-child(4) { transition-delay: 0.24s; }
.bel-reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── 7. Card hover lift + glow ── */
[class*="rounded-"][class*="bg-[#141414]"],
[class*="rounded-"][class*="bg-white/5"] {
  transition:
    transform  0.30s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.30s ease !important;
  will-change: transform, box-shadow;
}
[class*="rounded-"][class*="bg-[#141414]"]:hover,
[class*="rounded-"][class*="bg-white/5"]:hover {
  transform: translateY(-4px) scale(1.015) !important;
  box-shadow:
    0 8px 40px rgba(255, 107, 53, 0.18),
    0 2px 12px rgba(0, 0, 0, 0.5) !important;
}

/* ── 8. CTA primary button pulsing ring ── */
a[class*="bg-[#FF6B35]"],
button[class*="bg-[#FF6B35]"] {
  position: relative;
}
a[class*="bg-[#FF6B35]"]::after,
button[class*="bg-[#FF6B35]"]::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 107, 53, 0.55);
  animation: ctaRing 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes ctaRing {
  0%   { transform: scale(1);    opacity: 0.7; }
  60%  { transform: scale(1.08); opacity: 0;   }
  100% { transform: scale(1.08); opacity: 0;   }
}

/* ── 9. Smooth image load
        BUG FIX: Images are visible by default. The JS sets loading="lazy"
        and adds bel-loaded on load. Only lazy-tagged images that haven't
        loaded yet get opacity: 0. This prevents already-loaded images
        from going invisible when JS runs.                               ── */
img {
  transition: opacity 0.4s ease;
}
img[loading="lazy"]:not(.bel-loaded) {
  opacity: 0;
}
img[loading="lazy"].bel-loaded {
  opacity: 1;
}

/* ── 10. Focus ring (accessibility) ── */
*:focus-visible {
  outline: 2px solid rgba(255, 107, 53, 0.8);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 11. Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 53, 0.35);
  border-radius: 99px;
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 107, 53, 0.65); }

/* ── 12. Smooth marquee (trusted-by strip) ── */
[style*="marquee"] * {
  will-change: transform;
}

/* ── 13. Input smooth focus ── */
input, textarea {
  transition:
    border-color 0.25s ease,
    box-shadow   0.25s ease !important;
}
input:focus, textarea:focus {
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.35) !important;
  border-color: rgba(255, 107, 53, 0.6) !important;
  outline: none;
}

/* ── 14. Pricing card highlight ── */
[class*="border-[#FF6B35]"] {
  transition: box-shadow 0.4s ease !important;
  box-shadow: 0 0 30px rgba(255,107,53,0.15);
}
[class*="border-[#FF6B35]"]:hover {
  box-shadow: 0 0 60px rgba(255,107,53,0.30) !important;
}

/* ── 15. Hero stats bar smooth entrance ── */
#bel-stats-reveal {
  animation: statsSlideUp 0.8s 1.2s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes statsSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 16. Smooth footer links ── */
footer a {
  position: relative;
  display: inline-block;
}
footer a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #FF6B35;
  transition: width 0.3s ease;
}
footer a:hover::after { width: 100%; }

/* ── 17. Mobile tap highlight removal ── */
* {
  -webkit-tap-highlight-color: rgba(255, 107, 53, 0.15);
}

/* ── 18. Prevent layout shift on mobile ── */
@media (max-width: 640px) {
  #bel-model-wrap {
    display: none !important;
  }
  #bel-aura {
    display: none !important;
  }
}
