/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f2b4c;
}
::-webkit-scrollbar-thumb {
    background: #4a9960;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6aab82;
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(10, 31, 53, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(168, 213, 186, 0.1);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #ffffff !important;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

.reveal.visible {
    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; }

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #8ec6a5 !important;
    box-shadow: 0 0 0 3px rgba(142, 198, 165, 0.15);
}

/* Image hover container */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before,
.bg-cream-100::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(15, 43, 76, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

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

/* Selection color */
::selection {
    background: #8ec6a5;
    color: #0a1f35;
}
