/**
 * Main Styles
 * Palette colori:
 * - Sfondo principale: #DDD1C7
 * - Sfondo anti-flash: #F1F1F1
 * - Elemento grafico: #CBD0B6
 * - Dettagli (linee, bordi): #91A9A5
 * - Testo scuro: #282E3B
 */

:root {
    --color-bg-main: #d8c7c8;
    --color-bg-alt: #F1F1F1;
    --color-accent: #B6D8E4;
    --color-detail: #3D8FA3;
    --color-text: #1C3044;

    --font-body: 'Source Sans 3', sans-serif;      /* Testi normali (Light 300) */
    --font-main: 'Source Sans 3', sans-serif;       /* Testi principali (Regular 400) */
    --font-heading: 'Source Serif 4', serif;        /* Titoli H1 */
    --font-script: 'Allura', cursive;               /* Firma footer */
    --font-quote: 'Dancing Script', cursive;        /* Aforismi e testi script leggibili */

    --container-width: 1200px;
    --section-padding: 80px 20px;
}

/* Typography overrides */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400; /* Source Sans 3 Regular */
}

h1 {
    font-family: var(--font-heading); /* Source Serif 4 per H1 */
}

/* Container */
.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sections */
.section {
    padding: var(--section-padding);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.section:nth-child(odd) {
    background: var(--color-bg-main);
}

.section:nth-child(even) {
    background: var(--color-bg-alt);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    letter-spacing: 0.08em;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 16px rgba(255, 255, 255, 0.4),
        0 0 2px rgba(255, 255, 255, 0.9);
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: var(--color-detail);
    margin: 20px auto 0;
    box-shadow:
        0 0 2px rgba(255, 255, 255, 0.9),
        0 0 8px rgba(255, 255, 255, 0.6),
        0 0 16px rgba(255, 255, 255, 0.4);
}

/* Hidden class (per elementi che appaiono con JS) */
.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-italic {
    font-style: italic;
}

/* Smooth Transitions */
* {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Scroll Snap */
html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

.section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-scale {
    animation: fadeInScale 0.6s ease forwards;
}

/* Selection Color */
::selection {
    background: var(--color-accent);
    color: var(--color-text);
}

::-moz-selection {
    background: var(--color-accent);
    color: var(--color-text);
}

/* Nascondi scrollbar nativa — sostituita da scrollbar custom */
html {
    scrollbar-width: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Loading State */
.loading {
    opacity: 0.5;
    pointer-events: none;
    cursor: wait;
}
