/* =========================================================================
   TOKENS
   ========================================================================= */
:root {
    --green-900: #16291a;
    --green-800: #1e3a22;
    --green-700: #2f5a2b;
    --green-600: #3a6935;   /* verde storico Tages */
    --green-500: #4f8a47;
    --green-100: #e7efe4;
    --green-50:  #f3f7f1;

    --clay-500: #c2643b;    /* terracotta etrusca come accento */
    --clay-100: #f7e6dc;

    --ink:      #17201a;
    --ink-soft: #4a554d;
    --ink-mute: #7b867e;
    --line:     #dfe5dc;
    --paper:    #fbfcf9;
    --white:    #ffffff;

    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(22, 41, 26, .05), 0 2px 8px rgba(22, 41, 26, .04);
    --shadow-md: 0 10px 30px -10px rgba(22, 41, 26, .18);
    --wrap: 1180px;
    --header-h: 84px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: var(--green-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
    font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--green-600); margin-bottom: .9rem;
    display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--clay-500); border-radius: 2px; }

:focus-visible { outline: 2px solid var(--clay-500); outline-offset: 3px; border-radius: 6px; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .9rem 1.5rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; text-decoration: none;
    transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
}
.btn-primary { background: var(--green-600); color: var(--white); box-shadow: 0 6px 18px -8px rgba(58,105,53,.7); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); }
.btn-ghost { color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-arrow { font-weight: 600; font-size: .9rem; text-decoration: none; }
.link-arrow::after { content: " →"; transition: margin .2s; }
.link-arrow:hover::after { margin-left: 4px; }

.link-btn { font-size: .9rem; font-weight: 600; color: var(--green-600); }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* =========================================================================
   HEADER (sempre chiaro: il logo è a colori)
   ========================================================================= */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: .6rem 1rem; border-radius: 8px;
             background: var(--green-700); color: var(--white); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

.site-header {
    position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    color: var(--ink);
    transition: box-shadow .3s, height .3s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(22,41,26,.25); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.logo { display: block; flex-shrink: 0; }
.logo img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav a { color: inherit; text-decoration: none; font-size: .93rem; font-weight: 500; opacity: .82; position: relative; }
.main-nav a:hover, .main-nav a.is-current { opacity: 1; color: var(--green-700); }
.main-nav > a:not(.nav-cta)::after {
    content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px;
    background: var(--clay-500); transition: right .25s var(--ease);
}
.main-nav > a:hover::after, .main-nav > a.is-current::after { right: 0; }
.main-nav .nav-cta { padding: .55rem 1.15rem; border-radius: 999px; background: var(--green-600); color: var(--white); opacity: 1; }
.main-nav .nav-cta:hover, .main-nav .nav-cta.is-current { background: var(--green-700); color: var(--white); }
.main-nav .nav-cta.is-current { box-shadow: 0 0 0 3px var(--green-100); }
.lang { display: flex; gap: .15rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.lang a { font-size: .78rem; font-weight: 600; padding: .3rem .5rem; border-radius: 6px; opacity: .55; text-decoration: none; color: inherit; }
.lang a:hover { opacity: 1; }
.lang a[aria-current] { opacity: 1; background: var(--green-100); color: var(--green-700); }

.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child  { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* =========================================================================
   HERO CON SLIDER
   ========================================================================= */
.hero {
    position: relative; overflow: hidden; color: var(--white); isolation: isolate;
    margin-top: var(--header-h);
    min-height: min(calc(100svh - var(--header-h)), 860px);
    display: flex; flex-direction: column; justify-content: center;
    padding: 56px 0 120px; background: var(--green-900);
}
.slides { position: absolute; inset: 0; z-index: -2; }
.slide { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12) translate(1%, 1%); }
.slide.is-active { opacity: 1; z-index: 2; }
/* la foto che esce resta ferma e piena sotto quella che entra: niente scatti né "buchi" nella dissolvenza */
.slide.is-leaving { opacity: 1; z-index: 1; transition: none; }
.slide.is-active img, .slide.is-leaving img { animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.12) translate(1%, 1%); } to { transform: scale(1.02) translate(0, 0); } }

.hero-shade {
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(14,30,17,.88) 0%, rgba(14,30,17,.62) 42%, rgba(14,30,17,.12) 75%),
        linear-gradient(0deg, rgba(14,30,17,.6) 0%, transparent 35%);
}
.hero-inner { position: relative; }
.hero .eyebrow { color: #cfe5c8; }
.hero h1 { font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.5rem); max-width: 22ch; margin-bottom: 1.2rem; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero h1 em { font-style: italic; color: #f0b18f; font-weight: 400; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); color: #e2ece0; max-width: 54ch; margin-bottom: 2.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-stats {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
    margin-top: 2.6rem; max-width: 600px;
    background: rgba(255,255,255,.18); border-radius: var(--radius); overflow: hidden;
}
.hero-stats div { background: rgba(14,30,17,.55); padding: .9rem 1.3rem; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-stats dt { font-size: .78rem; color: #cfe5c8; letter-spacing: .04em; }
.hero-stats dd { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.1; }

.slider-ui { position: absolute; left: 0; right: 0; bottom: 32px; display: flex; align-items: center; justify-content: space-between; }
.slider-dots { display: flex; gap: .5rem; }
.dot { width: 44px; height: 24px; display: grid; place-items: center; }
.dot span { display: block; width: 100%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; position: relative; }
.dot span::after { content: ""; position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.dot.is-active span::after { animation: dotfill var(--slide-ms, 6000ms) linear forwards; }
.hero.is-paused .dot.is-active span::after { animation-play-state: paused; }
@keyframes dotfill { to { transform: scaleX(1); } }
.slider-arrows { display: flex; gap: .5rem; }
.arrow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
         border: 1.5px solid rgba(255,255,255,.4); transition: background .2s, border-color .2s; }
.arrow:hover { background: rgba(255,255,255,.15); border-color: var(--white); }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   PAGINE INTERNE
   ========================================================================= */
.page-hero {
    position: relative; isolation: isolate; overflow: hidden;
    margin-top: var(--header-h); padding: 2.4rem 0 2.6rem;
    background: var(--green-50); color: var(--ink); border-bottom: 1px solid var(--line);
}
/* intestazione chiara: niente fascia verde piena, solo un accento leggero */
.page-hero:not(.page-hero-img)::before {
    content: ""; position: absolute; z-index: -1; right: -8%; top: -60%; width: 55%; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(79,138,71,.12) 0%, rgba(79,138,71,0) 65%);
}
/* foto appena visibile sotto un velo chiaro (Home → Testi e sezioni → Foto di sfondo) */
.page-hero-photo { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; filter: grayscale(.7) contrast(.9); }
.page-hero:has(.page-hero-photo)::after {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: linear-gradient(90deg, rgba(240,246,238,.96) 0%, rgba(240,246,238,.9) 45%, rgba(240,246,238,.78) 100%);
}
@media (max-width: 760px) { .page-hero:has(.page-hero-photo)::after { background: rgba(240,246,238,.92); } }
.page-hero:not(.page-hero-img) h1 { color: var(--green-900); }
.page-hero:not(.page-hero-img) .eyebrow { color: var(--green-600); }
.page-hero:not(.page-hero-img) .page-lead { color: var(--ink-soft); }
.page-hero:not(.page-hero-img) .breadcrumb { color: var(--ink-mute); }
.page-hero:not(.page-hero-img) .breadcrumb a { color: var(--ink-soft); }
.page-hero:not(.page-hero-img) .hero-logo span { padding: 0; background: none; border-radius: 0; }
.page-hero-img { color: var(--white); background: var(--green-900); }
.page-hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero-img::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(14,30,17,.88) 0%, rgba(14,30,17,.6) 50%, rgba(14,30,17,.25) 100%);
}
.page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem); max-width: 24ch; }
.page-hero-img .eyebrow { color: #cfe5c8; }
.page-lead { margin-top: 1rem; max-width: 60ch; font-size: 1.12rem; color: #d7e4d3; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: #b9d1b3; margin-bottom: 1.3rem; }
.breadcrumb a { color: #e3eee0; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.section-tight { padding: 4rem 0 6rem; }

.project-list { display: grid; gap: 1.2rem; margin-top: 2.5rem; }
.project-row {
    display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: center;
    padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white);
    color: inherit; text-decoration: none; transition: box-shadow .3s, transform .3s var(--ease);
}
.project-row:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.project-thumb { aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 6px); overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-row:hover .project-thumb img { transform: scale(1.05); }
.project-body { padding-right: 1.5rem; }
.project-body .eu-meta { color: var(--ink-mute); justify-content: flex-start; gap: 1.2rem; margin-bottom: .6rem; }
.project-body h2 { font-size: 1.7rem; margin-bottom: .3rem; }
.project-sub { color: var(--green-600); font-weight: 500; margin-bottom: .6rem; }
.project-body p { color: var(--ink-soft); margin-bottom: .8rem; }

.project-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.project-intro { font-size: 1.25rem !important; color: var(--ink) !important; line-height: 1.55; }
.prose ul { margin: 0 0 1.1rem 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: .35rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .7rem; }
.project-facts {
    position: sticky; top: calc(var(--header-h) + 24px);
    padding: 1.8rem; border-radius: var(--radius); background: var(--green-50); border: 1px solid var(--line);
}
.project-facts .award-badge { display: inline-block; margin-bottom: 1.2rem; }
.project-facts dl { display: grid; gap: 1rem; margin-bottom: 1.4rem; }
.project-facts dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); }
.project-facts dd { font-weight: 600; }
.project-facts dd ul { list-style: none; font-weight: 500; font-size: .95rem; }
.other-projects { margin-top: 5rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.other-projects .h3 { font-size: 1.6rem; margin-bottom: 1.6rem; }
.back-link { margin-top: 2rem; }

/* sezioni scure: settori e clienti */
.section-dark { background: var(--green-900); color: #e3ece0; }
.section-dark .eyebrow { color: #b9d6b2; }
.section-dark h2 { color: var(--white); }
.section-dark .section-lead { color: #b7c8b2; }
.section-dark .sector-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }
.section-dark .sector-card:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.18); box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); }
.section-dark .sector-card h3 { color: var(--white); }
.section-dark .sector-card p { color: #b7c8b2; }
.section-dark .sector-icon { background: rgba(255,255,255,.08); stroke: #cfe5c8; }
.section-dark .sector-card:hover .sector-icon { background: var(--green-500); stroke: var(--white); }

/* logo del progetto al posto del titolo */
.eu-logo { display: block; height: 30px; width: auto; max-width: 100%; }
.project-body h2 .eu-logo { height: 34px; margin: .2rem 0 .4rem; }
.hero-logo span { display: inline-block; padding: .9rem 1.4rem; background: var(--white); border-radius: 14px; }
.hero-logo img { display: block; height: clamp(34px, 5vw, 56px); width: auto; }

/* fascia loghi cofinanziamento e allegati */
.eu-loghi { margin: 1rem 0 .4rem; padding: .7rem .9rem; background: var(--white); border-radius: 10px; border: 1px solid var(--line); }
.eu-loghi img { display: block; width: 100%; max-height: 60px; object-fit: contain; object-position: left center; }
.eu-loghi-grande { margin-top: 2.5rem; }
.eu-loghi-grande img { max-height: 90px; object-position: center; }
.eu-empty { color: #bccbb8; }
.project-row.no-thumb { grid-template-columns: 1fr; padding: 1.8rem; }
.downloads { list-style: none; margin: 1rem 0 0 !important; display: grid; gap: .7rem; }
.downloads a { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--white);
               color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.downloads a:hover { border-color: var(--green-500); box-shadow: var(--shadow-sm); }
.downloads svg { width: 30px; height: 30px; flex-shrink: 0; fill: none; stroke: var(--clay-500); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.downloads span { display: grid; font-weight: 600; line-height: 1.4; }
.downloads small { font-weight: 400; color: var(--ink-mute); font-size: .82rem; }
.dl-groups { display: grid; gap: .6rem; margin-top: 1rem; }
.dl-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
.dl-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .9rem; padding: .95rem 1.2rem; font-weight: 600; line-height: 1.35; }
.dl-group summary::-webkit-details-marker { display: none; }
.dl-group summary::after { content: ""; flex-shrink: 0; width: .55rem; height: .55rem; margin-left: .2rem; border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.dl-group[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.dl-group summary:hover { background: var(--green-50); }
.dl-code { flex-shrink: 0; font-size: .75rem; letter-spacing: .04em; font-weight: 700; color: var(--green-700); background: var(--green-100); padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; }
.dl-name { flex: 1; }
.dl-count { flex-shrink: 0; font-weight: 400; font-size: .82rem; color: var(--ink-mute); white-space: nowrap; }
.dl-group .downloads { margin: 0 !important; padding: 0 1.2rem 1.2rem !important; gap: .5rem; }
.dl-group .downloads a { padding: .75rem 1rem; }
.dl-group .downloads svg { width: 24px; height: 24px; }
@media (max-width: 560px) { .dl-count { display: none; } }
.page-content { max-width: 820px; }
.page-content h2 { margin-top: 2.2rem; }
.page-content h3 { margin: 1.6rem 0 .5rem; }
.page-content ol { margin: 0 0 1.1rem 1.4rem; color: var(--ink-soft); }

/* torna su flottante */
.back-to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center; background: var(--green-600); box-shadow: 0 8px 20px -6px rgba(22,41,26,.5);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--green-700); }
.back-to-top svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   MITO
   ========================================================================= */
.myth { background: var(--green-50); border-bottom: 1px solid var(--line); }
.myth-inner { position: relative; padding: 4.5rem 0 4.5rem 5rem; max-width: 900px; }
.myth-mark { position: absolute; left: 0; top: 2.2rem; font-family: var(--font-display); font-size: 7rem; line-height: 1; color: var(--clay-500); opacity: .5; }
.myth p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); line-height: 1.5; color: var(--green-800); }
.myth strong { font-style: normal; font-weight: 700; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: clamp(5rem, 4rem + 4vw, 8rem) 0; }
.section-tint { background: var(--green-50); }
.section-head { margin-bottom: 3.2rem; max-width: 700px; }

.grid-2 { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 6rem); }
.prose p { color: var(--ink-soft); margin-bottom: 1.1rem; font-size: 1.06rem; }
.prose strong { color: var(--ink); }

