/* VF Cuassese – foglio di stile unico, mobile first */

@font-face {
	font-family: "Inter";
	src: url("../fonts/inter-latin-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter Tight";
	src: url("../fonts/inter-tight-latin-wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Caveat";
	src: url("../fonts/caveat-latin-wght.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

:root {
	/* legno scuro, carta calda, rovere e vetro */
	--ink: #1d1813;
	--ink-2: #2a231c;
	--text: #3b332b;
	--muted: #6b6056;
	--paper: #f8f4ee;
	--paper-2: #efe8de;
	--line: #e0d6c8;
	--wood: #8f4f1f;
	--wood-light: #c9844a;
	--glass: #e3ecea;
	--glass-ink: #2e5754;
	--white: #fff;

	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
	--ink-pen: #23304d;   /* inchiostro blu-nero della penna */
	--note: #fbf6ea;      /* carta calda del foglietto */
	--font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 18px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgb(29 24 19 / .06), 0 10px 30px rgb(29 24 19 / .10);
	--gutter: 16px;
	--header-h: 60px;
	--container: 1180px;
}

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

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);
	-webkit-text-size-adjust: 100%;
}

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

body {
	margin: 0;
	overflow-x: clip;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

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

/* icone Lucide (sprite img/icons.svg): lineari, colore del testo, allineate al testo */
.icon {
	display: inline-block;
	flex: none;
	width: 1.15em;
	height: 1.15em;
	vertical-align: -.2em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}
img { height: auto; }

h1, h2, h3 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.1;
	margin: 0;
	font-weight: 700;
	letter-spacing: -.012em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--wood); text-underline-offset: .18em; }
a:hover { color: var(--ink); }

:focus-visible {
	outline: 3px solid var(--wood-light);
	outline-offset: 3px;
	border-radius: 4px;
}

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

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 100;
	padding: .6em 1em;
	background: var(--ink);
	color: var(--white);
	border-radius: var(--radius-sm);
}
.skip:focus { top: 8px; color: var(--white); }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.eyebrow {
	margin: 0 0 .9rem;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--wood);
}

.link-btn {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	color: var(--wood);
	text-decoration: underline;
	text-underline-offset: .18em;
	cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* ---------- Pulsanti ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: .75rem 1.5rem;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn .icon { margin: 0 .45em 0 -.1em; }
.btn .icon-end { margin: 0 -.1em 0 .45em; }
.btn-primary { background: var(--wood-light); color: var(--ink); }
.btn-primary:hover { background: #dc9860; color: var(--ink); }
.btn-ghost { border-color: rgb(255 255 255 / .3); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); color: var(--white); background: rgb(255 255 255 / .06); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--wood); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgb(29 24 19 / .88);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	box-shadow: 0 1px 0 rgb(255 255 255 / .08); /* niente bordo: l'header resta alto esattamente --header-h */
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--header-h);
}

.brand { display: block; flex: none; border-radius: 4px; }
.brand img { display: block; height: 40px; width: auto; }

.nav-toggle {
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	margin-right: -8px;
	background: none;
	border: 0;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
	display: block;
	width: 22px; height: 2px;
	background: var(--white);
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before,
.nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
	position: absolute;
	top: 100%;
	left: 0; right: 0;
	background: var(--ink);
	border-bottom: 1px solid rgb(255 255 255 / .08);
	display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: .5rem var(--gutter) 1rem; }
