/*
Theme Name: La Viticola
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, Progetti, Contatti, tipo di contenuto "Progetti" e block pattern dedicati.
Version: 3.2.0
Requires at least: 6.3
Tested up to: 6.8
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)) { padding-top: 0; }
.lv-flow:has(> :last-child:is(.lv-intro, .lv-band, .lv-services, .lv-split, .lv-audience)) { 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, .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: 5fr 4fr 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 { display: none; }
	.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; }
}
