/* ═══════════════════════════════════════════════════════════
   LibertyX Bitcoin ATM — Custom Styles
   ═══════════════════════════════════════════════════════════ */

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

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

body {
    min-height: 100vh;
}

::selection {
    background: rgba(16, 185, 129, 0.2);
    color: #0f2b18;
}

/* ── Navbar ── */
#navbar {
    background: transparent;
}

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

#navbar.scrolled .navbar-text {
    color: #0f2b18;
}

#navbar.scrolled .nav-link {
    color: #1f5c33;
}

#navbar.scrolled .nav-link:hover {
    background: rgba(45, 122, 69, 0.08);
}

/* ── Hero Gradient ── */
.hero-gradient {
    background: linear-gradient(135deg, 
        #07170d 0%, 
        #0f2b18 20%, 
        #13371f 40%, 
        #184728 60%, 
        #1f5c33 80%, 
        #0f2b18 100%
    );
    background-size: 400% 400%;
    animation: heroGradient 16s ease infinite;
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
}

/* ── Geometric Shapes ── */
.hero-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.geo-shape {
    position: absolute;
    opacity: 0.08;
}

.geo-circle-1 {
    width: 500px;
    height: 500px;
    border: 2px solid #34d399;
    border-radius: 50%;
    top: -150px;
    right: -100px;
    animation: floatShape 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    opacity: 0.06;
    animation: floatShape 15s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 120px;
    height: 120px;
    border: 2px solid #a3e635;
    border-radius: 50%;
    top: 30%;
    left: 8%;
    opacity: 0.1;
    animation: floatShape 12s ease-in-out infinite;
}

.geo-square-1 {
    width: 180px;
    height: 180px;
    border: 2px solid #6ee7b7;
    top: 20%;
    right: 10%;
    transform: rotate(45deg);
    opacity: 0.07;
    animation: rotateShape 25s linear infinite;
}

.geo-square-2 {
    width: 80px;
    height: 80px;
    background: #10b981;
    bottom: 25%;
    right: 20%;
    transform: rotate(30deg);
    opacity: 0.05;
    animation: floatShape 18s ease-in-out infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid #34d399;
    opacity: 0.04;
    top: 60%;
    left: 15%;
    animation: rotateShape 30s linear infinite;
}

.geo-dots {
    background-image: radial-gradient(circle, #34d399 1px, transparent 1px);
    background-size: 24px 24px;
    width: 200px;
    height: 200px;
    top: 15%;
    left: 50%;
    opacity: 0.08;
    animation: floatShape 22s ease-in-out infinite;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(10px) rotate(-3deg); }
}

@keyframes rotateShape {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── Scroll Reveal ── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-gradient {
        animation: none;
    }
    .geo-shape {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#mobile-menu.open {
    display: block;
}

#mobile-menu.hidden {
    display: none;
}

.mobile-link {
    display: block;
    animation: fadeLink 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* ── Hamburger Animation ── */
#menu-btn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menu-btn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* ── Utility ── */
@media (max-width: 767px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
    }
    .geo-circle-2 {
        width: 180px;
        height: 180px;
    }
    .geo-square-1 {
        width: 100px;
        height: 100px;
    }
    .geo-triangle-1 {
        border-left-width: 60px;
        border-right-width: 60px;
        border-bottom-width: 104px;
    }
}
