/* ==========================================================================
   F. Reniero à Cerealto
   ========================================================================== */

/* ---------- Font (self-hosted, nessuna chiamata a Google) ---------- */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/cormorant-garamond-v21-latin-300.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-v21-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/cormorant-garamond-v21-latin-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-v21-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/jost-v20-latin-300.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jost-v20-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/jost-v20-latin-500.woff2") format("woff2"); }

/* ---------- Variabili ---------- */
:root {
	--ink: #15120f;
	--night: #1e1a16;
	--brown: #3b362d;
	--tan: #8c7663;
	--cream: #efe9e0;
	--paper: #f6f2ec;
	--on-dark: rgba(239, 233, 224, 0.92);
	--on-dark-soft: rgba(239, 233, 224, 0.62);
	--on-light: #2b2620;
	--on-light-soft: #6b6156;

	--serif: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
	--sans: "Jost", "Helvetica Neue", Arial, sans-serif;

	--gutter: clamp(20px, 5vw, 72px);
	--section: clamp(88px, 14vw, 200px);
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--ink);
	color: var(--on-dark);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
address { font-style: normal; }
h1, h2, h3 { margin: 0; font-weight: 300; }
p { margin: 0; }

.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-link {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--cream); color: var(--ink); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 16px; }
:focus-visible { outline: 1px solid var(--tan); outline-offset: 4px; }

/* ---------- Tipografia ---------- */
.eyebrow {
	font-family: var(--sans);
	font-size: 11.5px;
	font-weight: 400;
	letter-spacing: .32em;
	text-transform: uppercase;
	color: var(--tan);
	margin-bottom: 28px;
}
.h2 {
	font-family: var(--serif);
	font-weight: 300;
	font-size: clamp(36px, 4.6vw, 64px);
	line-height: 1.08;
	letter-spacing: -.005em;
	margin-bottom: 28px;
	text-wrap: balance;
}
.body {
	max-width: 30em;
	color: var(--on-dark-soft);
	text-wrap: pretty;
}
.rule {
	display: block;
	width: 1px;
	height: 64px;
	margin: 0 auto 40px;
	background: currentColor;
	opacity: .35;
}

/* ---------- Bottone ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 52px;
	padding: 14px 34px;
	border: 1px solid currentColor;
	font-family: var(--sans);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .26em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	transition: background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.btn:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---------- Barra in alto ---------- */
.bar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px var(--gutter);
	transition: background-color .5s var(--ease), padding .5s var(--ease), opacity .5s var(--ease), transform .5s var(--ease);
}
.bar__logo { display: block; transition: opacity .3s var(--ease); }
.bar__logo:hover { opacity: .75; }
.bar__logo img { width: clamp(118px, 12vw, 150px); height: auto; filter: drop-shadow(0 1px 10px rgba(0, 0, 0, .35)); }
.bar.is-scrolled .bar__logo img, .bar--solid .bar__logo img { filter: none; }
.bar__link {
	font-size: 11.5px;
	letter-spacing: .3em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--on-dark);
}
.bar__link:hover { color: var(--cream); text-decoration: underline; }
.bar:not(.is-scrolled) .bar__link { text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.bar.is-scrolled { background: rgba(21, 18, 15, .92); padding-top: 14px; padding-bottom: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bar--solid { position: sticky; background: var(--ink); }
.admin-bar .bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .bar { top: 46px; } .admin-bar .bar.is-scrolled { top: 0; } }

/* ---------- Apertura ---------- */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	background: var(--ink);
	overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(21,18,15,.35) 0%, rgba(21,18,15,0) 22%, rgba(21,18,15,0) 48%, rgba(21,18,15,.88) 100%);
}
.hero__text {
	position: relative;
	align-self: end;
	padding: 0 var(--gutter) 40px;
	text-align: center;
}
.hero__mark { display: none; }
.hero__title {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(21px, 5.6vw, 26px);
	line-height: 1.35;
	color: var(--cream);
	max-width: 22em;
	margin: 0 auto;
	text-wrap: balance;
}
.hero .eyebrow { color: var(--on-dark-soft); margin-bottom: 16px; }
.hero__scroll {
	display: block;
	width: 44px;
	height: 56px;
	margin: 26px auto 0;
	position: relative;
}
.hero__scroll span {
	position: absolute; left: 50%; top: 6px;
	width: 1px; height: 44px; background: var(--on-dark-soft);
	transform-origin: top;
	animation: scroll-line 2.6s var(--ease) infinite;
}
@keyframes scroll-line {
	0% { transform: scaleY(0); opacity: 1; }
	55% { transform: scaleY(1); opacity: 1; }
	100% { transform: scaleY(1); opacity: 0; }
}

