/* ========== BASE RESET & GLOBAL ========== */
*, *::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;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: #c9a84c;
    color: #0a1628;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4af5a;
}

/* ========== NAVBAR ========== */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.15);
}

/* ========== MOBILE MENU ========== */
#mobileMenu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Menu button animations */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

/* ========== HERO ========== */
.hero-headline {
    animation: heroReveal 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-eyebrow {
    animation: heroReveal 1s 0.2s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-sub {
    animation: heroReveal 1s 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-image {
    animation: heroImageReveal 1.2s 0.3s ease forwards;
    opacity: 0;
    transform: scale(1.05);
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ========== SERVICES ========== */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:nth-child(5) { transition-delay: 0.32s; }
.service-card:nth-child(6) { transition-delay: 0.4s; }

/* ========== ABOUT ========== */
.about-image-container {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-image-container.revealed {
    opacity: 1;
    transform: translateX(0);
}

.about-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.about-reveal:nth-child(1) { transition-delay: 0s; }
.about-reveal:nth-child(2) { transition-delay: 0.1s; }
.about-reveal:nth-child(3) { transition-delay: 0.2s; }
.about-reveal:nth-child(4) { transition-delay: 0.3s; }
.about-reveal:nth-child(5) { transition-delay: 0.4s; }

/* ========== GALLERY ========== */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }
.gallery-item:nth-child(5) { transition-delay: 0.4s; }

/* ========== CTA ========== */
.cta-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.cta-reveal:nth-child(1) { transition-delay: 0s; }
.cta-reveal:nth-child(2) { transition-delay: 0.15s; }
.cta-reveal:nth-child(3) { transition-delay: 0.3s; }

/* ========== CONTACT ========== */
.contact-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.contact-reveal:nth-child(1) { transition-delay: 0s; }
.contact-reveal:nth-child(2) { transition-delay: 0.1s; }
.contact-reveal:nth-child(3) { transition-delay: 0.2s; }
.contact-reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem !important;
    }

    .hero-headline.lg\:text-8xl {
        font-size: 2.5rem !important;
    }

    #hero {
        padding-top: 5rem;
    }

    .service-card {
        padding: 1.5rem !important;
    }

    .service-card.lg\:p-10 {
        padding: 1.5rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem !important;
    }
}

@media (min-width: 1024px) {
    .hero-headline {
        font-size: 4.5rem !important;
    }
}

/* ========== FOCUS STYLES ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9a84c;
    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;
    }
    .service-card,
    .about-reveal,
    .gallery-item,
    .cta-reveal,
    .contact-reveal,
    .hero-headline,
    .hero-eyebrow,
    .hero-sub,
    .hero-image {
        opacity: 1;
        transform: none;
    }
}
