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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #102a43;
}
::-webkit-scrollbar-thumb {
    background: #486581;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Selection */
::selection {
    background: #4ade80;
    color: #102a43;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Section Labels */
.section-label {
    display: block;
}

.section-title {
    position: relative;
}

.section-desc {
    position: relative;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(74, 222, 128, 0.3);
}

/* Gallery Items */
.gallery-item {
    cursor: pointer;
}

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

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

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 50%;
    margin-top: -0.125rem;
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 50%;
    margin-bottom: -0.125rem;
}

.mobile-link {
    transition: opacity 0.3s ease;
}

/* Navbar States */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.08);
}

#navbar.scrolled .font-serif {
    color: #102a43 !important;
}

#navbar.scrolled .text-midnight-600 {
    color: #486581 !important;
}

#navbar.scrolled .menu-line {
    background: #102a43 !important;
}

#navbar.hero-transparent .font-serif {
    color: #ffffff !important;
}

#navbar.hero-transparent .text-midnight-600 {
    color: #9fb3c8 !important;
}

#navbar.hero-transparent .menu-line {
    background: #ffffff !important;
}

#navbar.hero-transparent a:not(.bg-midnight-900) {
    color: #d9e2ec !important;
}

/* Scroll Reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
