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

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

body {
    overflow-x: hidden;
}

/* Navigation transitions */
.nav-link, .nav-logo-text, .nav-toggle-btn {
    transition: color 0.4s ease, background-color 0.4s ease;
}

/* Mobile menu */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    transition: color 0.3s ease;
}

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
}

/* Hero animations - visible by default, enhanced with JS */
.hero-subtitle {
    opacity: 0;
    animation: fadeUp 1s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-title {
    opacity: 0;
    animation: fadeUp 1s 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-desc {
    opacity: 0;
    animation: fadeUp 1s 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 1px solid rgba(196, 181, 253, 0.5);
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #faf5ff;
}

::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 3px;
}

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

/* Selection color */
::selection {
    background: #e9d5ff;
    color: #581c87;
}
