/* ============================================
   LibertyX Bitcoin ATM — Custom Styles
   Classic & Elegant · Burgundy + Blush
   ============================================ */

/* ---------- Base & Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(123, 45, 59, 0.15);
  color: #7B2D3B;
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Hero Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.animate-fade-in {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
  animation: floatDelayed 5s ease-in-out infinite;
}

/* ---------- Navbar ---------- */
#navbar {
  background: transparent;
  transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08), 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

#mobile-menu.open {
  transform: translateX(0) !important;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-nav-link {
  position: relative;
}

.mobile-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #7B2D3B;
  transition: width 0.3s ease;
}

.mobile-nav-link:hover::after,
.mobile-nav-link.active::after {
  width: 60%;
}

/* ---------- Menu Lines Animation ---------- */
#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  width: 24px;
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 24px;
  margin-right: 0;
  margin-left: auto;
}

/* ---------- Smooth anchor offset ---------- */
section[id] {
  scroll-margin-top: 88px;
}

/* ---------- Button ripple effect ---------- */
a[href^="tel:"] {
  position: relative;
  overflow: hidden;
}

/* ---------- Image lazy-load fade-in ---------- */
img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.4s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #FDFCFA;
}

::-webkit-scrollbar-thumb {
  background: #E9D5D0;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #7B2D3B;
}

/* ---------- Focus styles ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Print styles ---------- */
@media print {
  #navbar,
  #mobile-menu,
  .scroll-reveal {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body {
    background: white;
    color: black;
  }
}
