/*
Theme Name: La Viticola 4
Theme URI: https://www.laviticola.it
Author: La Viticola
Description: Tema per La Viticola, spin-off CREA per la ricerca e la sperimentazione in viticoltura. Palette e tipografia (STIX Two Text) dal manuale di brand identity. Pagine Home, Chi siamo, Cosa facciamo (con cinque aree di attività), Progetti, Contatti, tipo di contenuto "Progetti" e block pattern dedicati. Si installa accanto al tema "La Viticola" 3.x e ne riprende impostazioni e contenuti.
Version: 4.1.1
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: la-viticola
*/

/* ==========================================================================
   Font – STIX Two Text (self-hosted, subset latin)
   ========================================================================== */
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/stix-two-text-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/stix-two-text-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/stix-two-text-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/stix-two-text-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "STIX Two Text"; font-style: italic; font-weight: 400; font-display: swap; src: url("assets/fonts/stix-two-text-latin-400-italic.woff2") format("woff2"); }

/* ==========================================================================
   Token
   ========================================================================== */
:root {
	/* Colori: verde e mosto dal manuale; gli altri derivati. */
	--verde: #246c2f;
	--bosco: #163f1d;
	--mosto: #332821;
	--mosto-2: #2a201a;
	--foglia: #e9eee5;
	--paglia: #cfc08e;
	--bianco: #ffffff;
	--testo: #332821;
	--testo-2: #5e534a;
	--linea: rgba(51, 40, 33, .16);
	--linea-chiara: rgba(255, 255, 255, .24);

	/* Tipografia: scala modulare 1.25 su base 19px */
	--font: "STIX Two Text", "Iowan Old Style", Georgia, serif;
	--t-sm: 0.875rem;
	--t-base: 1.1875rem;
	--t-md: 1.4375rem;
	--t-lg: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
	--t-xl: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
	--t-hero: clamp(2.6rem, 1rem + 6.4vw, 7.25rem);

	/* Spazi */
	--g: clamp(20px, 5vw, 72px);
	--max: 1320px;
	--text: 64ch;
	--sec: clamp(56px, 6.5vw, 104px);
	--header-h: 96px;
	--pad-x: max(var(--g), (100% - var(--max)) / 2);
	--ease: cubic-bezier(.2, .7, .1, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	margin: 0;
	background: var(--bianco);
	color: var(--testo);
	font: 400 var(--t-base)/1.72 var(--font);
	font-variant-numeric: oldstyle-nums proportional-nums;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
img, svg, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--verde); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--bosco); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h2 { font-size: var(--t-xl); letter-spacing: -.012em; }
h3 { font-size: var(--t-md); line-height: 1.25; }
p { margin: 0 0 1.1em; }
strong { font-weight: 600; }
::selection { background: var(--paglia); color: var(--mosto); }

