/* Glassmorphism Utilities */
.glass-nav {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (prefers-reduced-motion: reduce) {
    #main-header {
        transition: none;
    }
}

html {
    scroll-behavior: smooth;
    height: 100vh;
    overflow-y: scroll;
}

html.snap-ready {
    scroll-snap-type: y mandatory;
}

.snap-section {
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* Ensure one section per view */
}

/* Reveal Animations
   Elements are VISIBLE by default to prevent flash.
   Only hide them once JS adds 'reveal-enabled' to html,
   and immediately mark in-viewport elements as 'active'.
*/
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

/* When JS is ready and reveal is enabled, hide non-active elements */
html.reveal-enabled .reveal:not(.active) {
    opacity: 0;
    transform: translateY(30px);
}

/* Active state - always visible */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Legacy support for snap-section based reveal */
.snap-section.active .reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for child elements if executed via JS or utility classes */
.delay-100 {
    transition-delay: 0.1s;
    animation-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
    animation-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
    animation-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
    animation-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
    animation-delay: 0.5s;
}

.delay-600 {
    transition-delay: 0.6s;
    animation-delay: 0.6s;
}

.delay-700 {
    transition-delay: 0.7s;
    animation-delay: 0.7s;
}

.delay-800 {
    transition-delay: 0.8s;
    animation-delay: 0.8s;
}

/* Base Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.5, 0, 0, 1) forwards;
    opacity: 0;
    /* Start hidden */
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

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

/* Custom Gradients */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #2DD4BF 0%, #818CF8 100%);
}

.text-gradient-secondary {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #818CF8 0%, #F472B6 100%);
}

.bg-hero-glow {
    background: radial-gradient(circle at 50% 50%, rgba(45, 212, 191, 0.15), rgba(15, 23, 42, 0) 50%);
}

/* Advanced Animations */
@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-move 8s ease infinite;
}

/* Card Hover 3D Effect */
.hover-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    perspective: 1000px;
}

.hover-3d:hover {
    transform: translateY(-5px) rotateX(2deg);
    box-shadow: 0 15px 30px -10px rgba(45, 212, 191, 0.2);
}

/* Shine Effect */
.shine-overflow {
    position: relative;
    overflow: hidden;
}

.shine-overflow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: 0.5s;
}

.shine-overflow:hover::after {
    left: 125%;
    transition: 0.7s ease-in-out;
}

/* Enhanced Glass */
.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(45, 212, 191, 0.5);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1);
}

/* Dashboard Mockup Styles */
.dashboard-mockup {
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: 40px 1fr;
    gap: 12px;
    padding: 12px;
    height: 100%;
    width: 100%;
}

.mockup-sidebar {
    grid-row: 1 / -1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    gap: 12px;
}

.mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.mockup-header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}

.mockup-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
}

.mockup-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.mockup-chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(45, 212, 191, 0.2), transparent);
    clip-path: polygon(0% 100%, 0% 40%, 20% 60%, 40% 30%, 60% 70%, 80% 20%, 100% 50%, 100% 100%);
}

.mockup-chart-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 100%;
    padding-bottom: 8px;
}

.bar {
    width: 15%;
    background: rgba(129, 140, 248, 0.3);
    border-radius: 2px;
}

/* Text Highlight Animation */
.text-highlight {
    background: linear-gradient(120deg, rgba(45, 212, 191, 0.2) 0%, rgba(45, 212, 191, 0.2) 100%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    background-position: 0 0;
    transition: background-size 1s ease-in-out;
}

.text-highlight.active {
    background-size: 100% 100%;
}

/* Enhanced Reveal - visible by default to prevent flash */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* When JS is ready, hide non-active reveal-up elements */
html.reveal-enabled .reveal-up:not(.active) {
    opacity: 0;
    transform: translateY(40px);
}

/* Active state - always visible */
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}