.site-nav a {
	display: block;
	padding: .8rem .25rem;
	color: rgb(255 255 255 / .85);
	text-decoration: none;
	font-weight: 500;
	border-bottom: 1px solid rgb(255 255 255 / .07);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover,
.site-nav a[aria-current="true"] { color: var(--wood-light); }

/* senza JS il menu resta visibile */
.no-js .nav-toggle { display: none; }
.no-js .site-nav { position: static; display: block; background: none; border: 0; }

/* pulsante "Preventivo" in evidenza nel menu */
.nav-cta a { color: var(--wood-light); font-weight: 600; }

@media (min-width: 1024px) {
	.nav-toggle { display: none; }
	.site-nav,
	.no-js .site-nav {
		position: static;
		display: block;
		background: none;
		border: 0;
	}
	.site-nav ul { display: flex; gap: .25rem; padding: 0; }
	.site-nav a {
		padding: .45rem .9rem;
		border: 0;
		border-radius: 999px;
		font-size: .95rem;
	}
	.site-nav a:hover { background: rgb(255 255 255 / .07); }
	.site-nav a[aria-current="true"] { background: rgb(201 132 74 / .16); }
	.site-nav .nav-cta { margin-left: .5rem; }
	.site-nav .nav-cta a { background: var(--wood-light); color: var(--ink); padding-inline: 1.1rem; }
	.site-nav .nav-cta a:hover,
	.site-nav .nav-cta a[aria-current="true"] { background: #dc9860; color: var(--ink); }
}

@media (min-width: 1024px) and (max-width: 1179px) {
	.site-nav ul { gap: 0; }
	.site-nav a { padding-inline: .7rem; font-size: .92rem; }
}

/* ---------- Sezioni a tutto schermo ---------- */

/*
 * Ogni sezione occupa una schermata (altezza finestra meno header) e i contenuti
 * sono dimensionati anche sull'altezza (svh), così su desktop e laptop stanno
 * interi in una schermata anche a 768px di altezza.
 */
:root {
	--sec-pad: clamp(1.25rem, 3.5svh, 3rem);
	--head-gap: clamp(1rem, 3svh, 2.25rem);
}

.hero,
.section {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: calc(100svh - var(--header-h));
	padding: var(--sec-pad) 0;
}

/*
 * Scorrimento a scatto, una sezione per volta. La classe .snap la mette main.js
 * solo da 760px di larghezza, senza "riduci movimento" e se ogni sezione sta
 * nella finestra: altrimenti (telefono, finestre basse) lo scorrimento è libero.
 */
html.snap { scroll-snap-type: y mandatory; }
html.snap .hero,
html.snap .section { scroll-snap-align: start; scroll-snap-stop: always; }
html.snap .site-footer { scroll-snap-align: end; }

.section-alt { background: var(--paper-2); }

.section-head {
	max-width: 52rem;
	margin: 0 auto var(--head-gap);
	text-align: center;
}
.section-head .eyebrow { margin-bottom: .4rem; }
.section-head h2 {
	font-size: clamp(1.75rem, min(4.2vw, 5.4svh), 2.9rem);
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.08;
	text-wrap: balance;
}

/* ---------- Hero ---------- */

.hero {
	position: relative;
	background:
		radial-gradient(90% 60% at 50% 0%, rgb(201 132 74 / .22), transparent 70%),
		linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
	color: rgb(255 255 255 / .86);
	text-align: center;
	overflow: hidden;
}

.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero .eyebrow { color: var(--wood-light); margin-bottom: clamp(.5rem, 1.5svh, 1rem); }

.hero-logo { margin: 0; line-height: 0; }
/* logo della home: largo quanto un titolo grande, ma limitato anche dall'altezza della finestra */
.hero-logo img { display: block; width: min(86vw, 560px, 75svh); height: auto; }

/* citazione scritta a mano su un foglietto di carta */
.note {
	position: relative;
	background:
		radial-gradient(120% 90% at 20% 10%, rgb(255 255 255 / .55), transparent 60%),
		linear-gradient(180deg, #fdf9f0 0%, var(--note) 100%);
	border-radius: 3px 7px 4px 8px / 7px 3px 8px 4px;
	box-shadow:
		0 1px 1px rgb(60 40 20 / .12),
		0 10px 24px -6px rgb(40 25 10 / .35);
	transform: rotate(-1deg);
}
.note p {
	font-family: var(--font-hand);
	font-weight: 500;
	color: var(--ink-pen);
	text-wrap: pretty;
}

.hero-quote {
	margin: clamp(1rem, 3svh, 1.75rem) 0 0;
	max-width: 40rem;
	padding: clamp(.7rem, 1.8svh, 1.1rem) clamp(1.1rem, 3vw, 1.8rem);
}
.hero-quote p {
	font-size: clamp(1.3rem, 3.1svh, 1.7rem);
	line-height: 1.25;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .75rem;
	margin-top: clamp(1.25rem, 3.5svh, 2.25rem);
}

.hero-banner {
	position: relative;
	display: block;
	width: 100%;
	max-width: 996px;
	margin-top: clamp(1.5rem, 4.5svh, 3.5rem);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 30px 60px rgb(0 0 0 / .4);
}
.hero-banner img {
	width: 100%;
	height: min(286px, 30svh, 28.7vw);
	object-fit: cover;
	transition: transform .6s ease;
}
.hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}
.hero-video.is-off { display: none; }
.hero-banner:hover img,
.hero-banner:hover .hero-video { transform: scale(1.02); }

@media (prefers-reduced-motion: reduce) {
	.hero-video { display: none; }
}

@media (max-width: 559px) {
	/* sul telefono il banner è più alto e ritaglia i lati */
	.hero-banner img { height: min(56vw, 22svh); }
}

/* ---------- Cosa facciamo ---------- */

.services {
	display: grid;
	gap: .75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.service {
	display: flex;
	flex-direction: column;
	gap: .45rem;
	height: 100%;
	padding: 1.1rem 1.2rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	color: var(--text);
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.service:hover { border-color: rgb(143 79 31 / .45); box-shadow: var(--shadow); color: var(--text); }
@media (hover: hover) { .service:hover { transform: translateY(-2px); } }
.service-icon {
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border-radius: 12px;
	background: var(--glass);
	color: var(--wood);
}
.service-icon .icon { width: 24px; height: 24px; }
.service h3 { font-size: 1.1rem; }
.service p { margin: 0; flex: 1; font-size: .95rem; line-height: 1.5; }
.service-more { font-size: .88rem; font-weight: 600; color: var(--wood); }

@media (min-width: 600px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }

/* ---------- Come lavoriamo ---------- */

.steps {
	display: grid;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}
.step { text-align: center; }
.step-icon {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 64px; height: 64px;
	margin-bottom: .6rem;
	border-radius: 50%;
	background: var(--white);
	border: 1px solid var(--line);
	color: var(--wood);
}
.step-icon .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.step-num {
	position: absolute;
	top: -4px; right: -4px;
	display: grid;
	place-items: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--wood);
	color: var(--white);
	font-size: .78rem;
	font-weight: 700;
}
.step h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.step p { margin: 0 auto; max-width: 20rem; font-size: .95rem; line-height: 1.5; }

.process-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1rem 2rem;
	margin-top: clamp(1.5rem, 5svh, 3rem);
	padding-top: clamp(1rem, 3svh, 1.75rem);
	border-top: 1px solid var(--line);
}
.area { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.02rem; }
.area .icon { width: 24px; height: 24px; color: var(--wood); }
.area strong { color: var(--ink); }

@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
	.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
	/* filo che unisce i passaggi */
	.step { position: relative; }
	.step:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 32px;
		left: calc(50% + 44px);
		right: calc(-50% + 44px);
		height: 1px;
		background: var(--line);
	}
}

