/* ============================================
   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 {
    background-color: rgba(13, 148, 136, 0.3);
    color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* --- Hero Animations --- */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}
.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.3s; }
.hero-elem:nth-child(3) { animation-delay: 0.5s; }
.hero-elem:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal (progressive enhancement) --- */
@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.fade-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content is visible without JS */
.reveal {
    opacity: 1;
    transform: none;
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background: rgba(12, 19, 33, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* --- Mobile Menu --- */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
#mobile-menu.hidden {
    animation: slideUp 0.25s ease forwards;
}

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

.mobile-link {
    display: block;
}

/* --- Button Ripple Effect --- */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* --- Image Optimization --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(248, 250, 252, 1) inset !important;
    -webkit-text-fill-color: #1e293b !important;
    caret-color: #1e293b;
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .hero-elem {
        transform: translateY(20px);
    }
    @keyframes heroReveal {
        to { transform: translateY(0); }
    }
}

/* --- Print Styles --- */
@media print {
    nav, #contact, footer { display: none; }
    body { color: #000; background: #fff; }
    section { padding: 2rem 0; }
}