.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.2rem; }
.info-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.info-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.info-card p { font-size: .9rem; color: var(--ink-soft); margin-bottom: .6rem; }

.notice { padding: 1.2rem 1.4rem; border-radius: var(--radius-sm); background: var(--clay-100); color: #7a3a1d; }

/* Settori */
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.sector-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.8rem; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.sector-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.sector-icon {
    width: 48px; height: 48px; padding: 11px; margin-bottom: 1.4rem; border-radius: 14px;
    background: var(--green-100); fill: none; stroke: var(--green-600); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    transition: background .3s, stroke .3s;
}
.sector-card:hover .sector-icon { background: var(--green-600); stroke: var(--white); }
.sector-card h3 { margin-bottom: .5rem; }
.sector-card p { color: var(--ink-soft); font-size: .95rem; }

/* pulsante PDF */
.pdf-download {
    display: flex; align-items: center; gap: .9rem; padding: .55rem .6rem .55rem 1.1rem;
    border-radius: 999px; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.pdf-download > svg { width: 22px; height: 22px; fill: none; stroke: var(--clay-500); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.pdf-label { font-weight: 600; font-size: .92rem; }
a.pdf-download { color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.pdf-download:hover { border-color: var(--green-500); box-shadow: var(--shadow-md, 0 10px 24px -14px rgba(22,41,26,.35)); transform: translateY(-1px); }
.pdf-go { padding: .45rem .95rem; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .05em; color: var(--white); background: var(--green-600); transition: background .2s; }
a.pdf-download:hover .pdf-go { background: var(--green-700); }

/* =========================================================================
   CV — STRUMENTI
   ========================================================================= */
.cv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-bottom: 3rem; }
.cv-search { position: relative; flex: 1 1 320px; max-width: 460px; }
.cv-search svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
                 fill: none; stroke: var(--ink-mute); stroke-width: 2; stroke-linecap: round; }
.cv-search input {
    width: 100%; padding: .85rem 1rem .85rem 2.8rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--white); font: inherit; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
}
.cv-search input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(79,138,71,.15); }
.cv-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); font-size: .85rem; font-weight: 500; transition: all .2s; }
.chip:hover { border-color: var(--green-500); }
.chip.is-active { background: var(--green-600); border-color: var(--green-600); color: var(--white); }
.cv-actions { margin-left: auto; }
.cv-empty { text-align: center; color: var(--ink-mute); padding: 2rem 0; }
.cv-more { text-align: center; margin-top: 2.5rem; }

