/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(26, 77, 46, 0.15);
    color: #1a4d2e;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAFAF7;
}
::-webkit-scrollbar-thumb {
    background: #dce8df;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb88a;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.reveal-up:nth-child(1) { transition-delay: 0s; }
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }
.reveal-up:nth-child(5) { transition-delay: 0.4s; }
.reveal-up:nth-child(6) { transition-delay: 0.5s; }

/* Scroll line animation */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

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

/* Apply floating after reveal */
.reveal-up.revealed ~ .float-card-1,
.absolute.top-12.-left-4.lg\:-left-8,
.absolute.bottom-20.-left-8.lg\:-left-12,
.absolute.bottom-0.right-4.lg\:right-0 {
    /* Float animation applied via JS after reveal */
}

/* Navbar transition */
#navbar.scrolled {
    background-color: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 77, 46, 0.06);
}

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

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

/* Hamburger animation */
#menu-toggle.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active #line2 {
    opacity: 0;
}

#menu-toggle.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Image hover zoom */
.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Form input focus glow */
input:focus ~ label,
textarea:focus ~ label {
    color: #2a5c2a;
}

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

/* Print styles */
@media print {
    #navbar, #mobile-menu, .animate-scroll-line { display: none; }
    body { background: white; color: black; }
}
