/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--color-surface);
    color: var(--color-on-surface);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--duration-normal) var(--ease-smooth),
                color var(--duration-normal) var(--ease-smooth);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grain overlay for texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--grain);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--duration-fast); }
a:hover { color: var(--color-primary-light); }
img { max-width: 100%; height: auto; }

/* Typography */
.display { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.headline { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.title-lg { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.title-md { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.title-sm { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.body-lg { font-size: 1rem; line-height: 1.6; }
.body-md { font-size: 0.875rem; line-height: 1.5; }
.body-sm { font-size: 0.8125rem; line-height: 1.4; color: var(--color-on-surface-muted); }
.label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-on-surface-faint); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-outline); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-on-surface-faint); }

::selection { background-color: var(--color-primary-surface); color: var(--color-on-primary-surface); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes leafSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.animate-in { animation: slideUp var(--duration-slow) var(--ease-out) both; }
.animate-in-delay-1 { animation-delay: 60ms; }
.animate-in-delay-2 { animation-delay: 120ms; }
.animate-in-delay-3 { animation-delay: 180ms; }
.animate-in-delay-4 { animation-delay: 240ms; }