/* ---------- Realizzazioni: griglia filtrabile ---------- */

/* filtri: sul telefono una riga che scorre di lato, su schermi larghi centrati su più righe */
.gallery-filters {
	display: flex;
	gap: .45rem;
	margin: 0 calc(var(--gutter) * -1) clamp(.9rem, 2.5svh, 1.5rem);
	padding: 2px var(--gutter) 6px;
	overflow-x: auto;
	scrollbar-width: none;
}
.gallery-filters::-webkit-scrollbar { display: none; }
.tag {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 40px;
	padding: .4rem .95rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--white);
	color: var(--ink);
	font-weight: 500;
	font-size: .9rem;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag-count { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tag[aria-current="true"] .tag-count { color: rgb(255 255 255 / .65); }

@media (min-width: 760px) {
	.gallery-filters {
		flex-wrap: wrap;
		justify-content: center;
		margin: 0 0 clamp(.9rem, 2.5svh, 1.75rem);
		padding: 0;
		overflow: visible;
	}
	.tag { min-height: 36px; padding: .3rem .85rem; font-size: .88rem; }
}

/* griglia: numero di colonne (--cols) e di tessere li calcola main.js sull'altezza disponibile */
.gallery-grid {
	--cols: 2;
	display: grid;
	grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
	gap: 8px;
	view-transition-name: gallery;
}
html:not(.js) .gallery-grid { display: none; }
@media (min-width: 760px) { .gallery-grid { gap: 12px; } }

.tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background: var(--paper-2);
	box-shadow: var(--shadow);
	color: var(--white);
	text-decoration: none;
}
.tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s ease, filter .3s ease;
}
.tile-label {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 1.75rem .8rem .6rem;
	background: linear-gradient(transparent, rgb(20 16 12 / .78));
	font-weight: 600;
	font-size: .9rem;
	line-height: 1.25;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .3s ease, transform .3s ease;
}
.tile-label small { display: block; font-size: .75rem; font-weight: 400; opacity: .85; }
@media (hover: hover) {
	.tile:hover img { transform: scale(1.06); }
	.tile:hover .tile-label { opacity: 1; transform: none; }
}
.tile:focus-visible .tile-label,
.is-all .tile-label { opacity: 1; transform: none; }
.is-all .tile-label { padding: 1.4rem .6rem .45rem; font-size: .85rem; }