@media (min-width: 900px) {
	.hero { grid-template-columns: 1fr minmax(380px, 42%); }
	.hero__media { position: relative; inset: auto; grid-column: 2; grid-row: 1; height: 100vh; height: 100svh; }
	.hero__media::after { background: linear-gradient(90deg, rgba(21,18,15,.55) 0%, rgba(21,18,15,0) 30%); }
	.hero__text {
		grid-column: 1; grid-row: 1;
		align-self: center;
		padding: 120px var(--gutter);
		display: flex; flex-direction: column; align-items: center;
	}
	.hero__mark { display: block; width: clamp(120px, 11vw, 170px); height: auto; margin-bottom: 48px; }
	.hero .eyebrow { margin-bottom: 28px; }
	.hero__title { font-size: clamp(26px, 2.25vw, 36px); max-width: 19em; }
	.hero__scroll { margin-top: 56px; }
}

/* ---------- Il vignaiolo (foto a tutta larghezza) ---------- */
.portrait { position: relative; background: var(--ink); }
.portrait__media { aspect-ratio: 3 / 2; overflow: hidden; }
.portrait__img { width: 100%; height: 100%; object-fit: cover; object-position: 35% center; }
.portrait__text { padding: 56px var(--gutter) var(--section); }

@media (min-width: 900px) {
	.portrait { min-height: 100vh; display: flex; align-items: center; }
	.portrait__media { position: absolute; inset: 0; aspect-ratio: auto; }
	.portrait__media::after {
		content: ""; position: absolute; inset: 0;
		background: linear-gradient(90deg, rgba(21,18,15,0) 45%, rgba(21,18,15,.55) 75%, rgba(21,18,15,.75) 100%);
	}
	.portrait__text {
		position: relative;
		margin-left: auto;
		width: min(36%, 480px);
		margin-right: var(--gutter);
		padding: 0;
	}
}

/* ---------- Piè di pagina: contatti e dati aziendali ---------- */
.footer {
	background: var(--ink);
	padding: clamp(80px, 11vw, 150px) var(--gutter) 48px;
	text-align: center;
	color: var(--on-dark-soft);
}
.footer__mark { width: 84px; height: auto; margin: 0 auto 40px; }
.footer__contacts {
	font-family: var(--serif);
	font-size: clamp(20px, 2.1vw, 25px);
	line-height: 1.5;
	color: var(--on-dark);
}
.footer__reach {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 32px;
	margin-top: 18px;
}
.footer__contacts a {
	text-decoration: none;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
	transition: background-size .5s var(--ease);
}
.footer__contacts a:hover { background-size: 100% 1px; }
.footer__rule { display: block; width: 48px; height: 1px; margin: 48px auto 32px; background: currentColor; opacity: .3; }
.footer__legal { font-size: 12.5px; letter-spacing: .04em; line-height: 1.8; margin-bottom: 14px; }
.footer__links { font-size: 12.5px; letter-spacing: .04em; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }

/* ---------- Pagine generiche (es. Privacy) ---------- */
.doc { background: var(--paper); color: var(--on-light); padding: clamp(64px, 10vw, 140px) var(--gutter); }
.doc__article { max-width: 720px; margin: 0 auto; }
.doc__title { font-family: var(--serif); font-size: clamp(36px, 5vw, 56px); line-height: 1.1; margin-bottom: 40px; }
.doc__content h2 { font-family: var(--serif); font-size: 30px; margin: 48px 0 16px; }
.doc__content h3 { font-family: var(--serif); font-size: 23px; margin: 32px 0 12px; }
.doc__content p, .doc__content ul, .doc__content ol { margin: 0 0 18px; }

/* ---------- Pagina Etichetta QR ---------- */
.label-page { background: var(--ink); }
.label {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 24px;
	text-align: center;
}
.label__mark { width: 112px; height: auto; margin-bottom: 36px; }
.label__logo { width: min(260px, 70vw); height: auto; }
.label .rule { margin: 40px auto 32px; height: 48px; }
.label__title {
	font-family: var(--serif);
	font-weight: 300;
	font-size: clamp(30px, 8vw, 44px);
	line-height: 1.15;
	color: var(--cream);
	margin-bottom: 40px;
	text-wrap: balance;
}
.label__btn { max-width: 100%; padding: 16px 26px; letter-spacing: .2em; color: var(--cream); }
.label__notice { max-width: 22em; font-size: 14px; color: var(--on-dark-soft); }
.label__legal {
	margin-top: 56px;
	font-size: 11.5px;
	line-height: 1.8;
	letter-spacing: .04em;
	color: var(--on-dark-soft);
}

/* ---------- Animazioni all'ingresso ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.js .reveal { opacity: 1; transform: none; transition: none; }
	.hero__scroll span { animation: none; transform: none; }
}
