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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #f6f6f7;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0c0c0f;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Reveal animations — progressive enhancement, only below the fold */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(12, 12, 15, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(46, 46, 53, 0.6);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 1;
}

#hero > .relative {
    position: relative;
    z-index: 2;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b4a;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

/* Button hover micro-interaction */
button[type="submit"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after,
a[href="#contact"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

button[type="submit"]:hover::after,
a[href="#contact"]:hover::after {
    opacity: 1;
}

/* Card tilt effect on hover */
.group {
    will-change: transform;
}

/* Map container */
.map-container {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(46, 46, 53, 0.6);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 280px;
    filter: grayscale(0.6) brightness(0.8) contrast(1.1);
    transition: filter 0.4s ease;
}

.map-container:hover iframe {
    filter: grayscale(0.3) brightness(0.85) contrast(1.05);
}
