/* ========== BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #88dbb8;
    color: #0d1b2a;
}

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

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.95); }
}

@keyframes floatDelay {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-15px, 20px) scale(1.03); }
    66% { transform: translate(25px, -10px) scale(0.97); }
}

@keyframes floatSlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-fade-in-up-delay {
    animation: fadeInUp 0.8s ease-out 0.15s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-2 {
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-3 {
    animation: fadeInUp 0.8s ease-out 0.45s forwards;
    opacity: 0;
}

.animate-fade-in-up-delay-4 {
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

.animate-float-delay {
    animation: floatDelay 10s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 12s ease-in-out infinite;
}

/* ========== NAVBAR ========== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(13, 27, 42, 0.08);
}

.nav-link {
    position: relative;
}

/* ========== SCROLL REVEAL ========== */
.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========== MOBILE MENU ========== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== CUSTOM SELECT ========== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========== FORM FOCUS ========== */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(82, 196, 152, 0.2);
}

/* ========== BUTTON RIPPLE ========== */
button, a[role="button"] {
    position: relative;
    overflow: hidden;
}

/* ========== IMAGE LOADING ========== */
img {
    background-color: #e5e7eb;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

img:not(.loaded) {
    opacity: 0;
}

/* ========== ACCESSIBILITY ========== */
@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;
        transform: none;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
