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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #FAFAF5;
    color: #1c1917;
    overflow-x: hidden;
}

::selection {
    background-color: #A7F3D0;
    color: #064E3B;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    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; }

/* Hero cards stagger */
.hero-card {
    opacity: 0;
    transform: translateY(24px);
    animation: heroCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-card:nth-child(1) { animation-delay: 0.4s; }
.hero-card:nth-child(2) { animation-delay: 0.55s; }
.hero-card:nth-child(3) { animation-delay: 0.7s; }
.hero-card:nth-child(4) { animation-delay: 0.85s; }

@keyframes heroCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
#header {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#header.scrolled {
    background: rgba(250, 250, 245, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mobile-link {
    transition: color 0.2s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF5;
}
::-webkit-scrollbar-thumb {
    background: #D1FAE5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A7F3D0;
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #EDEDE0;
}