/* =========================================================================
   CV — TIMELINE
   ========================================================================= */
.timeline { list-style: none; position: relative; }
.timeline::before {
    content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 2px; transform: translateX(-50%);
    background: linear-gradient(var(--green-600), var(--green-100));
}

.tl-year {
    position: relative;
    display: grid; grid-template-columns: 1fr 72px 1fr; align-items: start;
    margin-bottom: 1.6rem;
    animation: tlIn .5s var(--ease) both;
}
.tl-year.is-collapsed-year, .tl-year.is-filtered { display: none; }
.timeline.is-filtering .tl-year.is-collapsed-year:not(.is-filtered) { display: grid; }
.timeline.is-filtering .tl-year.is-fdopo { display: none !important; }   /* filtrando: solo i primi anni trovati, gli altri con «Mostra altri» */
@keyframes tlIn { from { opacity: 0; transform: translateY(16px); } }

.tl-dot {
    grid-column: 2; grid-row: 1; justify-self: center; margin-top: 24px;
    width: 16px; height: 16px; border-radius: 50%; background: var(--white);
    border: 3px solid var(--green-600); box-shadow: 0 0 0 6px var(--paper); z-index: 2;
    transition: background .25s, transform .25s;
}
.tl-year:has(.tl-head[aria-expanded="true"]) .tl-dot { background: var(--clay-500); border-color: var(--clay-500); transform: scale(1.15); }

.tl-label {
    grid-row: 1; margin-top: 6px;
    font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1;
    color: var(--green-100); -webkit-text-stroke: 1px var(--green-500); letter-spacing: -.02em;
    user-select: none;
}
.tl-card { grid-row: 1; }

.is-left  .tl-card  { grid-column: 1; }
.is-left  .tl-label { grid-column: 3; justify-self: start; }
.is-right .tl-card  { grid-column: 3; }
.is-right .tl-label { grid-column: 1; justify-self: end; }

.tl-card {
    position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: box-shadow .3s, border-color .3s;
}
.tl-card:hover { box-shadow: var(--shadow-md); }
/* linguetta verso la linea */
.tl-card::before {
    content: ""; position: absolute; top: 25px; width: 12px; height: 12px; background: var(--white);
    border: 1px solid var(--line); transform: rotate(45deg);
}
.is-left  .tl-card::before { right: -7px; border-left: 0; border-bottom: 0; }
.is-right .tl-card::before { left: -7px;  border-right: 0; border-top: 0; }

.tl-head {
    width: 100%; display: flex; align-items: center; gap: 1rem; text-align: left;
    padding: 1.1rem 1.3rem 1.1rem 1.5rem; border-radius: var(--radius);
}
.tl-year-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--green-800); }
.tl-count { font-size: .85rem; color: var(--ink-mute); padding: .2rem .7rem; border-radius: 999px; background: var(--green-50); }
.tl-icon {
    margin-left: auto; position: relative; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--line); flex-shrink: 0; transition: transform .35s var(--ease), background .25s, border-color .25s;
}
.tl-icon::before, .tl-icon::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px;
    background: var(--ink-mute); transform: translate(-50%, -50%); transition: background .25s;
}
.tl-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.tl-head:hover .tl-icon { border-color: var(--green-500); }
.tl-head[aria-expanded="true"] .tl-icon { transform: rotate(45deg); background: var(--green-600); border-color: var(--green-600); }
.tl-head[aria-expanded="true"] .tl-icon::before,
.tl-head[aria-expanded="true"] .tl-icon::after { background: var(--white); }

/* apertura fluida senza max-height fisso */
.tl-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.tl-head[aria-expanded="true"] + .tl-body { grid-template-rows: 1fr; }
.tl-body-inner { overflow: hidden; }

.tl-works { list-style: none; margin: 0 1.5rem; border-top: 1px solid var(--line); }
.work { padding: 1rem 0; border-bottom: 1px solid var(--green-50); }
.work:last-child { border-bottom: 0; padding-bottom: 1.4rem; }
.work.is-hidden { display: none; }
.work-tag { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
            color: var(--clay-500); margin-bottom: .25rem; }
.work-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--ink); }
.work-title a { color: inherit; }
.work-client { font-size: .9rem; color: var(--ink-soft); margin-top: .15rem; }
mark { background: #fbe3a6; color: inherit; border-radius: 3px; padding: 0 2px; }

/* =========================================================================
   PROGETTI EU
   ========================================================================= */
.section-dark { background: var(--green-900); color: #e3ece0; }
.section-dark .eyebrow { color: #b9d6b2; }
.eu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.eu-card {
    display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.eu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.eu-card-logos { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); background: var(--white); }
.eu-card-logos img { display: block; width: 100%; height: 48px; object-fit: contain; object-position: left center; }
.eu-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.6rem 1.6rem; }
.eu-card-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; }
.eu-card h3 { min-width: 0; overflow-wrap: anywhere; }
.eu-card h3 { font-size: 1.6rem; color: var(--green-800); }
.eu-period { flex-shrink: 0; padding: .25rem .7rem; border-radius: 999px; background: var(--green-50); border: 1px solid var(--green-100);
             color: var(--green-700); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eu-sub { margin-top: .35rem; color: var(--green-600); font-weight: 500; font-size: .95rem; line-height: 1.4; }
.eu-prog { margin-top: .8rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); line-height: 1.5; }
.eu-text { margin-top: .7rem; color: var(--ink-soft); font-size: .95rem; }
.eu-more { margin-top: auto; padding-top: 1.2rem; font-weight: 600; font-size: .9rem; color: var(--clay-500); }
.eu-card:hover .eu-more { text-decoration: underline; text-underline-offset: 3px; }
.section-head-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.btn-ghost-dark { color: var(--green-700); box-shadow: inset 0 0 0 1.5px var(--green-600); }
.btn-ghost-dark:hover { background: var(--green-600); color: var(--white); }
.award { display: flex; align-items: center; gap: 1.2rem; margin-top: 2.5rem; padding: 1.3rem 1.6rem;
         border-radius: var(--radius); background: rgba(194,100,59,.14); border: 1px solid rgba(194,100,59,.35); }
.award-badge { flex-shrink: 0; padding: .4rem .9rem; border-radius: 999px; background: var(--clay-500); color: var(--white); font-weight: 600; font-size: .85rem; }

/* =========================================================================
   AZIENDA
   ========================================================================= */
.about { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-figure { position: sticky; top: calc(var(--header-h) + 40px); display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.about-figure img { height: min(560px, 62vh); width: auto; filter: drop-shadow(14px 18px 14px rgba(22,41,26,.18)); }
.about-figure figcaption { text-align: center; font-size: .78rem; color: var(--ink-mute); line-height: 1.45; max-width: 18ch; }
.about-year { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 600; color: var(--clay-500); line-height: 1; margin-bottom: .4rem; }
.about-body h2 { margin-bottom: 2.5rem; max-width: 18ch; }
.about-mini { display: none; }
.about-block { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.about-block h3 { font-size: 1.45rem; margin-bottom: 1rem; color: var(--green-800); }
.about-block .prose p { text-align: justify; hyphens: auto; }
.iso-badge { display: inline-flex; align-items: center; gap: .6rem; margin-top: .4rem; padding: .55rem 1rem .55rem .8rem;
             border-radius: 999px; background: var(--green-50); border: 1px solid var(--green-100); font-size: .88rem; font-weight: 600; color: var(--green-700); }
.iso-badge svg { width: 20px; height: 20px; fill: none; stroke: var(--green-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ambiti { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 2rem; margin-top: 1.4rem; }
.ambiti li { display: flex; align-items: baseline; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.ambiti span { font-family: var(--font-display); font-size: .9rem; color: var(--clay-500); font-weight: 600; min-width: 1.6rem; }

.company-data {
    margin-top: 4rem; padding: clamp(1.8rem, 4vw, 3rem); border-radius: calc(var(--radius) + 6px);
    background: var(--green-50); border: 1px solid var(--line);
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem 4rem;
}
.company-data-head { grid-column: 1 / -1; }
.company-data-head h3 { font-size: 1.6rem; }
.company-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; grid-column: 2; grid-row: 2; }
.company-dl div { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.company-dl dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); }
.company-dl dd { font-weight: 600; font-size: .97rem; }
.company-memberships { grid-column: 1; grid-row: 2; }
.company-memberships h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--green-600); margin-bottom: 1rem; }
.company-memberships ul { list-style: none; display: grid; gap: .9rem; }
.company-memberships li { position: relative; padding-left: 1.4rem; font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }
.company-memberships li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--clay-500); }

/* =========================================================================
   CLIENTI — numeri per tipo, nomi principali, elenco completo in finestra
   ========================================================================= */
.section-lead { margin-top: .8rem; color: var(--ink-soft); font-size: 1.05rem; }
.clients-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 4rem; align-items: end; margin-bottom: 3rem; }
.clients-head .section-lead { margin: 0; max-width: 46ch; }

