/* ============================================================================
   BASE & RESET — THE FOUNDATION
   ============================================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--color-accent-primary);
    color: var(--color-bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 4px;
}

/* Base Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Minimalist Magic Animations */
@keyframes fadeUpSpring {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-in {
    animation: fadeUpSpring var(--duration-slow) var(--spring-fluid) backwards;
}

.stagger-children > * {
    animation: fadeUpSpring var(--duration-slow) var(--spring-fluid) backwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.35s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.4s; }

/* Cinematic noise overlay for texture */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

/* ============================================================================
   CUSTOM CURSORS
   ============================================================================ */
* {
    cursor: url('../cursors/icons8-puntatore-blu-24.png') 0 0, auto !important;
}

a, a *, button, button *, select, select *, .clickable, .clickable *, [type="button"], [type="submit"], .btn, .btn *, .nav-label, label, input[type="checkbox"], input[type="radio"], summary,
.ts-control, .ts-control *, .ts-dropdown .option, .ts-dropdown .option *, .item, .item *, .ts-wrapper, .ts-wrapper *,
.fc-event, .fc-event *, .fc-button, .fc-button *, .drop-zone, .file-upload-label,
.swal2-confirm, .swal2-cancel, .swal2-close, .toast-close,
.mobile-nav-item, .mobile-nav-item *, .dropdown-item, .dropdown-item *, [role="button"], [role="button"] * {
    cursor: url('../cursors/icons8-hand-cursor-24.png') 8 0, pointer !important;
}

input:not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):not([type="color"]):not([type="file"]), textarea, [contenteditable="true"], .cursor-text {
    cursor: url('../cursors/icons8-text-cursor-24.png') 12 12, text !important;
}

.disabled, [disabled], :disabled, .disabled *, [disabled] *, :disabled * {
    cursor: url('../cursors/icons8-unavailable-24.png') 12 12, not-allowed !important;
}