.wrap { padding-inline: var(--pad-x); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 300; background: var(--mosto); color: #fff; padding: .6em 1em; }
.skip-link:focus { left: 10px; }

/* Freccia */
.lv-arrow { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }

/* Bottoni */
.btn, .wp-block-button__link {
	display: inline-flex; align-items: center; gap: .6em;
	padding: .95em 1.7em;
	font: 500 1.0625rem/1 var(--font);
	text-decoration: none; cursor: pointer;
	color: #fff; background: var(--verde);
	border: 1px solid var(--verde); border-radius: 999px;
	transition: background .25s, color .25s, border-color .25s;
}
.btn:hover, .wp-block-button__link:hover { background: var(--bosco); border-color: var(--bosco); color: #fff; }
.btn:hover .lv-arrow { transform: translateX(3px); }
.btn--light { background: #fff; color: var(--mosto); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; border-color: #fff; }
.btn--outline { background: transparent; color: var(--verde); }
.btn--outline:hover { background: var(--verde); color: #fff; border-color: var(--verde); }

/* Foglia del logo, tracciata */
.lv-leaf { fill: none; stroke: currentColor; stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lv-leaf path { vector-effect: non-scaling-stroke; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .97); transition: background .3s, box-shadow .3s, color .3s; color: var(--mosto); }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--linea); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); padding-inline: var(--pad-x); }
.site-header__brand { display: grid; line-height: 0; }
.site-header__brand > * { grid-area: 1 / 1; }
.site-logo { height: 66px; width: auto; transition: opacity .3s, height .3s; }
.site-logo--light { opacity: 0; }
.site-header.is-scrolled .site-logo { height: 54px; }

.site-nav__list { display: flex; gap: clamp(1.4rem, 3vw, 2.8rem); list-style: none; margin: 0; padding: 0; }
.site-nav a { position: relative; display: block; padding: .5em 0; color: inherit; text-decoration: none; font-size: 1.125rem; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .2em; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-nav a:hover::after, .site-nav .current-menu-item > a::after, .site-nav .current_page_item > a::after { transform: scaleX(1); }

/* Header sopra la foto */
.has-overlay-header .site-header { position: fixed; inset: 0 0 auto; background: transparent; color: #fff; }
.has-overlay-header .site-header .site-logo--dark { opacity: 0; }
.has-overlay-header .site-header .site-logo--light { opacity: 1; }
.has-overlay-header .site-header.is-scrolled { background: rgba(255, 255, 255, .97); color: var(--mosto); }
.has-overlay-header .site-header.is-scrolled .site-logo--dark { opacity: 1; }
.has-overlay-header .site-header.is-scrolled .site-logo--light { opacity: 0; }
.admin-bar.has-overlay-header .site-header { top: 32px; }

.nav-toggle { display: none; align-items: center; gap: .7em; background: none; border: 0; padding: 10px 0; color: inherit; font: 500 1.0625rem var(--font); cursor: pointer; }
.nav-toggle__bar { position: relative; width: 22px; height: 1px; background: currentColor; transition: background .2s; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; width: 22px; height: 1px; background: currentColor; transition: transform .3s var(--ease); }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
	:root { --header-h: 76px; }
	.site-logo { height: 52px; }
	.site-header.is-scrolled .site-logo { height: 46px; }
	.nav-toggle { display: inline-flex; position: relative; z-index: 2; }
	.site-nav { position: fixed; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: var(--g); padding-bottom: 18vh; background: var(--bosco); color: #fff; visibility: hidden; opacity: 0; transition: opacity .3s, visibility 0s .3s; }
	.nav-open .site-nav { visibility: visible; opacity: 1; transition: opacity .3s; }
	.site-nav__list { flex-direction: column; gap: .2em; }
	.site-nav a { font-size: clamp(2.2rem, 10vw, 3.4rem); line-height: 1.15; }
	.nav-open .site-header { color: #fff; background: transparent; box-shadow: none; }
	.nav-open .site-header .site-logo--dark { opacity: 0; }
	.nav-open .site-header .site-logo--light { opacity: 1; }
	.nav-open { overflow: hidden; }
	.admin-bar.has-overlay-header .site-header { top: 46px; }
}

/* ==========================================================================
   Hero – il momento forte della pagina
   ========================================================================== */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	min-height: max(640px, 100svh);
	display: flex; align-items: flex-end;
	color: #fff; background: var(--bosco);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(180deg, rgba(22, 63, 29, .55) 0%, rgba(22, 63, 29, 0) 26%),
		linear-gradient(12deg, rgba(42, 32, 26, .9) 0%, rgba(42, 32, 26, .55) 38%, rgba(42, 32, 26, 0) 70%);
}
.hero__leaf {
	position: absolute; z-index: -1;
	right: calc(var(--pad-x) - 2vw); top: 14%;
	width: min(48vw, 640px); height: auto;
	color: rgba(255, 255, 255, .7);
}
.hero__inner { width: 100%; padding-top: calc(var(--header-h) + 8vh); padding-bottom: clamp(48px, 8vh, 96px); }
.hero__claim { font-size: var(--t-hero); font-weight: 400; line-height: 1.02; letter-spacing: -.022em; margin: 0 0 .55em; text-wrap: initial; }
.hero__line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__line > span { display: block; }
.hero__line--offset { padding-left: min(1.6em, 12vw); }
.hero__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; padding-top: 28px; border-top: 1px solid var(--linea-chiara); }
.hero__payoff { margin: 0; font-size: var(--t-md); font-style: italic; color: var(--paglia); flex: 1 1 auto; }

@media (max-width: 700px) {
	.hero__leaf { width: 78vw; top: 12%; right: -14vw; color: rgba(255, 255, 255, .45); }
	.hero__line--offset { padding-left: 0; }
	.hero::before { background: linear-gradient(0deg, rgba(42, 32, 26, .92) 0%, rgba(42, 32, 26, .55) 50%, rgba(22, 63, 29, .35) 100%); }
}

/* Sequenza d'apertura: la foto si assesta, il claim sale riga per riga,
   la foglia si disegna. Unico movimento automatico del sito. */
@media (prefers-reduced-motion: no-preference) {
	.hero__bg { animation: lv-settle 2.6s var(--ease) both; }
	.hero__line > span { animation: lv-rise 1.1s var(--ease) both; }
	.hero__line:nth-child(1) > span { animation-delay: .25s; }
	.hero__line:nth-child(2) > span { animation-delay: .42s; }
	.hero__leaf path { stroke-dasharray: 1; animation: lv-draw 3.2s .5s cubic-bezier(.45, 0, .2, 1) both; }
	.hero__foot { animation: lv-fade 1s 1.1s var(--ease) both; }
}
@keyframes lv-settle { from { transform: scale(1.08); } to { transform: none; } }
@keyframes lv-rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes lv-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lv-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Flusso dei contenuti (editor a blocchi)
   I blocchi semplici stanno in colonna di lettura; le sezioni .lv-* e .lv-band
   occupano tutta la larghezza.
   ========================================================================== */
.lv-flow { padding-block: var(--sec); }
.lv-flow:has(> :first-child:is(.lv-intro, .lv-band, .lv-services, .lv-split, .lv-audience, .lv-duo)) { padding-top: 0; }
.lv-flow:has(> :last-child:is(.lv-intro, .lv-band, .lv-services, .lv-split, .lv-audience, .lv-duo)) { padding-bottom: 0; }
.lv-flow > * { margin-inline: var(--pad-x); max-width: var(--text); }
.lv-flow > :is(.lv-intro, .lv-band, .lv-services, .lv-split, .lv-audience, .lv-duo, .alignfull) { margin-inline: 0; max-width: none; }
.lv-flow > .alignwide { max-width: none; }
.lv-flow > h2 { margin-top: 1.6em; }
.lv-flow ul, .lv-flow ol { padding-left: 1.2em; }
.lv-flow li { margin-bottom: .5em; }
.lv-flow li::marker { color: var(--verde); }
.lv-flow figure { margin: 2em 0; }
.lv-flow > .wp-block-image img { border-radius: 2px; }
/* I temi classici racchiudono i gruppi in un contenitore interno: lo rendiamo trasparente al layout. */
.lv-flow .wp-block-group__inner-container { display: contents; }

/* Frase di apertura (statement) */
.lv-statement {
	font-size: var(--t-lg); line-height: 1.28; letter-spacing: -.008em;
	color: var(--bosco); max-width: 30ch;
}
.lv-flow > .lv-statement { max-width: 34ch; padding-block: var(--sec) calc(var(--sec) * .6); margin-bottom: 0; }
.lv-large { font-size: var(--t-lg); line-height: 1.32; max-width: 36ch; color: var(--bosco); }
.lv-band--green .lv-large { color: #fff; }
.lv-note { font-style: italic; color: var(--testo-2); font-size: 1.0625rem; }
.lv-more a { display: inline-flex; gap: .4em; font-weight: 500; }

/* Intro a due colonne */
.lv-intro { padding: var(--sec) var(--pad-x); }
.lv-intro .wp-block-columns { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 8vw, 140px); align-items: start; margin: 0; }
.lv-intro .lv-statement { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; }
.lv-intro p:not(.lv-statement) { max-width: 58ch; }
.lv-intro .lv-more { margin-top: 2em; }

/* Cosa facciamo – campitura verde piena */
.lv-services { padding: var(--sec) var(--pad-x); background: var(--verde); color: #fff; }
.lv-services > h2 { max-width: 14ch; margin-bottom: clamp(40px, 6vw, 88px); }
.lv-services__grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 112px); }
.lv-service { position: relative; padding: 36px 0 28px 64px; border-top: 1px solid var(--linea-chiara); }
.lv-service h3 { font-size: var(--t-md); margin-bottom: .45em; max-width: 22ch; }
.lv-service p { color: rgba(255, 255, 255, .82); max-width: 42ch; margin: 0; }
.lv-service::before {
	content: ""; position: absolute; left: 0; top: 40px; width: 36px; height: 36px; background: var(--paglia);
	-webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.lv-service:nth-child(1) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='1'/%3E%3Cpath d='M3 9h18M3 15h18M9 3v18M15 3v18'/%3E%3Ccircle cx='12' cy='12' r='1.4' fill='black'/%3E%3C/svg%3E"); }
.lv-service:nth-child(2) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20c0-9 6.5-15.5 16-16 0 9.5-6.5 16-16 16z'/%3E%3Cpath d='M4 20 13 11M9 15h4M11 13V9'/%3E%3C/svg%3E"); }
.lv-service:nth-child(3) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='15' r='2'/%3E%3Cpath d='M12 17v5M8.5 11.5a5 5 0 0 1 7 0M5.5 8.5a9.2 9.2 0 0 1 13 0M2.5 5.5a13.4 13.4 0 0 1 19 0'/%3E%3C/svg%3E"); }
.lv-service:nth-child(4) { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6M10 3v6l-5.4 9.6A1.6 1.6 0 0 0 6 21h12a1.6 1.6 0 0 0 1.4-2.4L14 9V3'/%3E%3Cpath d='m9 15.5 2 2 4-4.5'/%3E%3C/svg%3E"); }

/* Foto + testo */
.lv-split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--foglia); }
.lv-split .wp-block-image { position: relative; margin: 0; min-height: 560px; }
.lv-split .wp-block-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-split__text { align-self: center; padding: var(--sec) var(--g); padding-right: max(var(--g), (100vw - var(--max)) / 2); }
.lv-split__text h2 { max-width: 15ch; color: var(--bosco); }
.lv-split__text .lv-large { max-width: 26ch; }
.lv-band--green .lv-large { max-width: 40ch; }
.lv-method .lv-large { font-size: var(--t-md); line-height: 1.45; }
.lv-split__text p { max-width: 46ch; }
.lv-split__text .lv-note { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--linea); }