/* ultima tessera "+N foto" */
.tile-more img { filter: blur(2px) brightness(.5); transform: scale(1.08); }
.tile-more .tile-label {
	inset: 0;
	display: grid;
	place-items: center;
	padding: 0;
	background: none;
	font-size: clamp(1.1rem, 2.4vw, 1.5rem);
	font-weight: 700;
	opacity: 1;
	transform: none;
}
@media (hover: hover) { .tile-more:hover img { transform: scale(1.12); } }

/* cambio categoria: dissolvenza e leggero scale (View Transitions o, in mancanza, animazione CSS) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-old(gallery) { animation: gallery-out .2s ease both; }
::view-transition-new(gallery) { animation: gallery-in .35s ease both; }
.gallery-grid.is-entering { animation: gallery-in .35s ease both; }
@keyframes gallery-out { to { opacity: 0; transform: scale(.985); } }
@keyframes gallery-in { from { opacity: 0; transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*),
	::view-transition-old(*),
	::view-transition-new(*) { animation: none !important; }
}

/* senza JS: tutte le foto, per categoria */
.gallery-cat + .gallery-cat { margin-top: 1.5rem; }
.gallery-cat h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.gallery-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.gallery-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.js .gallery-source { display: none; }

/* ---------- Dicono di noi ---------- */

/* sul telefono le card scorrono di lato, come il carosello delle realizzazioni */
.reviews {
	--review-lines: 5;
	display: flex;
	gap: 12px;
	list-style: none;
	margin: 0 calc(var(--gutter) * -1);
	padding: 4px var(--gutter) 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}
.reviews::-webkit-scrollbar { display: none; }

.review {
	position: relative;
	flex: none;
	width: min(82vw, 340px);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	padding: 1.1rem 1.2rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.review-stars { display: flex; gap: 2px; margin: 0; }
.review-stars svg { width: 18px; height: 18px; fill: var(--wood-light); }
.review-stars svg.is-empty { fill: var(--line); }

.review-text { margin: 0; flex: 1; }
.review-text p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--review-lines);
	line-clamp: var(--review-lines);
	overflow: hidden;
	font-size: .95rem;
	line-height: 1.55;
	color: var(--text);
}
.review.is-open .review-text p { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
.review-more {
	align-self: flex-start;
	margin-top: -.3rem;
	font-size: .88rem;
	font-weight: 500;
}
.review-meta { margin: 0; font-size: .85rem; color: var(--muted); }
.review-author { font-weight: 600; color: var(--ink); }
.review-source { margin: -.35rem 0 0; font-size: .75rem; color: var(--muted); }

.reviews-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .75rem;
	margin-top: clamp(1rem, 3svh, 2rem);
}

@media (min-width: 760px) {
	.reviews {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
		margin: 0;
		padding: 0;
		overflow: visible;
	}
	.review { width: auto; }
}

