/* ============================================
   LibertyX Bitcoin ATM - Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(194, 112, 78, 0.2);
    color: #3D2B1F;
}

/* ============================================
   Floating Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

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

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement: content is visible
   by default, JS adds animation classes
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), 
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ============================================
   Navbar Scrolled State
   ============================================ */
.nav-scrolled {
    background: rgba(253, 252, 248, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(61, 43, 31, 0.06);
}

.nav-scrolled #navbar {
    border-bottom: 1px solid rgba(224, 202, 156, 0.3);
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Step Cards
   ============================================ */
.step-card {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .step-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .step-card.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Service Cards Hover
   ============================================ */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ============================================
   Button Ripple / Focus States
   ============================================ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #C2704E;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Smooth Image Loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #E9CA9C;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C2704E;
}

/* ============================================
   Mobile Optimizations
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }

    /* Ensure hero is fully visible on mobile */
    section#top {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 60px;
    }

    /* Reduce floating card offsets on mobile */
    .absolute.-top-4.-right-4,
    .absolute.-bottom-4.-left-4 {
        position: relative;
        margin: 12px 0;
        animation: none !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #back-to-top, .animate-float, .animate-float-delayed {
        display: none !important;
    }

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

    a {
        color: black !important;
    }
}
