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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(0);
}

.reveal-left {
    transform: translateX(0);
}

.reveal-right {
    transform: translateX(0);
}

/* Scroll-triggered animations (progressive enhancement via JS) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-left.is-visible {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-right.is-visible {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero Content Animation */
.hero-content {
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Scroll Line Animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
    100% {
        height: 48px;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* Navbar Transition */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-logo-text {
    color: #1e293b !important;
}

/* Mobile Menu */
.mobile-link {
    transition: color 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    rounded: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    nav, #backToTop, button {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
