/*
 * Author: Luca Arzilli, ALSolutions
 * Project Name: Tenuta Di Vaira - Olio
 */

body.tdv-page-olio {
	--tdv-olio-fixedbar-offset: 100px;
	background-color: #fff;
}

body.tdv-page-olio .tdv-fixedbar {
	--tdv-fixedbar-fg: #791712;
	--tdv-fixedbar-bg: #fff;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

body.tdv-page-olio .tdv-fixedbar__inner {
	min-height: var(--tdv-olio-fixedbar-offset);
}

body.tdv-page-olio .tdv-fixedbar__logo--light {
	opacity: 0;
	pointer-events: none;
}

body.tdv-page-olio .tdv-fixedbar__logo--dark {
	opacity: 1;
	pointer-events: auto;
}

body.tdv-page-olio .tdv-fixedbar__icon-btn--globe:hover,
body.tdv-page-olio .tdv-fixedbar__icon-btn--globe:focus-visible {
	color: #791712;
	opacity: 0.75;
}

.tdv-olio-hero {
	position: relative;
	width: 100vw;
	height: 75vh;
	margin-top: var(--tdv-olio-fixedbar-offset);
	border-style: solid;
	border-color: #fff;
	border-width: 20px 20px 0;
	overflow: hidden;
	background: #000;
	box-sizing: border-box;
	--tdv-olio-hero-duration: 16s;
	--tdv-olio-hero-title-delay: 1.4s;
	--tdv-olio-hero-title-duration: 1.1s;
}

.tdv-olio-hero__background {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: url("../img/olio/TENUTADIVAIRA-OLIO-HEADER.webp");
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	will-change: opacity;
	animation: tdv-olio-hero-emerge var(--tdv-olio-hero-duration) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tdv-olio-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: rgba(0, 0, 0, 0.3);
	pointer-events: none;
	animation: tdv-olio-hero-overlay-in calc(var(--tdv-olio-hero-duration) * 0.88) ease-out forwards;
}

.tdv-olio-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 2rem 8vw;
}

.tdv-olio-hero__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: "Montserrat", sans-serif;
	font-optical-sizing: auto;
	font-weight: 500;
	font-style: normal;
	font-size: clamp(20px, 3.4vw, 34px);
	letter-spacing: 8px;
	text-transform: uppercase;
	text-align: center;
	line-height: 1;
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
	opacity: 0;
	transform: translateY(14px);
	animation: tdv-olio-hero-title-in var(--tdv-olio-hero-title-duration) cubic-bezier(0.22, 1, 0.36, 1) var(--tdv-olio-hero-title-delay) forwards;
}

@keyframes tdv-olio-hero-emerge {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

@keyframes tdv-olio-hero-overlay-in {
	0% {
		background-color: rgba(0, 0, 0, 0.75);
	}
	100% {
		background-color: rgba(0, 0, 0, 0.3);
	}
}

@keyframes tdv-olio-hero-title-in {
	0% {
		opacity: 0;
		transform: translateY(14px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdv-olio-hero__background,
	.tdv-olio-hero__overlay,
	.tdv-olio-hero__title {
		animation: none;
	}

	.tdv-olio-hero__background {
		opacity: 1;
	}

	.tdv-olio-hero__overlay {
		background-color: rgba(0, 0, 0, 0.3);
	}

	.tdv-olio-hero__title {
		opacity: 1;
		transform: none;
	}
}

.tdv-olio-contenuto {
	position: relative;
	width: 100vw;
	max-width: 100%;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
	background-color: #faf4f3;
	border-left: 20px solid #fff;
	border-right: 20px solid #fff;
}

.tdv-olio-contenuto__inner {
	max-width: 1300px;
	margin: 0 auto;
	padding: 110px 20px;
	box-sizing: border-box;
}

.tdv-olio-contenuto__intro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: 80px;
}

.tdv-olio-contenuto__title {
	margin: 0;
	font-family: "EB Garamond", serif;
	font-style: italic;
	font-weight: 300;
	font-size: clamp(20px, 3vw, 34px);
	line-height: 1.25;
	text-transform: none;
	color: #791712;
	letter-spacing: 0;
	text-align: center;
}

.tdv-olio-contenuto__text {
	margin: 0;
	max-width: none;
	text-align: center;
	padding-inline: clamp(0px, 12vw, 100px);
}

.tdv-olio-contenuto__prodotti {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
	align-items: stretch;
	max-width: 960px;
	margin: 0 auto;
}

.tdv-olio-contenuto__box {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.tdv-olio-contenuto__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
	border: 1px solid #791712;
	background-color: #fff;
}

.tdv-olio-contenuto__image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.tdv-olio-contenuto__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 28px 20px;
	box-sizing: border-box;
	background-color: #fff;
	text-align: center;
}

.tdv-olio-contenuto__desc {
	margin: 0 0 8px;
	padding-inline: clamp(0px, 2vw, 16px);
}

.tdv-olio-contenuto__spec {
	margin: 0;
}

.tdv-olio-contenuto__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	margin-top: 12px;
	padding: 12px 28px;
	border: 1px solid #791712;
	border-radius: 2px;
	background: #791712;
	color: #fff !important;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tdv-olio-contenuto__cta:hover,
.tdv-olio-contenuto__cta:focus-visible {
	background: #8f241d;
	border-color: #8f241d;
	color: #fff !important;
	outline: none;
}

@media (max-width: 900px) {
	.tdv-olio-contenuto__inner {
		padding: 80px 20px;
	}

	.tdv-olio-contenuto__intro {
		margin-bottom: 48px;
	}

	.tdv-olio-contenuto__prodotti {
		grid-template-columns: 1fr;
		gap: 28px;
		max-width: 440px;
	}

	.tdv-olio-contenuto__media {
		padding: 20px;
	}

	.tdv-olio-contenuto__body {
		padding: 32px 24px;
	}
}

.tdv-olio-reveal {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition: opacity 0.9s ease, transform 0.9s ease;
	will-change: opacity, transform;
}

.tdv-olio-reveal--delay-1 {
	transition-delay: 0.12s;
}

.tdv-olio-reveal--delay-2 {
	transition-delay: 0.24s;
}

.tdv-olio-reveal.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
	.tdv-olio-reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
