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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(255, 122, 79, 0.3);
    color: #fff;
}

/* Scroll reveal base — content always visible, animation applied via JS */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(32px);
    }
}

/* Mobile nav transitions */
#mobile-nav.open .mobile-link {
    animation: fadeDown 0.3s ease forwards;
}

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

/* Hamburger animation */
#menu-btn.active #bar1 {
    transform: translateY(6px) rotate(45deg);
}
#menu-btn.active #bar2 {
    opacity: 0;
}
#menu-btn.active #bar3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Subtle scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111111;
}
::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff7a4f;
}

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

/* Select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Header background state */
header.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(64, 64, 64, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card hover glow */
.group:hover .w-14 {
    box-shadow: 0 0 20px rgba(255, 122, 79, 0.15);
}

/* Image lazy load fade */
img[loading="lazy"] {
    transition: opacity 0.4s ease;
}
