/* Custom Styles for NovaStake Landing Page */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section Parallax */
#hero {
    position: relative;
}

#hero img {
    animation: subtle-zoom 20s ease-in-out infinite;
}

@keyframes subtle-zoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Floating Animation for APY Metric */
@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#apy-value {
    animation: float-up 1s ease-out 0.5s both;
}

/* Glow Effect on Cards */
.group:hover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1), transparent);
    pointer-events: none;
    border-radius: 1rem;
}

/* Mobile Menu Toggle */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    max-height: 500px;
}

/* Smooth Transitions */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    transition: color 0.3s ease;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Section Spacing */
section {
    position: relative;
    z-index: 1;
}

/* Glassmorphism Effect Enhancement */
.backdrop-blur {
    backdrop-filter: blur(10px) saturate(180%);
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

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

/* Metric Chart Animation */
.chart-bar {
    animation: grow 0.8s ease-out;
}

@keyframes grow {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 100%;
        opacity: 1;
    }
}

/* Fade In Animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Glow on Hover */
button[class*="from-blue"],
button[class*="from-gradient"] {
    position: relative;
}

button[class*="from-blue"]:hover::after,
button[class*="from-gradient"]:hover::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: inherit;
    border-radius: inherit;
    opacity: 0.2;
    z-index: -1;
    filter: blur(10px);
}

/* Text Selection */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Focus Styles for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    #hero {
        min-height: 100vh;
        padding: 2rem 0;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.875rem !important;
    }

    /* Sticky CTA on Mobile */
    button[class*="from-blue"] {
        min-height: 48px;
        width: auto;
    }

    /* Ensure no horizontal scroll */
    body, html {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Stack CTA buttons vertically on small screens */
    .flex-col.md\:flex-row {
        flex-direction: column;
    }

    /* Make metrics readable */
    #apy-value {
        font-size: 3rem;
    }
}

/* Print Styles */
@media print {
    header,
    footer {
        display: none;
    }

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

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