@media (min-width: 1024px) {
	.reviews { --review-lines: 4; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1199px) {
	.reviews { --review-lines: 3; } /* colonne strette: il resto con Leggi tutto */
}

@media (min-width: 760px) and (max-height: 740px) {
	.reviews { --review-lines: 3; gap: .75rem; }
	.review { padding: .85rem 1rem; gap: .45rem; }
}

/* ---------- Storia ---------- */

.about-grid { display: grid; gap: 2rem; }

/* testo tra le due foto: la sede in alto a sinistra, gli attrezzi in basso a destra */
.about-text { display: flow-root; }
.about-figure { margin: 0 0 1.25rem; }
.about-figure img {
	width: 100%;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.quote {
	display: flow-root; /* accanto alla foto, senza passarci sotto */
	margin: 0 0 1.25rem;
	padding: 1rem 1.25rem;
}
.quote p {
	font-size: 1.4rem;
	line-height: 1.25;
}

.prose { font-size: 1rem; line-height: 1.65; }
.prose p { hyphens: auto; margin-bottom: .75em; }
.prose p:last-child { margin-bottom: 0; }

.people {
	display: grid;
	gap: .75rem;
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}
.person {
	padding: .9rem 1.1rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
}
.person-name {
	margin-bottom: .25rem;
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 650;
	color: var(--ink);
}
.person-link {
	display: flex;
	align-items: center;
	gap: .6rem;
	min-height: 40px;
	color: var(--text);
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}
.person-link .icon { width: 19px; height: 19px; color: var(--wood); }
.person-link:hover { color: var(--wood); }

.about-aside h3 { font-size: 1.1rem; margin-bottom: .75rem; }

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.chip {
	display: inline-block;
	min-height: 34px;
	padding: .35rem .8rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: rgb(255 255 255 / .6);
	color: var(--muted);
	font-size: .88rem;
	line-height: 1.4;
	text-decoration: none;
}
a.chip {
	border-color: rgb(143 79 31 / .35);
	background: var(--white);
	color: var(--wood);
	font-weight: 500;
	white-space: nowrap;
}
a.chip::after { content: "→"; display: inline-block; margin-left: .35em; transition: transform .2s ease; }
a.chip:hover { background: var(--wood); border-color: var(--wood); color: var(--white); }
a.chip:hover::after { transform: translateX(2px); }

@media (min-width: 600px) {
	.about-figure-top { float: left; width: min(42%, 377px); margin: .2rem 1.5rem 1rem 0; }
	.about-figure-bottom { float: right; width: min(40%, 300px); margin: .3rem 0 .75rem 1.5rem; }
	.people { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
	/* due colonne: testo con le foto | lista realizzazioni e, sotto, i referenti */
	.about-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
		gap: clamp(1.5rem, 3vw, 3rem);
		align-items: start;
	}
	.about-figure-top { width: min(38%, 377px); }
	.about-figure-bottom { width: min(36%, 300px); }
	.about-figure img { max-height: 25svh; object-fit: cover; }
	.quote { padding: .9rem 1.1rem; margin-bottom: 1rem; }
	.quote p { font-size: clamp(1.25rem, 2.7svh, 1.45rem); }
	.prose { font-size: clamp(.9375rem, 2svh, 1.02rem); line-height: 1.6; }
	/* colonna destra tesa quanto la griglia: le card di Roberto e Vito in fondo,
	   allineate all'ultima riga del testo di Storia */
	.about-side { align-self: stretch; display: flex; flex-direction: column; }
	.people { margin-top: auto; padding-top: clamp(1.25rem, 4svh, 2.5rem); gap: .5rem; }
	.person { padding: .5rem .6rem; }
	.person-name { font-size: .95rem; line-height: 1.3; margin-bottom: .15rem; }
	.person-link { min-height: 30px; gap: .4rem; font-size: .86rem; white-space: nowrap; }
	.person-link .icon { width: 17px; height: 17px; }
	.chip { min-height: 30px; padding: .25rem .7rem; font-size: .84rem; }
}

@media (min-width: 960px) and (max-width: 1199px) {
	.contact-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr) minmax(0, 250px); }
	/* laptop piccoli e tablet orizzontali: più spazio alla colonna del testo */
	.about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
}

