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

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d1f32;
}
::-webkit-scrollbar-thumb {
    background: #34a87b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5cc99d;
}

/* Hero Background */
.hero-bg {
    background: linear-gradient(135deg, #0d1f32 0%, #152f4a 50%, #1e4265 100%);
}

.hero-bg img {
    opacity: 0.45;
}

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(3, 9, 15, 0.3) 0%,
        rgba(13, 31, 50, 0.5) 40%,
        rgba(6, 15, 25, 0.85) 100%
    );
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-desc {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(3, 9, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(142, 223, 188, 0.08);
}

.nav-logo-text {
    color: rgba(255, 255, 255, 0.9);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #8edfbc;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #8edfbc;
}

/* Mobile menu */
.mobile-link {
    font-family: 'Playfair Display', serif;
}

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

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

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #34a87b, #8edfbc);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Gallery */
.gallery-item {
    position: relative;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reveal Animations (below-fold only, progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .reveal.reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal.reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }

    .reveal.reveal-scale {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* 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 !important;
        transform: none !important;
    }
}

/* Selection */
::selection {
    background: rgba(52, 168, 123, 0.3);
    color: #0d1f32;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #8edfbc;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-title span {
        display: block;
    }
}

@media (min-width: 769px) {
    .hero-title br {
        display: block;
    }
}