/* fascia fotografica scura con i numeri, poi elenco su bianco */
.clients-band { position: relative; isolation: isolate; overflow: hidden; color: #e3ece0; padding: clamp(5rem, 4rem + 4vw, 8rem) 0 clamp(3.5rem, 3rem + 2vw, 5rem); background: var(--green-900); }
.clients-band-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35); }
.clients-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22,41,26,.86) 0%, rgba(22,41,26,.80) 55%, rgba(22,41,26,.94) 100%); }
.clients-band .eyebrow { color: #b9d6b2; }
.clients-band h2 { color: var(--white); }
.clients-band .section-lead { color: #c9d8c4; }
.clients-body { padding: 3.2rem 0 clamp(5rem, 4rem + 4vw, 7rem); }
.client-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.client-stat { display: grid; gap: .3rem; padding: 1.8rem 1.6rem 0; text-align: left; border-left: 1px solid rgba(255,255,255,.18); color: inherit; transition: color .25s; }
.client-stat:first-child { border-left: 0; padding-left: 0; }
.client-stat strong { font-family: var(--font-display); font-size: clamp(2.6rem, 1.9rem + 2.4vw, 3.8rem); font-weight: 600; line-height: 1; color: var(--white); transition: color .25s; }
.client-stat span { font-size: .92rem; color: #c9d8c4; }
.client-stat:hover strong { color: #e9a37f; }

.client-cloud { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; }
.client-cloud li { padding: .5rem 1rem; border-radius: 999px; background: #f0f3ee; color: var(--ink); font-size: .92rem; font-weight: 500; line-height: 1.3; }
.client-all { margin-top: 2rem; }
.link-btn-arrow { font-size: .95rem; color: var(--green-600); }

.client-dialog { margin: auto; width: min(1000px, calc(100% - 2rem)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 20px;
                 box-shadow: 0 40px 100px -30px rgba(0,0,0,.45); color: var(--ink); }
.client-dialog[open] { display: flex; flex-direction: column; }
.client-dialog::backdrop { background: rgba(22, 41, 26, .55); backdrop-filter: blur(3px); }
.client-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 1.8rem .6rem; }
.client-dialog-head h3 { font-size: 1.6rem; }
.client-dialog-head h3 span { font-family: var(--font-body); font-size: .85rem; font-weight: 600; color: var(--ink-mute); margin-left: .4rem; }
.client-close { font-size: 2rem; line-height: 1; color: var(--ink-mute); padding: 0 .3rem; }
.client-close:hover { color: var(--ink); }
.client-dialog-tools { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; padding: .6rem 1.8rem 1.2rem; border-bottom: 1px solid var(--line); }
.client-dialog-tools .cv-search { flex: 1 1 260px; }
.client-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.client-list { list-style: none; columns: 2 300px; column-gap: 2.5rem; padding: 1rem 1.8rem 1.8rem; overflow-y: auto; }
.client-list li { break-inside: avoid; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.client-list li[hidden] { display: none; }
.client-name { font-size: .95rem; line-height: 1.35; }
.client-n { flex-shrink: 0; font-size: .78rem; font-weight: 600; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.client-none { padding: 2rem 1.8rem; color: var(--ink-mute); }

/* =========================================================================
   CONTATTI
   ========================================================================= */
.contact-grid { grid-template-columns: 5fr 6fr; align-items: stretch; }
.contact-info { display: flex; flex-direction: column; }
.contact-info h2 { font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem); }
.contact-list { list-style: none; margin: 1.1rem 0 1.3rem; display: grid; gap: .35rem; font-size: .93rem; }
.contact-list li { display: grid; grid-template-columns: 80px 1fr; gap: .8rem; }
.contact-list span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); padding-top: .2rem; }
.map { flex: 1; min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.6); }

.contact-form { background: var(--white); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
                padding: clamp(1.5rem, 3vw, 2.6rem); box-shadow: var(--shadow-md); display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
    font: inherit; font-size: .97rem; padding: .8rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--paper); transition: border-color .2s, box-shadow .2s, background .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-500); background: var(--white); box-shadow: 0 0 0 4px rgba(79,138,71,.15); }
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.err { font-style: normal; font-size: .8rem; color: #c0392b; min-height: 0; }
.err:empty { display: none; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--ink-soft); }
.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--green-600); flex-shrink: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: .4rem; }
.form-status { font-size: .92rem; }
.form-status.is-ok  { color: var(--green-600); font-weight: 600; }
.form-status.is-err { color: #c0392b; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: rgba(34, 34, 34, 1); color: #a3a3a3; font-size: .9rem; padding: 3.5rem 0 2rem; }
.site-footer strong { color: var(--white); }
.footer-brand { display: flex; gap: 1.6rem; align-items: flex-start; }
.footer-brand img { width: 130px; height: auto; opacity: .95; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-footer nav { display: flex; gap: 1.6rem; flex-wrap: wrap; align-items: flex-start; }
.site-footer a { color: #e2e2e2; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.copy { padding-top: 1.5rem; font-size: .8rem; }

/* =========================================================================
   REVEAL ON SCROLL
   ========================================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
    .sector-grid, .eu-grid { grid-template-columns: repeat(2, 1fr); }
    .info-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--paper); color: var(--ink); padding: .5rem 20px 1.5rem; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25);
        max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
        clip-path: inset(0 0 100% 0); visibility: hidden;
        transition: clip-path .45s var(--ease), visibility 0s linear .45s;
    }
    .main-nav.is-open { clip-path: inset(0 0 -40px 0); visibility: visible; transition: clip-path .45s var(--ease), visibility 0s; }
    /* le voci entrano una dopo l'altra */
    /* ritardi compressi: anche le ultime voci (pulsante e lingue) finiscono insieme all'apertura del pannello */
    .main-nav > * { opacity: 0; transform: translateY(-8px); transition: opacity .22s, transform .28s var(--ease); }
    .main-nav.is-open > * { opacity: 1; transform: none; transition-delay: calc(.04s + min(var(--i, 0), 8) * .022s); }
    .main-nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
    .main-nav a::after { display: none; }
    .main-nav .nav-cta { margin-top: 1rem; text-align: center; border: 0; }
    .lang { border: 0; padding: 1rem 0 0; }
    .main-nav .lang a { border: 0; padding: .4rem .8rem; font-size: .85rem; }

    .grid-2, .contact-grid { grid-template-columns: 1fr; }
    .about { grid-template-columns: 1fr; }
    /* su schermi stretti la statuetta grande lascia il posto a una piccola accanto al titolo,
       alta esattamente quanto etichetta + titolo: non scende mai sotto la riga */
    .about-figure { display: none; }
    .about-head { position: relative; padding-right: 48px; }
    .about-mini { display: block; position: absolute; top: 0; right: 4px; bottom: 0; height: 100%; width: auto; filter: drop-shadow(5px 6px 5px rgba(22,41,26,.18)); }
    .about-body h2 { margin-bottom: 0; }
    .about-head { margin-bottom: 2rem; }
    .about-head:not(:has(.about-mini)) { padding-right: 0; }
    /* statuetta piccola a sinistra del motto, alta quanto il testo */
    .about-motto-box { position: relative; padding-left: 40px; margin: -.6rem 0 1.8rem; }
    .about-motto-box .about-mini { display: block; left: 0; right: auto; }
    .about-motto-box .about-motto { margin: 0; }
    .ambiti { grid-template-columns: 1fr 1fr; }
    .company-data { grid-template-columns: 1fr; }
    .company-dl, .company-memberships { grid-column: 1; grid-row: auto; }
    .project-detail { grid-template-columns: 1fr; }
    .project-facts { position: static; }
    .project-row { grid-template-columns: 1fr; }
    .project-body { padding: 0 .6rem .6rem; }

    /* timeline a colonna singola */
    .timeline::before { left: 11px; transform: none; }
    .tl-year { grid-template-columns: 24px 1fr; column-gap: 18px; }
    .tl-dot { grid-column: 1 !important; }
    .tl-card { grid-column: 2 !important; }
    .tl-label { display: none; }
    .is-left .tl-card::before, .is-right .tl-card::before {
        left: -7px; right: auto; border: 1px solid var(--line); border-right: 0; border-top: 0;
    }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .sector-grid, .eu-grid, .info-cards, .form-row { grid-template-columns: 1fr; }
    .ambiti, .company-dl { grid-template-columns: 1fr; }
    .clients-head { grid-template-columns: 1fr; }
    .client-stats { grid-template-columns: 1fr 1fr; }
    .client-stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .client-stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.18); margin-top: 1.4rem; }
    .pdf-download { align-self: flex-start; }
    .about-block .prose p { text-align: left; }
    .hero-stats { grid-template-columns: 1fr; }
    .hero-stats div { display: flex; justify-content: space-between; align-items: baseline; }
    .myth-inner { padding-left: 0; padding-top: 5rem; }
    .cv-actions { margin-left: 0; }
    .award { flex-direction: column; align-items: flex-start; }
    :root { --header-h: 70px; }
    .logo img { height: 40px; }
    .hero { padding: 56px 0 110px; }
    .hero-shade { background: linear-gradient(0deg, rgba(14,30,17,.9) 0%, rgba(14,30,17,.65) 60%, rgba(14,30,17,.45) 100%); }
    .slider-arrows { display: none; }
    .dot { width: 28px; }
    .footer-brand { flex-direction: column; }
}
#clienti { scroll-margin-top: -16px; }