@media (min-width: 960px) and (max-height: 700px) {
	/* finestre basse (laptop 1366×768 con le barre del browser): tutto più compatto */
	.section-head .eyebrow { display: none; }
	.chips { gap: .3rem; }
	.chip { min-height: 26px; padding: .15rem .6rem; font-size: .8rem; }
	.about-aside h3 { font-size: 1rem; margin-bottom: .5rem; }
	.person-link { min-height: 26px; }
	.prose { line-height: 1.5; }
	.quote { padding: .7rem 1rem; margin-bottom: .75rem; }
	.quote p { line-height: 1.2; }
	.about-figure img { max-height: 22svh; }
	.card { padding: .75rem 1rem; }
	.card h3 { margin-bottom: .4rem; }
	.info > div, .hours > div { padding: .3rem 0; }
	.card + .card { margin-top: .5rem; }
	.info dd, .hours dd { margin-top: 0; line-height: 1.5; }
	.address { margin-bottom: .6rem; }
	.contact-where { line-height: 1.5; }
	.directions { gap: .6rem; }
	.direction ol { gap: .2rem; }
	.direction li { line-height: 1.45; }
	.address { font-size: 1.05rem; }
	.address-street { font-size: 1.2rem; }
}

/* ---------- Contatti ---------- */

.contact-grid { display: grid; gap: 1.75rem; }

.address {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
	margin-bottom: 1.25rem;
	font-style: normal;
	font-size: 1.15rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--ink);
}
.address-street { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.address .icon { width: 26px; height: 26px; color: var(--wood); margin-top: .15em; }

.map {
	position: relative;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	background:
		repeating-linear-gradient(0deg, transparent 0 31px, rgb(0 0 0 / .035) 31px 32px),
		repeating-linear-gradient(90deg, transparent 0 31px, rgb(0 0 0 / .035) 31px 32px),
		var(--paper-2);
	aspect-ratio: 4 / 3;
}
.map iframe { width: 100%; height: 100%; border: 0; }
.map-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .8rem;
	padding: 1.25rem;
	text-align: center;
}
.map-placeholder > .icon { width: 34px; height: 34px; color: var(--wood); stroke-width: 1.5; }
.map-placeholder p { max-width: 30rem; margin: 0; font-size: .9rem; color: var(--text); }
.map-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.map-actions .btn { min-height: 44px; padding: .55rem 1.1rem; font-size: .92rem; }
.map-link { margin: .6rem 0 0; font-size: .9rem; }
.map-link .icon { width: 1em; height: 1em; margin-left: .3em; vertical-align: -.12em; }

