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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: #0A1628;
    color: #fff;
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 164, 94, 0.3);
    color: #fff;
}

/* Loader */
@keyframes loaderSlide {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.loader-bar {
    animation: loaderSlide 1s ease-out forwards;
    transform-origin: left;
}

/* Grain texture */
.hero-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scaleY(1); opacity: 0.3; }
}

.scroll-line {
    animation: scrollLine 2s ease-out forwards;
    transform-origin: top;
}

/* Hero animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-subtitle {
    animation: fadeUp 0.9s ease-out 0.5s both;
}

.hero-title {
    animation: fadeUp 1s ease-out 0.7s both;
}

.hero-desc {
    animation: fadeUp 0.9s ease-out 0.9s both;
}

.hero-cta {
    animation: fadeUp 0.9s ease-out 1.1s both;
}

/* Nav link hover underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C8A45E;
    transition: width 0.4s ease;
}

.nav-link {
    position: relative;
}

.nav-link:hover::after {
    width: 100%;
}

/* Service card */
.service-card {
    position: relative;
    transition: background-color 0.5s ease;
}

/* Area card */
.area-card {
    position: relative;
}

/* Testimonial card */
.testimonial-card {
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.08);
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.5s ease-out both;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.3s; }

/* Mobile menu button */
#menu-btn[aria-expanded="true"] .line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menu-btn[aria-expanded="true"] .line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn[aria-expanded="true"] .line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Back to top */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0A1628 inset !important;
    -webkit-text-fill-color: rgba(255,255,255,0.8) !important;
}

/* Smooth focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 1px solid rgba(200, 164, 94, 0.5);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-title span {
        display: block;
    }
}