/* sezione scura con foto di sfondo appena percepibile */
.section-photo { position: relative; isolation: isolate; overflow: hidden; }
.section-photo-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.5); }
.section-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22,41,26,.93) 0%, rgba(22,41,26,.88) 50%, rgba(22,41,26,.95) 100%); }
.project-row .eu-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; }
.project-row .eu-meta-period { font-weight: 600; color: var(--green-700); }

/* avviso cookie (solo informativo: il sito usa solo cookie tecnici) */
.cookie-bar { position: fixed; z-index: 60; left: 1rem; bottom: 1rem; max-width: 520px; display: flex; align-items: center; gap: 1rem 1.2rem;
              padding: 1rem 1.2rem; background: rgba(34,34,34,.96); color: #e8ece6; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
              font-size: .88rem; line-height: 1.5; animation: cookie-in .4s var(--ease); }
.cookie-bar a { color: #fff; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.cookie-bar .btn { flex-shrink: 0; padding: .6rem 1.1rem; font-size: .85rem; }
@keyframes cookie-in { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 560px) { .cookie-bar { left: .6rem; right: .6rem; bottom: .6rem; flex-direction: column; align-items: stretch; } }

/* partner: riga compatta sotto i clienti, loghi piccoli */
.partners { margin-top: 3.2rem; padding-top: 2.4rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem 3rem; align-items: start; }
.partners-head h3 { font-size: 1.5rem; color: var(--green-900); }
.partners-head p { margin-top: .4rem; color: var(--ink-soft); font-size: .92rem; }
.partner-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.partner-card { position: relative; display: flex; align-items: center; gap: .9rem; height: 100%; padding: .9rem 2.2rem .9rem 1rem; border: 1px solid var(--line);
                border-radius: var(--radius-sm); background: var(--white); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.partner-card:hover { border-color: var(--green-500); box-shadow: var(--shadow-sm); }
.partner-logo { flex-shrink: 0; display: grid; place-items: center; width: 76px; height: 54px; }
.partner-logo img { max-width: 76px; max-height: 54px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .85; transition: filter .2s, opacity .2s; }
.partner-card:hover .partner-logo img { filter: none; opacity: 1; }
.partner-txt { display: grid; gap: .1rem; line-height: 1.3; }
.partner-txt strong { font-size: .93rem; }
.partner-txt small { font-size: .8rem; color: var(--ink-mute); }
.partner-go { position: absolute; right: .9rem; top: .8rem; font-size: .85rem; color: var(--ink-mute); }
.partner-card:hover .partner-go { color: var(--clay-500); }
@media (max-width: 860px) { .partners { grid-template-columns: 1fr; } }
.cookie-bar[hidden] { display: none; }

/* didascalia della foto dello slider (Area riservata → Slider) */
.slide-caption { position: absolute; right: max(1.25rem, calc((100% - var(--wrap)) / 2 + 1.25rem)); bottom: 84px; max-width: 40ch; margin: 0;
                 font-size: .8rem; letter-spacing: .02em; color: rgba(255,255,255,.78); text-align: right; transition: opacity .35s; }
.slide-caption:empty { display: none; }
.slide-caption.is-changing { opacity: 0; }
@media (max-width: 760px) { .slide-caption { display: none; } }

/* =========================================================================
   NEWS
   ========================================================================= */
.wrap-narrow { max-width: 820px; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.news-card { min-width: 0; }
.news-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--white);
                  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s; }
.news-card-link:hover { border-color: var(--green-500); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.news-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--green-50); }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-card-link:hover .news-card-img img { transform: scale(1.04); }
.news-card-img.is-empty { display: grid; place-items: center; background: linear-gradient(135deg, var(--green-50), var(--green-100)); }
.news-card-img.is-empty span { font-family: var(--font-display); font-size: 3rem; font-weight: 600; color: var(--green-600); opacity: .35; }
.news-card-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.news-meta { font-size: .8rem; color: var(--ink-mute); letter-spacing: .02em; }
.news-meta span { color: var(--clay-500); font-weight: 600; }
.news-card h3 { font-size: 1.15rem; line-height: 1.3; color: var(--green-900); }
.news-sum { font-size: .92rem; color: var(--ink-soft); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { margin-top: auto; padding-top: .4rem; font-size: .86rem; font-weight: 600; color: var(--green-700); }
.news-card-link:hover .news-more { color: var(--clay-500); }
/* prima news della pagina elenco: grande, su due colonne */
.news-card-big { grid-column: 1 / -1; }
.news-card-big .news-card-link { display: grid; grid-template-columns: 1.3fr 1fr; }
.news-card-big .news-card-img { aspect-ratio: auto; min-height: 320px; }
.news-card-big .news-card-body { padding: 2rem 2.2rem; justify-content: center; }
.news-card-big h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.news-card-big .news-sum { -webkit-line-clamp: 5; font-size: 1rem; }
.news-pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.6rem; }
.news-pager a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.news-pager a:hover { border-color: var(--green-500); }
.news-pager a.is-current { background: var(--green-600); border-color: var(--green-600); color: var(--white); }
/* articolo */
.news-hero .news-meta { margin: .4rem 0 .6rem; }
.news-cover { margin: 0 0 2.2rem; border-radius: var(--radius); overflow: hidden; }
.news-cover img { width: 100%; height: auto; display: block; }
.news-body { font-size: 1.05rem; }
.news-back { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.news-altre-t { font-size: 1.5rem; margin-bottom: 1.6rem; color: var(--green-900); }
@media (max-width: 980px) { .news-grid { grid-template-columns: 1fr 1fr; } .news-card-big .news-card-link { grid-template-columns: 1fr; } .news-card-big .news-card-img { min-height: 0; aspect-ratio: 16 / 9; } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } .news-card-big .news-card-body { padding: 1.3rem; } }
.link-back { font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--green-700); } .link-back:hover { color: var(--clay-500); }

