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

html {
    scroll-behavior: smooth;
    /* Le ancore native si fermano sotto l'header fisso */
    scroll-padding-top: calc(var(--header-height) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--color-ink-soft);
    line-height: var(--leading-body);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-ink);
    line-height: var(--leading-snug);
    letter-spacing: -0.012em;
    text-wrap: balance;
}

p {
    max-width: var(--measure);
}

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

a {
    color: var(--color-petrol);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
    color: var(--color-petrol-deep);
}

ul,
ol {
    list-style: none;
}

address {
    font-style: normal;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--color-petrol);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Icone SVG inline: seguono font-size e color del contenitore */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 2000;
    padding: 0.75rem 1rem;
    background: var(--color-ink);
    color: var(--color-white);
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: 1rem;
    color: var(--color-white);
}

@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;
    }
}
