/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #c9a227;
    color: #0f1a2e;
}

/* Navbar */
#navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(26, 39, 68, 0.06);
    box-shadow: 0 1px 0 rgba(26, 39, 68, 0.04);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(15, 26, 46, 0.06);
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* Scroll Indicator */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

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

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

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

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

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

.menu-line-1 {
    transform-origin: center;
}

.menu-line-2 {
    transform-origin: center;
}

/* Mobile menu open state */
body.menu-open .menu-line-1 {
    transform: translateY(5px) rotate(45deg);
}

body.menu-open .menu-line-2 {
    transform: translateY(-5px) rotate(-45deg);
}

/* Divider line animation on service cards */
.group:hover .absolute.top-0.left-0 {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery hover */
.group img {
    will-change: transform;
}

/* Form inputs */
input:focus,
textarea:focus {
    outline: none;
}

/* Subtle pattern overlay for dark sections */
section.bg-navy-900::before,
section.bg-navy-900\/30::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(212, 168, 83, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

section.bg-navy-900,
section.bg-navy-900\/30 {
    position: relative;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a853;
}

body:not(.dark) ::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body:not(.dark) ::-webkit-scrollbar-thumb {
    background: #1a2744;
}