/* news in home: diversa dalla griglia dei Progetti EU (una grande + elenco) */
.news-home { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.4rem; align-items: start; }
.news-home.is-single { grid-template-columns: minmax(0, 760px); }
.news-card-lead .news-card-link { border: 0; background: none; border-radius: 0; }
.news-card-lead .news-card-link:hover { box-shadow: none; transform: none; }
.news-card-lead .news-card-img { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.news-card-lead .news-card-body { padding: 1.3rem 0 0; }
.news-card-lead h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.news-card-lead .news-sum { font-size: 1rem; -webkit-line-clamp: 4; }
.news-card-lead .news-more { padding-top: .2rem; }
.news-side { display: grid; border-top: 2px solid var(--green-900); }
.news-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.news-row-img { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--green-50), var(--green-100)); }
.news-row-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-row:hover .news-row-img img { transform: scale(1.05); }
.news-row-txt { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.news-row strong { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; font-weight: 600; color: var(--green-900); transition: color .2s; }
.news-row:hover strong { color: var(--clay-500); }
.news-row-sum { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .news-home { grid-template-columns: 1fr; gap: 1.6rem; } }
@media (max-width: 520px) { .news-row { grid-template-columns: 96px minmax(0, 1fr); gap: .9rem; } .news-row-sum { display: none; } }

/* News: foto di sfondo appena accennata sotto un velo chiaro (si distingue dalle sezioni bianche e verdi) */
.section-photo-light { position: relative; isolation: isolate; overflow: hidden; background: var(--paper); }
.section-photo-light .section-photo-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6) contrast(.9); }
.section-photo-light::before { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(250,250,247,.95) 0%, rgba(250,250,247,.86) 45%, rgba(250,250,247,.95) 100%); }
.section-photo-light .news-row { border-bottom-color: rgba(22,41,26,.12); }
.cf-turnstile { margin: .4rem 0 1rem; }

/* il mito di Tages: motto discreto sotto il titolo della sezione Azienda, accanto alla statuetta */
.about-motto { max-width: none; margin: -1.2rem 0 2.4rem;
               font-family: var(--font-display); font-style: italic; font-size: 1rem; line-height: 1.6; color: var(--ink-mute); }
/* virgolette alte decorative, aperte all'inizio e chiuse alla fine */
.about-motto::before, .about-motto::after { font-family: Georgia, 'Times New Roman', serif; font-style: normal; font-weight: 700; font-size: 2.1em;
    line-height: 0; color: var(--clay-500); vertical-align: -.42em; }
.about-motto::before { content: "\201C"; margin-right: .12em; }
.about-motto::after  { content: "\201D"; margin-left: .08em; }
.about-motto strong { font-style: normal; font-weight: 600; color: var(--green-800); }
@media (max-width: 900px) { .about-motto { margin: -.6rem 0 1.8rem; font-size: .94rem; } }
@media (min-width: 901px) { .about-motto-box .about-mini { display: none; } }

