/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF7F66;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero animations - only on elements below fold or with explicit animation classes */
.hero-badge {
    animation: fadeInDown 0.6s ease forwards;
}

.hero-title {
    animation: fadeInUp 0.7s ease forwards;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-cta {
    animation: fadeInUp 0.9s ease forwards;
}

.hero-trust {
    animation: fadeInUp 1s ease forwards;
}

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

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

/* Scroll reveal - progressive enhancement, only active with JS and prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

.navbar-scrolled .nav-logo-sub {
    color: #5f6472 !important;
}

/* Mobile menu transition */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

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

/* Selection color */
::selection {
    background: #FF7F66;
    color: white;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid #FF7F66;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Print styles */
@media print {
    header, footer, .scroll-reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
