/* ===== Custom Styles for Inezz Evans ===== */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal base — content is visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal — animated state applied via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal.animated {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar.scrolled #nav-logo,
#navbar.scrolled #nav-subtitle {
    color: white;
}

/* Mobile menu transitions */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

#mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hero animations */
#hero-badge {
    animation: fadeInDown 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

#hero-headline {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

#hero-subtext {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.7s;
    opacity: 0;
}

#hero-cta {
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

#card-1 {
    animation: floatInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

#card-2 {
    animation: floatInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1s;
    opacity: 0;
}

#card-3 {
    animation: floatInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

#scroll-indicator {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

/* Floating card animation */
@keyframes floatInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Subtle floating animation for hero cards */
@media (prefers-reduced-motion: no-preference) {
    #card-1 {
        animation: floatInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
                   gentleFloat 6s ease-in-out infinite 1.8s;
    }
    #card-2 {
        animation: floatInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
                   gentleFloat 5s ease-in-out infinite 2s;
    }
    #card-3 {
        animation: floatInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
                   gentleFloat 7s ease-in-out infinite 2.2s;
    }
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: inherit;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(13, 148, 136, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 148, 136, 0.7);
}

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
