/* ============================================
   Base — Reset + Tipografia + Layout globale
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 72px; /* compensate fixed nav on anchor scroll */
}

main {
    padding-top: 72px; /* fixed nav height — evita che il nav copra i contenuti */
}

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

/* Titoli */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-charcoal);
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    line-height: 1.75;
    color: var(--color-text-mid);
}

p + p {
    margin-top: var(--space-4);
}

a {
    color: var(--color-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-green-dark);
}

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.container--wide {
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* Sezioni */
.section {
    padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

.section--sm {
    padding-block: clamp(var(--space-8), 4vw, var(--space-16));
}

.section--dark {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-white);
}

.section--dark p {
    color: rgba(255,255,255,0.75);
}

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

/* Section header */
.section-header {
    text-align: center;
    margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.section-header .eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-green);
    margin-bottom: var(--space-3);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    max-width: 55ch;
    margin-inline: auto;
    font-size: var(--text-lg);
}

/* Utility */
.text-green  { color: var(--color-green); }
.text-white  { color: var(--color-white); }
.text-center { text-align: center; }
.text-left   { text-align: left; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* WordPress admin bar */
.admin-bar .nav { top: 32px !important; }
@media screen and (max-width: 782px) {
    .admin-bar .nav { top: 46px !important; }
}
