/* Base & Utilities */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(232, 100, 92, 0.3);
    color: #f6f6f6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* Navbar */
.nav-scrolled {
    background: rgba(15, 15, 15, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(61, 61, 61, 0.5);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.4);
}

/* Stat Cards */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -2s;
}

.stat-card:nth-child(3) {
    animation-delay: -4s;
}

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

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Mobile Menu */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(61, 61, 61, 0.5);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Form Inputs */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 100, 92, 0.15);
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background-color: #2D2D2D;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #E8645C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* Print styles */
@media print {
    nav, .stat-card, #contact-form, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
