/* Base styles & custom properties */
:root {
    --coral-500: #ff8c4a;
    --coral-600: #ff6d2f;
    --charcoal-900: #1e2026;
    --charcoal-950: #111216;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Staggered delays for grid items */
    .grid .reveal:nth-child(2) { transition-delay: 0.1s; }
    .grid .reveal:nth-child(3) { transition-delay: 0.2s; }
    .grid .reveal:nth-child(4) { transition-delay: 0.3s; }
    .grid .reveal:nth-child(5) { transition-delay: 0.4s; }
    .grid .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(17, 18, 22, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
    background: var(--charcoal-900);
}

::-webkit-scrollbar-thumb {
    background: var(--coral-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--coral-600);
}

/* Selection color */
::selection {
    background: rgba(255, 109, 47, 0.3);
    color: white;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

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

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Accessibility: focus visible */
:focus-visible {
    outline: 2px solid #ff6d2f;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #contact-form, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