/* Lavoriamo con */
.lv-audience { padding: var(--sec) var(--pad-x); }
.lv-audience__label { font-style: italic; color: var(--verde); font-size: var(--t-md); margin-bottom: .4em; }
.lv-audience__list { font-size: var(--t-xl); line-height: 1.14; letter-spacing: -.014em; max-width: 24ch; margin: 0; color: var(--mosto); }

/* Fasce generiche (Chi siamo e pattern) */
.lv-band { padding: var(--sec) var(--pad-x); }
.lv-band > * { max-width: 72ch; }
.lv-band > h2 { max-width: 18ch; }
.lv-band--leaf { background: var(--foglia); }
.lv-band--green { background: var(--verde); color: #fff; }
.lv-band--green a { color: #fff; }

/* Domande */
.lv-questions { list-style: none; padding: 0 !important; margin: clamp(32px, 5vw, 64px) 0 0; max-width: none !important; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 112px); }
.lv-questions li { position: relative; margin: 0; padding: 28px 0 32px 2.4em; border-top: 1px solid var(--linea); font-size: var(--t-md); line-height: 1.35; color: var(--bosco); }
.lv-questions li::before { content: "?"; position: absolute; left: 0; top: 22px; font-size: 1.6em; line-height: 1; font-style: italic; color: var(--verde); }

/* Metodo: è una sequenza, quindi numerata */
.lv-method { display: grid !important; grid-template-columns: 6fr 5fr; gap: clamp(32px, 7vw, 120px); align-items: center; margin: 0; }
.lv-band:has(.lv-method) > * { max-width: none; }
.lv-steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 2em 0 0; }
.lv-steps li { counter-increment: step; position: relative; padding: 18px 0 18px 2.6em; margin: 0; border-top: 1px solid var(--linea); }
.lv-steps li::before { content: counter(step); position: absolute; left: 0; top: 14px; font-size: var(--t-md); line-height: 1.2; color: var(--verde); font-variant-numeric: lining-nums; }
.lv-steps strong { color: var(--bosco); }
.lv-photo { margin: 0 !important; }
.lv-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

@media (max-width: 900px) {
	.lv-intro .wp-block-columns, .lv-services__grid, .lv-split, .lv-questions, .lv-method { grid-template-columns: 1fr; }
	.lv-intro .lv-statement { position: static; }
	.lv-split .wp-block-image { min-height: 0; aspect-ratio: 4 / 3; }
	.lv-split__text { padding: var(--sec) var(--g); }
	.lv-service { padding-left: 56px; }
}

/* ==========================================================================
   Progetti in home – solo i loghi, su fondo mosto
   ========================================================================== */
.projects-band { padding-block: var(--sec); background: var(--mosto); color: #fff; }
.projects-band__title { margin-bottom: clamp(32px, 5vw, 64px); }
.project-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.project-logos a { display: flex; align-items: center; justify-content: center; height: clamp(200px, 22vw, 300px); padding: clamp(28px, 4vw, 56px); background: #fff; color: var(--mosto); text-decoration: none; outline-offset: 6px; transition: box-shadow .3s; }
.project-logos a:hover, .project-logos a:focus-visible { box-shadow: inset 0 -4px 0 var(--paglia); color: var(--mosto); }
.project-logos img { max-width: 78%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.project-logos__name { font-size: var(--t-xl); line-height: 1.05; letter-spacing: -.015em; text-align: center; }

/* ==========================================================================
   Testata pagine interne
   ========================================================================== */
.page-head { position: relative; isolation: isolate; background: var(--foglia); }
.page-head__inner { padding-top: clamp(64px, 9vw, 140px); padding-bottom: clamp(40px, 6vw, 88px); }
.page-head__title { font-size: var(--t-hero); font-weight: 400; line-height: 1; letter-spacing: -.022em; margin: 0; color: var(--bosco); }
.page-head__intro { max-width: 52ch; margin-top: 1.4em; font-size: var(--t-md); line-height: 1.5; }
.page-head__intro p:last-child { margin: 0; }
.page-head--photo { min-height: min(78svh, 760px); display: flex; align-items: flex-end; color: #fff; background: var(--bosco); overflow: hidden; }
.page-head--photo .page-head__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-head--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 63, 29, .5) 0%, rgba(22, 63, 29, 0) 30%), linear-gradient(10deg, rgba(42, 32, 26, .88) 0%, rgba(42, 32, 26, .35) 55%, rgba(42, 32, 26, .05) 100%); }
.page-head--photo .page-head__title { color: #fff; }
.page-head--photo .page-head__inner { width: 100%; padding-top: calc(var(--header-h) + 80px); }

/* ==========================================================================
   Pagina Progetti
   ========================================================================== */
.project { padding-block: var(--sec); }
.project:nth-child(even) { background: var(--foglia); }
.project__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 8vw, 140px); align-items: start; }
.project__aside { position: sticky; top: calc(var(--header-h) + 32px); }
.project__aside:has(.project__title.screen-reader-text) .project__logo { margin-bottom: 0; }
.project__logo { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; max-width: 380px; padding: 28px; margin-bottom: 32px; background: #fff; border: 1px solid var(--linea); }
.project__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.project__title { font-size: var(--t-xl); line-height: 1.04; letter-spacing: -.015em; color: var(--bosco); margin: 0; }
.project__fields { margin: 0; }
.project__fields > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 1em; padding: 1.1em 0; border-top: 1px solid var(--linea); }
.project__fields > div:last-child { border-bottom: 1px solid var(--linea); }
.project__fields dt { font-style: italic; color: var(--testo-2); padding-top: .15em; }
.project__fields dd { margin: 0; }
.project__fields dd p { max-width: 58ch; }
.project__fields dd p:last-child { margin-bottom: 0; }
.project__role dd { font-size: var(--t-md); line-height: 1.35; color: var(--bosco); }
.project__link a { display: inline-flex; align-items: center; gap: .4em; word-break: break-all; }
.project__soon { font-style: italic; color: var(--verde); }
@media (max-width: 600px) { .project__fields > div { grid-template-columns: 1fr; gap: .2em; } }
.project__video { grid-column: 1 / -1; margin-top: clamp(16px, 3vw, 40px); }
.project__video iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.project-list--single .project { padding-top: calc(var(--sec) + var(--header-h)); }
@media (max-width: 860px) { .project__grid { grid-template-columns: 1fr; } .project__aside { position: static; } }

