/* ===== 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;
}

::selection {
    background-color: #065f46;
    color: #fefdf8;
}

/* ===== Navbar ===== */
.nav-link {
    position: relative;
}

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

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

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(6, 95, 70, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: #065f46;
}

#navbar.scrolled .font-serif,
#navbar.scrolled span:first-child {
    color: #065f46;
}

/* ===== Floating cards ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

.floating-card:nth-child(4) {
    animation-delay: -1s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

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

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

/* ===== Scroll animations ===== */
.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.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; }

/* ===== Product cards ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Button focus ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #065f46;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-track {
    background: #fefdf8;
}

::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}

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

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
}