/* ============================ settori: card cliccabili in home e pagina del settore ============================ */
a.sector-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
a.sector-card p { flex: 1; }
.sector-more { margin-top: 1rem; font-weight: 600; font-size: .88rem; color: var(--green-600); }
.sector-more::after { content: " →"; transition: margin .2s; }
a.sector-card:hover .sector-more::after { margin-left: 4px; }
.section-dark .sector-more { color: #9fd38f; }
a.sector-card:focus-visible { outline: 3px solid var(--clay-500); outline-offset: 3px; }

.settore-h1 { display: flex; align-items: center; gap: .9rem; }
.settore-h1 .sector-icon { margin: 0; width: 56px; height: 56px; padding: 13px; flex-shrink: 0; }
.settore-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3.5rem; align-items: start; }
.settore-testo h2 { font-size: 1.3rem; }
.settore-testo ul { padding-left: .2rem; }
.settore-foto { float: right; width: min(46%, 430px); margin: .3rem 0 1.2rem 2rem; }
.settore-foto img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.settore-testo h2 { clear: none; }
.settore-lavori { list-style: none; margin: 0 0 1.2rem !important; padding: 0 !important; display: grid; gap: .1rem; clear: both; }
.settore-lavori li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.settore-lavori strong { display: block; font-size: .95rem; }
.settore-lavori span { font-size: .95rem; }
.settore-anno { font-weight: 700; color: var(--green-600); font-variant-numeric: tabular-nums; }
.settore-aside { position: sticky; top: 6rem; display: grid; gap: 1.5rem; }
.settore-cta { padding: 1.5rem; border-radius: var(--radius); background: var(--green-50, #f0f6ee); }
.settore-cta p { margin-bottom: 1rem; font-weight: 600; color: var(--ink); }
.settore-altri { display: grid; gap: .15rem; }
.settore-altri .eyebrow { margin-bottom: .5rem; }
.settore-altri a { display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-size: .93rem; }
.settore-altri a:hover { background: var(--green-50, #f0f6ee); color: var(--ink); }
.settore-altri a.on { background: var(--green-100); color: var(--green-800); font-weight: 600; }
.settore-altri .sector-icon { width: 30px; height: 30px; padding: 6px; margin: 0; border-radius: 8px; flex-shrink: 0; }
@media (max-width: 900px) {
    .settore-layout { grid-template-columns: 1fr; gap: 2rem; }
    .settore-aside { position: static; }
    .settore-foto { float: none; width: 100%; max-width: 430px; margin: 0 0 1.4rem; }
}

/* ============================ pagina non trovata (404) ============================ */
.e404 { padding: clamp(4rem, 10vw, 7rem) 0; background: var(--green-50); }
.e404-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.e404-cartello { width: min(252px, 60vw); height: auto; margin-bottom: 2rem; filter: drop-shadow(0 14px 22px rgba(30, 70, 30, .18)); transform: rotate(-2deg); }
.e404 h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); margin-bottom: .8rem; }
.e404-testo { max-width: 52ch; color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 1.8rem; }
.e404-strade { margin-top: 2.6rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 640px; }
.e404-strade .eyebrow { width: 100%; justify-content: center; margin-bottom: .4rem; }
.e404-strade a { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; transition: border-color .2s, color .2s; }
.e404-strade a:hover { border-color: var(--green-600); color: var(--green-700, #2f5a2b); }
.e404 { padding-top: calc(var(--header-h) + clamp(3rem, 7vw, 5rem)); }

/* finestra dei clienti: titolo e tasto chiudi allineati, chiudi rotondo */
.client-dialog-head { gap: 1rem; align-items: center; padding-right: 1.2rem; }
.client-dialog-head h3 { line-height: 1.15; }
.client-close { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
                background: var(--green-50); color: var(--ink); cursor: pointer; font-size: 0; transition: background .2s; }
.client-close:hover { background: var(--green-100); }
.client-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (max-width: 600px) { .client-dialog-head { padding: 1.2rem 1rem .4rem 1.3rem; } .client-dialog-head h3 { font-size: 1.4rem; } }
.client-close:focus:not(:focus-visible) { outline: none; } .client-close:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }

/* ============================ area download ============================ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dl-wrap { max-width: 860px; }
.dl-riservata { display: flex; align-items: center; gap: .6rem; }
.dl-riservata svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--green-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl-sezione + .dl-sezione { margin-top: 3rem; }
.dl-sezione h2 { font-size: 1.5rem; margin-bottom: .8rem; }
.dl-desc { margin-bottom: 1rem; }
.dl-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.dl-file { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--white);
           text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.dl-file:hover { border-color: var(--green-600); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dl-ext { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--green-100); color: var(--green-800, #24461f);
          font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.dl-ext-pdf { background: #fde3df; color: #a8281c; }
.dl-ext-doc, .dl-ext-docx, .dl-ext-odt { background: #dde8fb; color: #1f4f9e; }
.dl-ext-xls, .dl-ext-xlsx, .dl-ext-ods, .dl-ext-csv { background: #dcf0df; color: #1d6b33; }
.dl-ext-ppt, .dl-ext-pptx, .dl-ext-odp { background: #fde9d6; color: #a2510f; }
.dl-ext-zip { background: #ece7f6; color: #5a3f99; }
.dl-nome { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.dl-nome strong { font-weight: 600; overflow-wrap: anywhere; }
.dl-nome small { color: var(--ink-mute); font-size: .85rem; }
.dl-ico { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--green-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dl-pw { max-width: 440px; margin: 0 auto; padding: 2rem; border: 1px solid var(--line); border-radius: 20px; background: var(--white); text-align: center; box-shadow: var(--shadow-md); }
.dl-pw h2 { font-size: 1.4rem; margin-bottom: .5rem; }
.dl-pw p { color: var(--ink-soft); margin-bottom: 1.2rem; }
.dl-pw input { width: 100%; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 12px; font: inherit; margin-bottom: 1rem; }
.dl-pw input:focus { outline: 2px solid var(--green-600); outline-offset: 1px; }
.dl-pw .btn { width: 100%; justify-content: center; }
.dl-errore { color: #a8281c !important; font-weight: 600; }
.dl-vuoto { color: var(--ink-mute); text-align: center; padding: 2rem 0; }

/* area download: sfondo tonale, indice delle sezioni a sinistra, documenti a riquadri */
.dl-area { background: var(--green-50); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 7vw, 6rem); }
.dl-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.dl-layout.dl-una { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.dl-indice { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: .9rem; }
.dl-indice nav { display: grid; gap: .2rem; }
.dl-indice nav a { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .8rem; border-radius: 10px;
                   text-decoration: none; color: var(--ink-soft); font-size: .93rem; transition: background .2s, color .2s; }
.dl-indice nav a:hover { background: var(--white); color: var(--ink); }
.dl-indice nav b { font-size: .75rem; font-weight: 600; color: var(--green-600); background: var(--green-100); padding: .1rem .5rem; border-radius: 999px; }
.dl-totale { font-size: .85rem; color: var(--ink-mute); padding: 0 .8rem; }
.dl-aiuto { margin-top: .6rem; padding: 1.2rem; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.dl-aiuto p { font-size: .9rem; color: var(--ink-soft); margin-bottom: .6rem; }
.dl-sezioni { display: grid; gap: 1.6rem; }
.dl-sezione { padding: clamp(1.4rem, 3vw, 2rem); border-radius: 20px; background: var(--white); box-shadow: 0 1px 2px rgba(30,60,30,.05), 0 10px 30px -18px rgba(30,60,30,.25);
              scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.dl-sezione + .dl-sezione { margin-top: 0; }
.dl-sez-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.dl-sez-head h2 { font-size: 1.35rem; margin: 0; }
.dl-sez-head small { color: var(--ink-mute); font-size: .85rem; }
.dl-sez-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--green-100); flex-shrink: 0; }
.dl-sez-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--green-600); stroke-width: 1.7; stroke-linejoin: round; }
.dl-lista { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .8rem; }
.dl-file { height: 100%; background: var(--green-50); border-color: transparent; padding: 1rem; }
.dl-file:hover { background: var(--white); border-color: var(--green-600); }
.dl-ext { width: 48px; height: 56px; border-radius: 6px 14px 6px 6px; }
.dl-scarica { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); flex-shrink: 0; transition: background .2s; }
.dl-scarica svg { width: 20px; height: 20px; fill: none; stroke: var(--green-600); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.dl-file:hover .dl-scarica { background: var(--green-600); }
.dl-file:hover .dl-scarica svg { stroke: var(--white); }
.dl-vuoto { display: grid; justify-items: center; gap: .8rem; padding: 3rem 1rem; }
.dl-vuoto svg { width: 56px; height: 56px; fill: none; stroke: var(--ink-mute); stroke-width: 1.4; }
.dl-pw-ico { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; background: var(--green-100); }
.dl-pw-ico svg { width: 26px; height: 26px; fill: none; stroke: var(--green-600); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dl-wrap { max-width: none; }
@media (max-width: 900px) {
    .dl-layout { grid-template-columns: 1fr; gap: 1.5rem; }
    .dl-indice { position: static; }
    .dl-indice nav { display: flex; flex-wrap: wrap; gap: .4rem; }
    .dl-indice nav a { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: .45rem .9rem; }
    .dl-aiuto, .dl-totale { display: none; }
}

/* area download: scelta della vista (griglia / lista) */
.dl-sezioni { position: relative; }
.dl-vista { justify-self: end; display: inline-flex; padding: 3px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
.dl-vista button { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border: 0; border-radius: 999px; background: transparent;
                   font: inherit; font-size: .85rem; font-weight: 500; color: var(--ink-soft); cursor: pointer; transition: background .2s, color .2s; }
.dl-vista button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dl-vista button[aria-pressed="true"] { background: var(--green-600); color: var(--white); }
.dl-ext-img { overflow: hidden; padding: 0; background: var(--green-100); }
.dl-ext-img img { width: 100%; height: 100%; object-fit: cover; }

/* griglia: tessere piccole, in verticale */
[data-dl-vista="griglia"] .dl-lista { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: .7rem; }
[data-dl-vista="griglia"] .dl-file { position: relative; flex-direction: column; align-items: flex-start; gap: .7rem; padding: .9rem; }
[data-dl-vista="griglia"] .dl-ext { width: 44px; height: 52px; font-size: .66rem; }
[data-dl-vista="griglia"] .dl-ext-img { width: 100%; height: 96px; border-radius: 10px; }
[data-dl-vista="griglia"] .dl-nome strong { font-size: .92rem; line-height: 1.3; padding-right: 1.6rem; }
[data-dl-vista="griglia"] .dl-nome small { font-size: .78rem; }
[data-dl-vista="griglia"] .dl-scarica { position: absolute; top: .7rem; right: .7rem; width: 32px; height: 32px; }
[data-dl-vista="griglia"] .dl-scarica svg { width: 16px; height: 16px; }
[data-dl-vista="griglia"] .dl-ext-img + .dl-nome strong { padding-right: 0; }

/* lista: righe compatte una sotto l'altra */
[data-dl-vista="lista"] .dl-lista { grid-template-columns: 1fr; gap: 0; }
[data-dl-vista="lista"] .dl-lista li + li .dl-file { border-top-color: var(--line); }
[data-dl-vista="lista"] .dl-file { border-radius: 0; background: transparent; border: 0; border-top: 1px solid transparent; padding: .6rem .3rem; gap: .9rem; box-shadow: none; transform: none; }
[data-dl-vista="lista"] .dl-file:hover { background: var(--green-50); border-color: transparent; box-shadow: none; }
[data-dl-vista="lista"] .dl-ext { width: 38px; height: 44px; font-size: .6rem; }
[data-dl-vista="lista"] .dl-nome { display: flex; align-items: baseline; gap: 1rem; }
[data-dl-vista="lista"] .dl-nome strong { flex: 1; font-size: .95rem; }
[data-dl-vista="lista"] .dl-nome small { white-space: nowrap; }
[data-dl-vista="lista"] .dl-scarica { width: 34px; height: 34px; background: var(--green-50); }
@media (max-width: 600px) { [data-dl-vista="lista"] .dl-nome { display: grid; gap: .1rem; } }
/* griglia: tutte le tessere con la stessa area di anteprima (foto vera per le immagini, sigla grande per gli altri file) */
[data-dl-vista="griglia"] .dl-ext { width: 100%; height: 84px; border-radius: 10px; font-size: .95rem; letter-spacing: .08em; }
[data-dl-vista="griglia"] .dl-nome strong { padding-right: 0; }
[data-dl-vista="griglia"] .dl-scarica { top: 1.2rem; right: 1.2rem; box-shadow: 0 2px 6px rgba(0,0,0,.08); }

/* settori: «Scopri di più» compare al passaggio del mouse, salendo dal fondo della card */
a.sector-card { position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.sector-more { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.1rem; padding: .5rem 1rem .5rem 1.1rem; align-self: flex-start;
               border-radius: 999px; background: var(--green-600); color: var(--white); font-size: .85rem; font-weight: 600; letter-spacing: .01em; }
.sector-more::after { content: none; }
.sector-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.section-dark .sector-more { background: #9fd38f; color: #10240d; }
@media (hover: hover) {
    a.sector-card .sector-more { opacity: 0; transform: translateY(12px); transition: opacity .3s var(--ease), transform .35s var(--ease); }
    a.sector-card:hover, a.sector-card:focus-visible { transform: translateY(-4px); }
    a.sector-card:hover .sector-more, a.sector-card:focus-visible .sector-more { opacity: 1; transform: none; }
    a.sector-card:hover .sector-more svg { transform: translateX(3px); }
    a.sector-card:hover .sector-icon { background: var(--green-600); color: var(--white); }
    .sector-icon { transition: background .3s, color .3s; }
}
@media (hover: none) { .sector-more { background: transparent; color: var(--green-600); padding: 0; } .section-dark .sector-more { background: transparent; color: #9fd38f; } }

/* passaggio da una pagina all'altra: la pagina che si lascia sfuma sotto un velo chiaro con la rotellina,
   si cambia pagina solo quando il velo è comparso del tutto (tempo minimo), e la nuova parte dallo stesso
   velo, lo tiene un istante e lo sfuma via: nessun salto tra le due */
.velo { position: fixed; inset: 0; z-index: 9998; display: grid; place-items: center; pointer-events: none;
        background: var(--paper); opacity: 0; transition: opacity .3s ease-out; will-change: opacity; }
html.uscita .velo { opacity: .86; pointer-events: auto; }
.velo-spin, html.arrivo body::after { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(58, 105, 53, .18); border-top-color: var(--green-600); box-sizing: border-box; }
.velo-spin { opacity: 0; transform: scale(.8); transition: opacity .25s ease .08s, transform .3s ease .08s; }
html.uscita .velo-spin { opacity: 1; transform: none; animation: velo-gira .8s linear infinite; }
@keyframes velo-gira { to { transform: rotate(360deg); } }
html.arrivo body::before { content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none; background: var(--paper);
        opacity: .86; animation: velo-via .5s cubic-bezier(.4, 0, .2, 1) .18s both; will-change: opacity; }
html.arrivo body::after { content: ""; position: fixed; left: calc(50% - 17px); top: calc(50% - 17px); z-index: 9999; pointer-events: none;
        animation: velo-gira .8s linear infinite, velo-via-spin .3s ease .12s both; }
@keyframes velo-via { from { opacity: .86; } to { opacity: 0; } }
@keyframes velo-via-spin { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    a.sector-card .sector-more { opacity: 1; transform: none; }
    .velo, .velo-spin { transition: none; }
    html.arrivo body::before { animation-duration: .01s; }
}

/* settori, passaggio del mouse: icona e testi svaniscono, al centro compaiono titolo e tasto «Scopri di più» */
.sector-hover { display: none; }
.sector-hover-tit { display: none; }
@media (hover: hover) {
    /* l'icona resta del suo colore: svanisce insieme ai testi, senza colorarsi prima */
    a.sector-card:hover .sector-icon, a.sector-card:focus-visible .sector-icon { background: var(--green-100); stroke: var(--green-600); color: inherit; }
    .section-dark a.sector-card:hover .sector-icon, .section-dark a.sector-card:focus-visible .sector-icon { background: rgba(255,255,255,.08); stroke: #cfe5c8; }
    a.sector-card > .sector-icon, a.sector-card > h3, a.sector-card > p { transition: opacity .22s var(--ease), transform .3s var(--ease); }
    a.sector-card:hover > .sector-icon, a.sector-card:hover > h3, a.sector-card:hover > p,
    a.sector-card:focus-visible > .sector-icon, a.sector-card:focus-visible > h3, a.sector-card:focus-visible > p { opacity: 0; transform: translateY(-10px); }
    .sector-hover { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; padding: 1.5rem; pointer-events: none; }
    /* il tasto sale dal basso, cresce e si accende quando i testi sono già spariti */
    a.sector-card .sector-hover .sector-more { margin: 0; align-self: center; opacity: 0; transform: translateY(18px) scale(.85);
        transition: opacity .25s var(--ease), transform .25s var(--ease); }
    a.sector-card:hover .sector-hover .sector-more, a.sector-card:focus-visible .sector-hover .sector-more { opacity: 1; transform: none;
        transition: opacity .3s var(--ease) .14s, transform .45s cubic-bezier(.34, 1.56, .64, 1) .14s; }
    a.sector-card .sector-hover .sector-more svg { transform: translateX(-4px); transition: transform .35s var(--ease) .3s; }
    a.sector-card:hover .sector-hover .sector-more svg { transform: translateX(3px); }
    a.sector-card:hover { background: rgba(58, 105, 53, .35); }
    .section-light a.sector-card:hover, a.sector-card.is-light:hover { background: var(--green-50); }
}

/* immagini dentro il testo di news e pagine */
.prose .prose-foto { margin: 2rem 0; display: flex; gap: 1rem; justify-content: center; align-items: center; }
.prose .prose-foto figure { margin: 0; flex: 1 1 0; min-width: 0; }
.prose .prose-foto img { display: block; width: auto; max-width: 100%; height: auto; max-height: 560px; margin-inline: auto; border-radius: var(--radius-sm, 10px); }
.prose .prose-foto:first-child { margin-top: 0; }
.prose .prose-foto img[src$=".png"] { border-radius: 0; }
@media (max-width: 640px) { .prose .prose-foto.is-multi { flex-direction: column; } }
.prose h3 { margin: 1.8rem 0 .45rem; font-size: 1.12rem; }
.prose h2 + h3 { margin-top: .8rem; }
