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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

/* Navbar */
.nav {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav.scrolled .nav-logo-text {
    color: #141418;
}

.nav.scrolled .nav-logo-sub {
    color: #56565e;
}

.nav.scrolled .nav-link {
    color: #56565e;
}

/* Mobile Menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 400px;
}

.mobile-menu-link {
    display: block;
    padding: 8px 0;
}

/* Hero */
.hero {
    position: relative;
}

.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(11, 11, 14, 0.7) 0%, rgba(11, 11, 14, 0.4) 100%);
}

.hero-overlay2 {
    background: linear-gradient(to top, rgba(11, 11, 14, 0.9) 0%, transparent 50%);
}

/* Scroll Indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Service Cards */
.service-card {
    border: 1px solid transparent;
}

.service-card:hover {
    border-color: rgba(255, 79, 45, 0.1);
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* Mobile Menu Button */
.nav-icon-open,
.nav-icon-close {
    transition: opacity 0.2s ease;
}

/* Button Focus */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #ff4f2d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection */
::selection {
    background: rgba(255, 79, 45, 0.2);
    color: #141418;
}

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

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9e9ea4;
}