.directions { display: grid; gap: 1rem; }
.directions-title { font-size: 1.1rem; }
.directions-title .icon,
.card h3 .icon { margin-right: .4em; color: var(--wood); }
.direction h4 {
	margin: 0 0 .35rem;
	font-family: var(--font-display);
	font-size: 1rem;
	font-weight: 650;
	color: var(--ink);
}
/* passaggi numerati in un cerchietto */
.direction ol {
	counter-reset: step;
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: .35rem;
}
.direction li {
	counter-increment: step;
	position: relative;
	padding-left: 2rem;
}
.direction li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: .15em;
	display: grid;
	place-items: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	background: var(--wood);
	color: var(--white);
	font-size: .75rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.card {
	padding: 1.25rem 1.4rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.card + .card { margin-top: .9rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .7rem; }

.info, .hours { margin: 0; }
.info > div, .hours > div {
	padding: .5rem 0;
	border-bottom: 1px solid var(--line);
}
.info > div:first-child, .hours > div:first-child { padding-top: 0; }
.info > div:last-child, .hours > div:last-child { border-bottom: 0; padding-bottom: 0; }
.info dt .icon { width: 1.45em; height: 1.45em; margin-right: .45em; vertical-align: -.4em; color: var(--wood); stroke-width: 1.9; }
.info dt, .hours dt {
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}
.hours dt { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.info dd, .hours dd { margin: .1rem 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

@media (min-width: 700px) and (max-width: 959px) {
	.map { aspect-ratio: 16 / 9; }
	.directions { grid-template-columns: 1fr 1fr; gap: 1rem 2rem; }
	.directions-title { grid-column: 1 / -1; }
}

@media (min-width: 960px) {
	/* tre colonne: mappa | indirizzo e indicazioni | schede */
	.contact-grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 290px);
		gap: clamp(1.5rem, 2.5vw, 2.5rem);
		align-items: start;
	}
	.map { aspect-ratio: auto; height: clamp(260px, calc(100svh - 330px), 520px); }
	/* mappa e indicazioni centrate in verticale; la colonna delle schede resta in alto */
	.contact-map, .contact-where { align-self: center; }
	.contact-where { font-size: clamp(.9375rem, 2svh, 1rem); line-height: 1.55; }
	.card { padding: 1rem 1.2rem; }
	.card + .card { margin-top: .75rem; }
}

/* ---------- Richiedi un preventivo ---------- */

.quote-grid { display: grid; gap: 1.5rem; }
.quote-intro p { font-size: 1.02rem; }
.quote-alt { color: var(--muted); font-size: .95rem; line-height: 1.9; }
.quote-alt a { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.quote-alt .icon { color: var(--wood); }

.quote-form {
	display: grid;
	gap: .8rem 1rem;
	padding: 1.25rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.field { display: grid; gap: .3rem; align-content: start; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
	width: 100%;
	min-height: 44px;
	padding: .55rem .75rem;
	border: 1px solid #cbbfae;
	border-radius: var(--radius-sm);
	background: var(--paper);
	color: var(--ink);
	font: inherit;
	font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.field input[type="file"] { padding: .45rem .5rem; font-size: .88rem; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--wood-light); outline-offset: 1px; border-color: var(--wood); }
.field [aria-invalid="true"] { border-color: #b3261e; background: #fdf3f2; }
.field-hint { font-size: .8rem; color: var(--muted); }
.field-error {
	display: flex;
	align-items: center;
	gap: .35rem;
	margin: 0;
	color: #b3261e;
	font-size: .85rem;
	font-weight: 500;
}
.field-error[hidden] { display: none; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: .2rem .6rem; }
.field-check input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--ink); }
.field-check label { font-weight: 400; font-size: .9rem; line-height: 1.45; color: var(--text); }
.field-check .field-error { grid-column: 2; }

/* campo antispam: fuori dallo schermo, non solo nascosto */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.form-note { margin: 0; font-size: .82rem; color: var(--muted); }
.form-submit[aria-busy="true"] { opacity: .7; cursor: progress; }
.form-submit[aria-busy="true"] .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-alert {
	margin: 0;
	padding: .6rem .8rem;
	border-radius: var(--radius-sm);
	background: #fdf3f2;
	color: #8c1d18;
	font-size: .92rem;
}
.form-alert[hidden] { display: none; }

.form-done {
	display: grid;
	justify-items: center;
	align-content: center;
	gap: .6rem;
	padding: 2rem 1.25rem;
	text-align: center;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.form-done[hidden] { display: none; }
.form-done > .icon { width: 44px; height: 44px; color: #2e7d4f; stroke-width: 1.5; }
.form-done h3 { font-size: 1.3rem; }
.form-done p { margin: 0; max-width: 28rem; }

@media (min-width: 700px) {
	.quote-form { grid-template-columns: 1fr 1fr; }
	.hp, .form-alert, .field-wide { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
	.quote-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
	.quote-form { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 1.25rem 1.4rem; }
	.form-done { min-height: 100%; }
}
@media (min-width: 960px) and (max-height: 700px) {
	.quote-form { gap: .55rem .9rem; padding: 1rem 1.2rem; }
	.field input:not([type="checkbox"]), .field select { min-height: 40px; padding-block: .4rem; }
	.field textarea { min-height: 64px; }
}

/* ---------- Finestre molto basse (laptop con barre del browser, circa 600 px utili) ---------- */

@media (min-width: 960px) and (max-height: 640px) {
	.reviews { --review-lines: 2; gap: .6rem; }
	.review { padding: .7rem .9rem; gap: .35rem; }
	.review-stars svg { width: 15px; height: 15px; }
	.reviews-actions { margin-top: .75rem; }
	.reviews-actions .btn { min-height: 42px; padding: .5rem 1.2rem; }
	.card { padding: .7rem 1rem; }
	.card h3 { font-size: 1rem; margin-bottom: .3rem; }
	.info > div, .hours > div { padding: .2rem 0; }
	.info dd, .hours dd { line-height: 1.4; }
	.hours dt { font-size: .9rem; }
	.address { margin-bottom: .4rem; }
	.address-street { font-size: 1.1rem; }
	.directions { gap: .45rem; }
	.direction li { line-height: 1.4; }
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--ink);
	color: rgb(255 255 255 / .7);
	font-size: .88rem;
	padding: 2rem 0;
}
.footer-inner { display: grid; gap: .5rem; }
.footer-mail .icon { width: 1.05em; height: 1.05em; margin-right: .3em; vertical-align: -.18em; }
.site-footer a,
.site-footer .link-btn { color: var(--wood-light); }
.site-footer a:hover,
.site-footer .link-btn:hover { color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }

@media (min-width: 760px) {
	.footer-inner { grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
	.footer-inner p { margin: 0; }
}

/* ---------- Banner cookie ---------- */

.cookie {
	position: fixed;
	left: var(--gutter);
	right: var(--gutter);
	bottom: var(--gutter);
	z-index: 80;
	max-width: 560px;
	max-height: calc(100svh - 2 * var(--gutter));
	overflow-y: auto;
	background: var(--white);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: 0 20px 60px rgb(0 0 0 / .25);
}
.cookie[hidden] { display: none; }
.cookie-inner { padding: 1.25rem 1.25rem 1.1rem; }
.cookie-title { font-size: 1.15rem; margin-bottom: .5rem; }
.cookie p { font-size: .92rem; line-height: 1.55; }

.cookie-options {
	display: grid;
	gap: .6rem;
	margin: 1rem 0 0;
	padding: 0;
	border: 0;
}
.cookie-options[hidden] { display: none; }
.cookie-opt {
	display: flex;
	gap: .7rem;
	align-items: flex-start;
	padding: .75rem .85rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	font-size: .9rem;
	line-height: 1.45;
	cursor: pointer;
}
.cookie-opt input { width: 20px; height: 20px; margin: .1rem 0 0; flex: none; accent-color: var(--ink); }
.cookie-opt strong { display: block; color: var(--ink); }

.cookie-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .6rem;
	margin-top: 1rem;
}
/* Accetta e Rifiuta hanno lo stesso identico aspetto */
.btn-cookie { background: var(--ink); color: var(--white); min-height: 46px; padding: .6rem 1rem; }
.btn-cookie:hover { background: var(--wood); color: var(--white); }
.btn-cookie[hidden] { display: none; }
.cookie-custom { grid-column: 1 / -1; justify-self: center; min-height: 40px; font-size: .92rem; }
.cookie.is-custom .cookie-actions { grid-template-columns: 1fr 1fr 1fr; }
.cookie.is-custom .cookie-custom { display: none; }

@media (max-width: 420px) {
	.cookie.is-custom .cookie-actions { grid-template-columns: 1fr 1fr; }
	.cookie.is-custom [data-consent="save"] { grid-column: 1 / -1; }
}

/* ---------- Lightbox ---------- */

.lightbox {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(17 14 11 / .96);
	color: var(--white);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgb(17 14 11 / .96); }

.lb-figure {
	margin: 0;
	padding: 64px 12px 24px;
	display: grid;
	justify-items: center;
	gap: .9rem;
	max-width: 100%;
	max-height: 100%;
}
.lb-img {
	max-width: min(100%, 1000px);
	max-height: calc(100dvh - 140px);
	width: auto;
	height: auto;
	border-radius: var(--radius-sm);
	box-shadow: 0 20px 60px rgb(0 0 0 / .5);
	touch-action: pan-y;
}
.lb-caption { font-size: .9rem; color: rgb(255 255 255 / .75); text-align: center; }

.lb-btn {
	position: fixed;
	display: grid;
	place-items: center;
	width: 48px; height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / .1);
	color: var(--white);
	cursor: pointer;
	transition: background-color .2s ease;
}
.lb-btn:hover { background: rgb(255 255 255 / .2); }
.lb-btn .icon { width: 24px; height: 24px; stroke-width: 2; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; }
.lb-next { right: 8px; }

@media (max-width: 599px) {
	/* sul telefono le frecce vanno in basso per non coprire la foto */
	.lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
	.lb-prev { left: calc(50% - 60px); }
	.lb-next { right: calc(50% - 60px); }
	.lb-figure { padding-bottom: 84px; }
	.lb-img { max-height: calc(100dvh - 200px); }
}
