/* ========================================
   BASE.CSS, Giardini Fioriti
   Reset, Variables, Typography, Utilities
   ======================================== */

/* --- Custom Properties (Branding Guide 2020) --- */
:root {
    /* Verdi, scala principale */
    --primary: #006F3B;
    --dark-green: #28903B;
    --green: #6D9D31;
    --grass: #8DC63F;
    --light-green: #CBDB2A;
    --background-green: #E4ECAC;

    /* Accenti caldi */
    --yellow: #FFC20E;
    --orange: #F26522;

    /* Accenti floreali */
    --pink: #EC008C;
    --violet: #BD1A8D;
    --pale-pink: #DB6EAA;

    /* Neutri */
    --cream: #FDFCF7;
    --warm-white: #F8F6F0;
    --text-dark: #1a2e1a;
    --text-medium: #3d5a3d;

    /* Spacing */
    --section-padding: 7rem 4rem;
    --container-max: 1400px;

    /* Transitions */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    color: var(--text-dark);
    background: var(--cream);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
    touch-action: manipulation;
}

ul, ol {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    line-height: 1.15;
}

h1 {
    font-size: clamp(3rem, 5vw, 4.2rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
}

h3 {
    font-size: 1.4rem;
}

h4 {
    font-size: 1.15rem;
}

.accent {
    color: var(--primary);
}

.italic {
    font-style: italic;
    color: var(--pink);
}

/* --- Utilities --- */
.section-header {
    max-width: 600px;
    margin-bottom: 4rem;
}

.section-header.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.05rem;
    color: var(--text-medium);
}

section {
    padding: var(--section-padding);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 0;
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    section {
        padding: 5rem 2rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 1.5rem;
    }
}