/* ==========================================================================
   Contatti
   ========================================================================== */
.contact__intro { position: relative; overflow: hidden; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; justify-content: center; padding: clamp(56px, 8vw, 120px) var(--pad-x); background: var(--mosto); color: #fff; }
.contact__title { font-size: var(--t-hero); font-weight: 400; line-height: 1; letter-spacing: -.022em; margin: 0 0 .6em; position: relative; z-index: 1; }
.contact__cols { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 8vw, 140px); align-items: end; position: relative; z-index: 1; }
.contact__text .lv-statement { color: #fff; font-size: var(--t-lg); line-height: 1.3; max-width: 30ch; }
.contact__text p { color: rgba(255, 255, 255, .8); max-width: 50ch; }
.contact__text p:last-child { margin-bottom: 0; }
.contact__data { display: grid; gap: .5em; font-style: normal; padding-top: 1.4em; border-top: 1px solid var(--linea-chiara); color: rgba(255, 255, 255, .8); }
.contact__email { font-size: var(--t-lg); line-height: 1.2; color: #fff; text-decoration-color: rgba(255, 255, 255, .4); margin-bottom: .3em; }
.contact__email:hover { color: var(--paglia); }
.contact__name { color: #fff; }
.contact__leaf { position: absolute; right: -6%; top: -8%; width: min(54vw, 720px); color: rgba(207, 192, 142, .2); pointer-events: none; }
.contact__form { padding: var(--sec) var(--pad-x); }
.contact__fields { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: clamp(24px, 4vw, 56px); }
.field--wide { grid-column: 1 / -1; }
.field { position: relative; margin-bottom: 1.4em; }
.field input, .field textarea { width: 100%; padding: 1.4em 0 .5em; font: inherit; color: var(--testo); background: transparent; border: 0; border-bottom: 1px solid #a99c90; border-radius: 0; resize: vertical; }
.field textarea { min-height: 7em; }
.field input:focus, .field textarea:focus { outline: none; border-bottom: 2px solid var(--verde); }
.field label { position: absolute; left: 0; top: 1.3em; color: var(--testo-2); pointer-events: none; transform-origin: left top; transition: transform .25s var(--ease), color .25s; }
.field :is(input, textarea):is(:focus, :not(:placeholder-shown)) + label { transform: translateY(-1.25em) scale(.78); color: var(--verde); }
.check { display: flex; gap: .8em; align-items: flex-start; margin: 1.4em 0 1.8em; font-size: 1rem; color: var(--testo-2); }
.check input { width: 1.15em; height: 1.15em; margin-top: .3em; flex: none; accent-color: var(--verde); }
.hp { position: absolute !important; left: -9999px; height: 0; overflow: hidden; }
.notice { padding: 1em 1.2em; margin-bottom: 1.6em; font-size: 1.0625rem; border-left: 3px solid; }
.notice--ok { background: var(--foglia); border-color: var(--verde); color: var(--bosco); }
.notice--err { background: #fbecea; border-color: #a3261b; color: #6e1a12; }
@media (max-width: 900px) {
	.contact__cols, .contact__fields { grid-template-columns: 1fr; }
	.contact__intro { min-height: 0; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--mosto-2); color: rgba(255, 255, 255, .78); font-size: 1.0625rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--paglia); }
.site-footer__grid { display: grid; grid-template-columns: 4fr 5fr 2fr; gap: 40px clamp(32px, 6vw, 96px); padding-block: clamp(64px, 8vw, 112px); align-items: start; }
.site-logo--footer { height: 104px; margin-bottom: 1.2em; }
.site-footer__brand p { margin: 0; font-style: italic; color: var(--paglia); }
.site-footer__contact { display: grid; gap: .6em; font-style: normal; }
.site-footer__email { font-size: var(--t-lg); line-height: 1.2; letter-spacing: -.01em; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9375rem; color: rgba(255, 255, 255, .55); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   404 e varie
   ========================================================================== */
.notfound { position: relative; overflow: hidden; min-height: 70svh; display: flex; align-items: center; padding-block: var(--sec); }
.notfound h1 { font-size: var(--t-hero); font-weight: 400; line-height: 1; color: var(--bosco); max-width: 12ch; }
.notfound__leaf { position: absolute; right: -6%; top: 10%; width: min(50vw, 560px); color: var(--foglia); }
.post-item { padding-block: 1.4em; border-bottom: 1px solid var(--linea); }
.post-item h2 { font-size: var(--t-lg); margin-bottom: .3em; }
.post-item a { color: var(--bosco); text-decoration: none; }
figcaption, .wp-element-caption { font-size: .95rem; color: var(--testo-2); font-style: italic; }
.has-verde-color { color: var(--verde); } .has-verde-background-color { background-color: var(--verde); }
.has-bosco-color { color: var(--bosco); } .has-bosco-background-color { background-color: var(--bosco); }
.has-mosto-color { color: var(--mosto); } .has-mosto-background-color { background-color: var(--mosto); }
.has-foglia-color { color: var(--foglia); } .has-foglia-background-color { background-color: var(--foglia); }
.has-paglia-color { color: var(--paglia); } .has-paglia-background-color { background-color: var(--paglia); }
.has-bianco-color { color: #fff; } .has-bianco-background-color { background-color: #fff; }

@media print {
	.site-header, .hero__leaf, .contact__form { display: none; }
	.hero, .page-head--photo { min-height: 0; color: var(--mosto); }
	.hero__bg, .page-head__bg, .hero::before, .page-head--photo::before { display: none; }
}

/* ==========================================================================
   Video caricato al clic
   ========================================================================== */
.video-facade { position: relative; overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; background: var(--bosco); color: #fff; }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade__leaf { position: absolute; right: -4%; top: -10%; width: 48%; color: rgba(207, 192, 142, .25); pointer-events: none; }
.video-facade__inner { position: relative; display: grid; justify-items: center; gap: 1.2em; padding: 24px; text-align: center; max-width: 60ch; }
.video-facade__play { display: inline-flex; align-items: center; gap: .7em; padding: .9em 1.6em .9em 1.2em; font: 500 1.125rem/1 var(--font); color: var(--mosto); background: #fff; border: 0; border-radius: 999px; cursor: pointer; transition: background .25s; }
.video-facade__play:hover { background: var(--paglia); }
.video-facade__play svg { width: 1.5em; height: 1.5em; fill: var(--verde); }
.video-facade__note { margin: 0; font-size: .9375rem; line-height: 1.5; color: rgba(255, 255, 255, .78); }
.video-facade__note a, .video-facade noscript a { color: #fff; }
@media (max-width: 600px) { .video-facade { aspect-ratio: auto; min-height: 280px; } }

/* Segnaposto da completare nelle bozze */
.lv-flow mark { background: #fff1b8; color: var(--mosto); padding: 0 .2em; }

/* ==========================================================================
   Home – box verde con illustrazione a destra
   ========================================================================== */
.home .lv-flow > .lv-band--green { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(32px, 6vw, 112px); }
.home .lv-flow > .lv-band--green::after { content: ""; width: clamp(200px, 26vw, 360px); aspect-ratio: 320 / 260; background: url("assets/img/icona-sensore.svg") center / contain no-repeat; }
@media (max-width: 700px) {
	.home .lv-flow > .lv-band--green { grid-template-columns: 1fr; }
	.home .lv-flow > .lv-band--green::after { width: min(240px, 70vw); margin-top: 28px; }
}

/* ==========================================================================
   Video dei progetti
   ========================================================================== */
.project__video { grid-column: 1 / -1; margin-top: clamp(16px, 3vw, 40px); }
.project__videos { margin-top: clamp(32px, 4vw, 56px); }
.project__videos { display: grid; gap: clamp(16px, 2.5vw, 32px); }
.project__videos--multi { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.video-file { margin: 0; }
.video-file video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--mosto); display: block; }

/* ==========================================================================
   Avviso cookie
   ========================================================================== */
.cookie-banner {
	position: fixed; z-index: 150; right: var(--g); bottom: var(--g);
	display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap;
	max-width: min(560px, calc(100vw - 2 * var(--g)));
	padding: 20px 24px; background: var(--mosto); color: rgba(255, 255, 255, .88);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
	opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s var(--ease);
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner[hidden] { display: none; }
.cookie-banner__text { flex: 1 1 260px; margin: 0; font-size: 1rem; line-height: 1.5; }
.cookie-banner__text a { color: #fff; }
.cookie-banner .btn { padding: .75em 1.4em; font-size: 1rem; }
@media (max-width: 600px) {
	.cookie-banner { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 12px 14px; gap: 12px; flex-wrap: nowrap; }
	.cookie-banner__text { flex: 1 1 auto; font-size: .8125rem; line-height: 1.4; }
	.cookie-banner .btn { flex: none; padding: .65em 1em; font-size: .875rem; }
}
@media print { .cookie-banner { display: none !important; } }

/* ==========================================================================
   Pagina Progetti – indice
   ========================================================================== */
.project-index { padding-block: var(--sec); }
.project-index__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(20px, 3vw, 40px); }
.project-card__link { display: grid; grid-template-rows: auto 1fr; height: 100%; color: var(--testo); text-decoration: none; background: #fff; border: 1px solid var(--linea); transition: border-color .25s, box-shadow .25s; }
.project-card__link:hover, .project-card__link:focus-visible { border-color: var(--verde); box-shadow: 0 18px 40px -28px rgba(51, 40, 33, .55); color: var(--testo); }
.project-card__logo { display: flex; align-items: center; justify-content: center; height: clamp(180px, 20vw, 260px); padding: clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--linea); }
.project-card__logo img { max-width: 78%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.project-card__body { display: flex; flex-direction: column; gap: 1em; padding: clamp(20px, 3vw, 32px); }
.project-card__title { font-size: var(--t-lg); color: var(--bosco); margin: 0; }
.project-card__role { display: block; font-size: var(--t-md); line-height: 1.4; color: var(--bosco); }
.project-card__label { display: block; font-size: var(--t-sm); font-style: italic; color: var(--testo-2); margin-bottom: .2em; }
.project-card__more { display: inline-flex; align-items: center; gap: .4em; margin-top: auto; color: var(--verde); font-weight: 500; }
.project-card__link:hover .lv-arrow { transform: translateX(4px); }

/* ==========================================================================
   Pagina del singolo progetto
   ========================================================================== */
.project-head { background: var(--foglia); padding-block: clamp(40px, 5vw, 72px) var(--sec); }
.project-head__back { display: inline-flex; align-items: center; gap: .5em; margin-bottom: clamp(28px, 4vw, 48px); color: var(--verde); text-decoration: none; font-size: 1.0625rem; }
.project-head__back .lv-arrow { transform: rotate(180deg); }
.project-head__back:hover .lv-arrow { transform: rotate(180deg) translateX(4px); }
.project-head__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 7vw, 120px); align-items: start; }
.project-head__logo { max-width: 460px; margin-bottom: 24px; }
.project-head__title { font-size: var(--t-hero); font-weight: 400; line-height: 1; letter-spacing: -.022em; color: var(--bosco); margin: 0; }
.project-head .project__fields > div { border-color: var(--linea); }
.project-media { padding-block: var(--sec); }
.project-media .project__videos { margin-top: 0; }
@media (max-width: 860px) { .project-head__grid { grid-template-columns: 1fr; } }

.projects-band--others .project-logos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* Sfondo del riquadro logo dei progetti (campo "Sfondo del logo") */
.lv-logo-bg--foglia { background-color: var(--foglia) !important; border-color: var(--foglia) !important; }
.lv-logo-bg--verde { background-color: var(--verde) !important; border-color: var(--verde) !important; }
.lv-logo-bg--bosco { background-color: var(--bosco) !important; border-color: var(--bosco) !important; }
.lv-logo-bg--mosto { background-color: var(--mosto) !important; border-color: var(--mosto) !important; }
.projects-band .lv-logo-bg--mosto { box-shadow: inset 0 0 0 1px var(--linea-chiara); }
.project-logos a.lv-logo-bg--verde:hover, .project-logos a.lv-logo-bg--bosco:hover, .project-logos a.lv-logo-bg--mosto:hover { box-shadow: inset 0 -4px 0 var(--paglia); }

/* ==========================================================================
   Header – "spin-off sostenuto dal" + logo CREA, sempre accanto al logo
   (le versioni colore/bianca seguono le stesse regole del logo La Viticola)
   ========================================================================== */
.site-header__brands { position: relative; z-index: 2; display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px); min-width: 0; }
.site-header__crea { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-left: clamp(14px, 1.6vw, 22px); border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 35%, transparent); line-height: 1; }
.site-header__crea-label { font-size: .8125rem; font-style: italic; letter-spacing: .01em; white-space: nowrap; opacity: .85; }
.site-header__crea-logos { display: grid; justify-items: start; }
.site-header__crea-logos > * { grid-area: 1 / 1; }
.crea-logo { height: 48px; width: auto; transition: opacity .3s, height .3s; }
.crea-logo.site-logo--light { opacity: 0; }
.site-header.is-scrolled .crea-logo { height: 40px; }
.has-overlay-header .site-header .crea-logo.site-logo--dark { opacity: 0; }
.has-overlay-header .site-header .crea-logo.site-logo--light { opacity: 1; }
.has-overlay-header .site-header.is-scrolled .crea-logo.site-logo--dark { opacity: 1; }
.has-overlay-header .site-header.is-scrolled .crea-logo.site-logo--light { opacity: 0; }
@media (max-width: 860px) {
	.crea-logo, .site-header.is-scrolled .crea-logo { height: 34px; }
	.site-header__crea-label { font-size: .6875rem; }
	.nav-open .site-header .crea-logo.site-logo--dark { opacity: 0; }
	.nav-open .site-header .crea-logo.site-logo--light { opacity: 1; }
}
@media (max-width: 420px) {
	.nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.site-header__brands { gap: 10px; }
	.site-header__crea { padding-left: 10px; gap: 3px; }
	.site-header__crea-label { font-size: .625rem; }
	.crea-logo, .site-header.is-scrolled .crea-logo { height: 30px; }
}

/* ==========================================================================
   VERSIONE 4 – Cosa facciamo, sottomenu, contatti estesi
   ========================================================================== */

/* Menu principale: sottomenu delle aree di attività */
.site-nav__list > li { position: relative; }
.site-nav .menu-item-has-children > a { padding-right: 1.05em; }
.site-nav .menu-item-has-children::before {
	content: ""; position: absolute; right: 2px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
	border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); pointer-events: none;
}
.site-nav .sub-menu {
	list-style: none; margin: 0; padding: 12px 0; position: absolute; left: -24px; top: 100%; z-index: 3;
	min-width: 18rem; background: #fff; color: var(--mosto); border-top: 2px solid var(--verde);
	box-shadow: 0 22px 44px -24px rgba(51, 40, 33, .6);
	opacity: 0; visibility: hidden; transform: translateY(8px);
	transition: opacity .2s, transform .3s var(--ease), visibility 0s .3s;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .3s var(--ease); }
.site-nav li.is-closed > .sub-menu { opacity: 0; visibility: hidden; }
.site-nav .sub-menu a { padding: .5em 24px; font-size: 1.0625rem; line-height: 1.3; white-space: nowrap; }
.site-nav .sub-menu a::after { display: none; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a:focus-visible, .site-nav .sub-menu .current-menu-item > a { color: var(--verde); background: var(--foglia); outline-offset: -2px; }

/* Logo CREA: link al sito del CREA */
.site-header__crea-logos { color: inherit; line-height: 0; }

@media (max-width: 860px) {
	.site-nav { flex-direction: column; align-items: stretch; overflow-y: auto; padding-top: calc(var(--header-h) + 24px); padding-bottom: 10vh; }
	.site-nav__list { margin-top: auto; }
	.site-nav .menu-item-has-children::before { display: none; }
	.site-nav .menu-item-has-children > a { padding-right: 0; }
	.site-nav .sub-menu { position: static; min-width: 0; padding: .1em 0 .5em; background: none; color: inherit; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
	.site-nav .sub-menu a { padding: .32em 0 .32em 1em; font-size: 1.125rem; white-space: normal; color: rgba(255, 255, 255, .82); border-left: 1px solid var(--linea-chiara); }
	.site-nav .sub-menu a:hover, .site-nav .sub-menu a:focus-visible, .site-nav .sub-menu .current-menu-item > a { background: none; color: var(--paglia); }
}

/* Testata: link "torna a" e titoli lunghi delle aree */
.page-head__back { display: inline-flex; align-items: center; gap: .5em; margin-bottom: clamp(18px, 2.6vw, 32px); color: inherit; text-decoration: none; font-size: 1.0625rem; }
.page-head__back .lv-arrow { transform: rotate(180deg); }
.page-head__back:hover { color: inherit; }
.page-head__back:hover .lv-arrow { transform: rotate(180deg) translateX(4px); }
.page-head--photo .page-head__back { color: rgba(255, 255, 255, .9); }
.page-head--area .page-head__title { font-size: clamp(2.3rem, 1rem + 4.1vw, 5.25rem); line-height: 1.04; max-width: 18ch; }
.page-head--area .page-head__intro { max-width: 46ch; color: rgba(255, 255, 255, .92); }
.page-head--area::before { background: linear-gradient(180deg, rgba(22, 63, 29, .55) 0%, rgba(22, 63, 29, 0) 30%), linear-gradient(10deg, rgba(42, 32, 26, .9) 0%, rgba(42, 32, 26, .5) 50%, rgba(42, 32, 26, .1) 100%); }

/* Titolo a sinistra + testo a destra (sottopagine) */
.lv-duo { padding: var(--sec) var(--pad-x); }
.lv-flow .lv-duo .wp-block-columns { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 8vw, 140px); align-items: start; margin: 0; }
.lv-duo h2 { position: sticky; top: calc(var(--header-h) + 32px); margin: 0; max-width: 12ch; }
.lv-duo p { max-width: 62ch; }
.lv-duo .wp-block-column > p:first-child { font-size: var(--t-md); line-height: 1.5; color: var(--bosco); }
.lv-duo .wp-block-column > p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
	.lv-flow .lv-duo .wp-block-columns { grid-template-columns: 1fr; gap: 20px; }
	.lv-duo h2 { position: static; max-width: none; }
}

/* Domande: tre colonne quando sono tre */
@media (min-width: 901px) {
	.lv-questions:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
}

/* Pulsanti dei blocchi (invito al contatto, Chi siamo) */
.lv-flow .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2em; }
.lv-flow .wp-block-button { margin: 0; }
.wp-block-button__link::after {
	content: ""; width: 1.1em; height: 1.1em; flex: none; background: currentColor; transition: transform .35s var(--ease);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wp-block-button__link:hover::after { transform: translateX(3px); }
.lv-band--green .wp-block-button__link { background: #fff; color: var(--mosto); border-color: #fff; }
.lv-band--green .wp-block-button__link:hover { background: transparent; color: #fff; border-color: #fff; }

/* Invito al contatto: fascia verde con la foglia tracciata */
.lv-cta { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(64px, 8vw, 128px); }
.lv-cta::after {
	content: ""; position: absolute; z-index: -1; right: max(-6vw, -80px); top: 50%; transform: translateY(-50%);
	width: min(46vw, 540px); aspect-ratio: 158 / 152; background: url("assets/img/leaf-line.svg") center / contain no-repeat; opacity: .55; pointer-events: none;
}
.lv-cta > * { max-width: none; }
.lv-cta__text { font-size: var(--t-xl); line-height: 1.14; letter-spacing: -.012em; max-width: 22ch; margin: 0; color: #fff; text-wrap: balance; }
@media (max-width: 700px) { .lv-cta::after { width: 70vw; right: -24vw; top: 18%; transform: none; opacity: .35; } }

/* Cosa facciamo: schede delle aree */
.areas { padding-block: 0 var(--sec); }
.areas__title { color: var(--bosco); margin-bottom: clamp(28px, 4vw, 56px); }
.areas__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.area-card { grid-column: span 2; }
.area-card:nth-child(n+4) { grid-column: span 3; }
.area-card__link { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--linea); color: var(--testo); text-decoration: none; outline-offset: 4px; transition: border-color .25s, box-shadow .25s; }
.area-card__link:hover, .area-card__link:focus-visible { border-color: var(--verde); box-shadow: 0 18px 40px -28px rgba(51, 40, 33, .55); color: var(--testo); }
.area-card__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--foglia); }
.area-card:nth-child(n+4) .area-card__media { aspect-ratio: 12 / 5; }
.area-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.area-card__body { position: relative; flex: 1; display: flex; flex-direction: column; gap: .55em; padding: clamp(22px, 2.4vw, 34px); padding-right: calc(clamp(22px, 2.4vw, 34px) + 60px); }
.area-card__num { font-style: italic; font-size: var(--t-md); line-height: 1; color: var(--verde); font-variant-numeric: lining-nums; }
.area-card__title { font-size: var(--t-lg); line-height: 1.12; color: var(--bosco); margin: 0; }
.area-card__text { color: var(--testo-2); max-width: 46ch; }
.area-card__go { position: absolute; right: clamp(22px, 2.4vw, 34px); bottom: clamp(22px, 2.4vw, 34px); display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--linea); border-radius: 50%; color: var(--verde); transition: background .25s, color .25s, border-color .25s; }
.area-card__link:hover .area-card__go, .area-card__link:focus-visible .area-card__go { background: var(--verde); border-color: var(--verde); color: #fff; }
.area-card__link:hover .lv-arrow { transform: translateX(2px); }
@media (prefers-reduced-motion: no-preference) {
	.area-card__link:hover .area-card__media img { transform: scale(1.045); }
}
@media (max-width: 1100px) {
	.areas__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.area-card, .area-card:nth-child(n+4) { grid-column: span 1; }
	.area-card:nth-child(n+4) .area-card__media { aspect-ratio: 16 / 10; }
	.area-card:last-child:nth-child(odd) { grid-column: span 2; }
	.area-card:last-child:nth-child(odd) .area-card__media { aspect-ratio: 12 / 5; }
}
@media (max-width: 700px) {
	.areas__grid { grid-template-columns: 1fr; }
	.area-card__body { padding-right: clamp(22px, 2.4vw, 34px); }
	.area-card__go { position: static; align-self: flex-end; margin-top: .2em; }
	.area-card:last-child:nth-child(odd) { grid-column: span 1; }
	.area-card:last-child:nth-child(odd) .area-card__media { aspect-ratio: 16 / 10; }
}

/* Elenco numerato delle aree (home e altre aree) */
.area-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--linea); }
.area-list li { margin: 0; border-top: 1px solid var(--linea); }
.area-list a { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: baseline; gap: .6em; padding: 1em 0; color: var(--bosco); text-decoration: none; font-size: var(--t-md); line-height: 1.3; }
.area-list__num { font-style: italic; font-size: 1rem; color: var(--verde); font-variant-numeric: lining-nums; }
.area-list .lv-arrow { align-self: center; color: var(--verde); }
.area-list a:hover, .area-list a:focus-visible { color: var(--verde); }
.area-list a:hover .lv-arrow { transform: translateX(4px); }
.area-list--dark { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 112px); border-bottom: 0; }
.area-list--dark li { border-color: var(--linea-chiara); }
.area-list--dark li:nth-last-child(-n+2) { border-bottom: 1px solid var(--linea-chiara); }
.area-list--dark a { color: #fff; }
.area-list--dark .area-list__num, .area-list--dark .lv-arrow { color: var(--paglia); }
.area-list--dark a:hover, .area-list--dark a:focus-visible { color: var(--paglia); }
@media (max-width: 700px) {
	.area-list--dark { grid-template-columns: 1fr; }
	.area-list--dark li:nth-last-child(2) { border-bottom: 0; }
}

/* Home: richiamo a Cosa facciamo */
.services-teaser { padding-block: var(--sec); }
.services-teaser__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 8vw, 140px); align-items: start; }
.services-teaser__head { position: sticky; top: calc(var(--header-h) + 32px); }
.services-teaser__title { font-size: var(--t-md); font-style: italic; font-weight: 400; color: var(--verde); margin-bottom: .6em; letter-spacing: 0; }
.services-teaser__claim { font-size: var(--t-xl); line-height: 1.1; letter-spacing: -.014em; color: var(--bosco); max-width: 14ch; margin-bottom: .9em; }
@media (max-width: 900px) {
	.services-teaser__grid { grid-template-columns: 1fr; }
	.services-teaser__head { position: static; }
}

/* Contatti: dati in quattro gruppi */
.contact__data { display: block; padding-top: 0; border-top: 0; }
.contact__list { margin: 0; border-bottom: 1px solid var(--linea-chiara); }
.contact__list > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 1em; padding: .95em 0; border-top: 1px solid var(--linea-chiara); }
.contact__list dt { font-style: italic; font-size: 1rem; color: var(--paglia); padding-top: .15em; }
.contact__list dd { margin: 0; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.contact__list a { color: #fff; text-decoration-color: rgba(255, 255, 255, .4); }
.contact__list a:hover { color: var(--paglia); }
.contact__text h2.lv-statement { font-weight: 400; margin-bottom: .7em; }
@media (max-width: 600px) { .contact__list > div { grid-template-columns: 1fr; gap: .3em; } }

/* Footer: telefono e sedi */
.site-footer__phone { font-size: var(--t-md); line-height: 1.2; }
.site-footer__places { display: grid; gap: .8em; margin: .9em 0 0; }
.site-footer__places dt { font-style: italic; font-size: .9375rem; color: var(--paglia); }
.site-footer__places dd { margin: 0; }

/* Progetti: sottotitolo e ruolo */
.project-head__sub { font-size: var(--t-lg); line-height: 1.25; color: var(--bosco); max-width: 20ch; margin: 0; }
.project-head__logo + .project-head__title.screen-reader-text + .project-head__sub { margin-top: 0; }
.project__role--text dd { font-size: inherit; line-height: inherit; color: inherit; }
.project__role--text dd p { max-width: 58ch; }
.project__role--text dd p:last-child { margin-bottom: 0; }

/* Anteprima del testo nuovo (solo amministratori) */
.lv-preview-bar { position: sticky; top: 0; z-index: 200; padding: 8px var(--pad-x); background: var(--paglia); color: var(--mosto); font-size: .9375rem; text-align: center; }

@media print {
	.areas-more, .lv-cta::after, .lv-preview-bar { display: none; }
}

/* ==========================================================================
   Finanziamento REGENERO (4.0.2): come la fascia .rg-funding di REGENERO Terra.
   Loghi su fondo bianco, proporzioni originali, tutti su una riga; dicitura sotto.
   Sotto i 720 px una riga non entra senza scendere sotto i 40 px di altezza:
   due righe da due (UE + Repubblica, PSR + Regione) a 38/44 px, come REGENERO Terra.
   ========================================================================== */
.funding { padding-block: clamp(40px, 5vw, 72px); background: #fff; border-top: 1px solid var(--linea); text-align: center; }
.project-head + .funding { border-top: 0; }
.funding__logos { list-style: none; margin: 0 auto clamp(24px, 3vw, 36px); padding: 0; display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 16px clamp(24px, 3.6vw, 52px); }
.funding__logo { margin: 0; flex: none; }
.funding__logo img { height: clamp(40px, 4.2vw, 56px); width: auto; max-width: none; object-fit: contain; }
.funding__logo--repubblica img { height: clamp(46px, 4.8vw, 64px); }
.funding__text { max-width: 920px; margin-inline: auto; font-size: .9375rem; line-height: 1.62; color: var(--testo-2); }
.funding__text p { margin: 0 0 .85em; }
.funding__text p:last-child { margin-bottom: 0; }
.funding__text a { overflow-wrap: anywhere; }
@media (max-width: 719px) {
	.funding__logos { flex-wrap: wrap; column-gap: 20px; }
	.funding__logo img { height: 38px; }
	.funding__logo--repubblica img { height: 44px; }
	/* A capo dopo i primi due loghi (l'ordine di lettura resta quello originale). */
	.funding__logos::before { content: ""; order: 2; flex-basis: 100%; margin-top: -16px; }
	.funding__logo--psr-lombardia, .funding__logo--regione-lombardia { order: 3; }
}

/* ==========================================================================
   Due lingue (4.1.0): selettore nel menu e traduzione della dicitura REGENERO
   ========================================================================== */
.lang-switch { display: flex; align-items: center; }
.lang-switch__list { list-style: none; display: flex; align-items: center; gap: .1em; margin: 0; padding: 0 0 0 clamp(.9rem, 1.6vw, 1.4rem); border-left: 1px solid currentColor; border-left-color: color-mix(in srgb, currentColor 35%, transparent); }
.lang-switch__list li { display: flex; }
.site-nav .lang-switch__list a, .lang-switch__current { position: relative; display: block; padding: .5em .45em; font-size: .9375rem; letter-spacing: .06em; line-height: inherit; color: inherit; text-decoration: none; }
.lang-switch__current { font-weight: 600; }
/* La sottolineatura segue la sigla, non la scatola (che su smartphone è più grande per il tocco). */
.lang-switch__code { position: relative; display: inline-block; }
.lang-switch__current .lang-switch__code::after, .site-nav .lang-switch__list a .lang-switch__code::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(-.26em - 1px); height: 1px; background: currentColor; }
.site-nav .lang-switch__list a::after { display: none; }
.site-nav .lang-switch__list a .lang-switch__code::after { transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.site-nav .lang-switch__list a:hover .lang-switch__code::after, .site-nav .lang-switch__list a:focus-visible .lang-switch__code::after { transform: scaleX(1); }
.site-nav .lang-switch__list a { opacity: .78; }
.site-nav .lang-switch__list a:hover, .site-nav .lang-switch__list a:focus-visible { opacity: 1; }
.funding__text--tr { margin-top: 1.4em; padding-top: 1.4em; border-top: 1px solid var(--linea); }
@media (max-width: 860px) {
	.lang-switch { display: block; margin-top: 1.2em; }
	.lang-switch__list { padding: .8em 0 0; border-left: 0; border-top: 1px solid var(--linea-chiara); gap: .6em; }
	.site-nav .lang-switch__list a, .lang-switch__current { font-size: 1.25rem; padding: .3em .2em; }
	.lang-switch__current .lang-switch__code::after, .site-nav .lang-switch__list a .lang-switch__code::after { bottom: calc(-.06em - 1px); }
	/* Area di tocco di almeno 44×44 px: la scatola si allarga, i margini negativi la compensano
	   e le sigle restano dove sono (prima voce: più spazio a sinistra, verso il bordo). */
	.lang-switch__list li:first-child > * { padding-left: calc(.2em + 11px); margin-left: -11px; padding-right: calc(.2em + 4px); margin-right: -4px; }
	.lang-switch__list li:last-child > * { padding-left: calc(.2em + 3px); margin-left: -3px; padding-right: calc(.2em + 4px); margin-right: -4px; }
	.site-nav .lang-switch__list a, .lang-switch__current { min-height: 44px; }
}
/* Menu mobile aperto: sta sopra l'avviso cookie, che si nasconde finché il menu è aperto
   (poi ricompare, leggibile e chiudibile). Prima l'avviso copriva IT / EN sugli schermi bassi. */
.nav-open .site-header { z-index: 160; }
.nav-open .cookie-banner { visibility: hidden; }
/* Sugli schermi bassi il menu aperto si scorre: comincia sotto la testata (verde come il menu),
   così le voci non passano sotto il logo. */
@media (max-width: 860px) {
	.nav-open .site-header, .nav-open.has-overlay-header .site-header.is-scrolled { background: var(--bosco); }
	.site-nav { top: calc(var(--header-h) + var(--wp-admin--admin-bar--height, 0px)); padding-top: 24px; }
}
.funding__note { font-style: italic; color: var(--testo-2); font-size: .875rem; }
.funding__text--tr { font-size: .875rem; }
