/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for magnetic cursor */
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Global Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Magnetic Cursor */
.cursor-dot, .cursor-blob {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--forest);
}

.cursor-blob {
    width: 40px;
    height: 40px;
    background-color: var(--sage);
    opacity: 0.3;
    filter: blur(4px);
    transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                background-color 0.3s ease;
}

.cursor-blob.hover-active {
    width: 80px;
    height: 80px;
    background-color: var(--forest);
    opacity: 0.15;
}

/* Utility / Fallback for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .magnetic {
        transition: none !important;
        transform: none !important;
    }
    .cursor-dot, .cursor-blob {
        display: none !important;
    }
    body {
        cursor: auto;
    }
}
