/* ==========================================================================
   Base & Reset
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
    /* Rimosso padding e stile di default */
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg {
    max-width: 100%;
    display: block;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* ==========================================================================
   Tipografia
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-primary);
    color: var(--color-primary-dark);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed, 0.3s) ease;
}

a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.font-italic {
    font-style: italic;
}

.bg-panna {
    background-color: var(--color-background);
}

.bg-tortora {
    background-color: var(--color-surface);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Accessibilità / Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}