/*
Theme Name: TerraDiretta Agriculture
Theme URI: https://terradiretta.it/
Author: TerraDiretta
Description: Lightweight block theme for agricultural businesses, agritourism and producers.
Version: 0.2.0
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: terradiretta-agriculture
*/

:where(html) {
	scroll-behavior: smooth;
}

body {
	text-wrap: pretty;
}

.td-skip-link {
	background: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
	left: 1rem;
	padding: 0.75rem 1rem;
	position: fixed;
	top: -10rem;
	z-index: 100000;
}

.td-skip-link:focus {
	top: 1rem;
}

:where(a, button, input, textarea, select, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

.td-site-header {
	backdrop-filter: blur(14px);
	background: color-mix(in srgb, var(--wp--preset--color--background) 92%, transparent);
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--foreground) 12%, transparent);
	position: relative;
	z-index: 20;
}

.td-site-header .wp-block-navigation {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 650;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
}

.td-section {
	padding-block: var(--wp--preset--spacing--70);
}

.td-section--compact {
	padding-block: var(--wp--preset--spacing--50);
}

.td-section--soft {
	background: var(--wp--preset--color--surface);
}

.td-section--contrast {
	background: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

.td-eyebrow {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 750;
	letter-spacing: 0.12em;
	margin-bottom: var(--wp--preset--spacing--20);
	text-transform: uppercase;
}

.td-section--contrast .td-eyebrow {
	color: var(--wp--preset--color--secondary);
}

.td-lead {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
}

.td-hero {
	background:
		radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent), transparent 38%),
		linear-gradient(145deg, var(--wp--preset--color--background), var(--wp--preset--color--surface));
	min-height: min(78vh, 800px);
	overflow: hidden;
	padding-block: clamp(4rem, 10vw, 8rem);
}

.td-hero__content {
	position: relative;
	z-index: 2;
}

.td-visual-placeholder {
	align-items: flex-end;
	aspect-ratio: 4 / 3;
	background:
		linear-gradient(160deg, color-mix(in srgb, var(--wp--preset--color--primary) 72%, black), transparent 72%),
		radial-gradient(circle at 72% 22%, var(--wp--preset--color--secondary), transparent 30%),
		var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--large);
	box-shadow: var(--wp--custom--shadow--soft);
	display: flex;
	min-height: 18rem;
	overflow: hidden;
	padding: var(--wp--preset--spacing--40);
	position: relative;
}

.td-visual-placeholder::before,
.td-visual-placeholder::after {
	background: color-mix(in srgb, var(--wp--preset--color--background) 14%, transparent);
	border-radius: 50%;
	content: "";
	position: absolute;
}

.td-visual-placeholder::before {
	height: 16rem;
	right: -5rem;
	top: -4rem;
	width: 16rem;
}

.td-visual-placeholder::after {
	bottom: -8rem;
	height: 20rem;
	left: -7rem;
	width: 20rem;
}

.td-visual-placeholder p {
	background: color-mix(in srgb, var(--wp--preset--color--background) 90%, transparent);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--x-small);
	margin: 0;
	max-width: 20rem;
	padding: 0.7rem 1rem;
	position: relative;
	z-index: 2;
}

.td-card-grid {
	align-items: stretch;
}

.td-card {
	background: var(--wp--preset--color--background);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--foreground) 12%, transparent);
	border-radius: var(--wp--custom--radius--medium);
	box-shadow: var(--wp--custom--shadow--subtle);
	height: 100%;
	padding: var(--wp--preset--spacing--40);
}

.td-style-elegante-agriturismo .td-card,
.td-style-elegante-agriturismo .td-visual-placeholder {
	border-radius: var(--wp--custom--radius--small);
}

.td-style-moderno-produttore .td-card {
	box-shadow: none;
}

.td-style-moderno-produttore :where(h1, h2, h3) {
	letter-spacing: -0.025em;
}

.td-card__number {
	color: var(--wp--preset--color--accent);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1;
}

.td-stat {
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: var(--wp--preset--spacing--30);
}

.td-gallery-placeholder {
	aspect-ratio: 4 / 3;
	background:
		linear-gradient(140deg, color-mix(in srgb, var(--wp--preset--color--primary) 90%, black), var(--wp--preset--color--secondary));
	border-radius: var(--wp--custom--radius--medium);
	min-height: 14rem;
}

.td-gallery-placeholder.is-tall {
	aspect-ratio: 3 / 4;
}

.td-contact-list a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

.wp-block-details {
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--foreground) 16%, transparent);
	padding-block: var(--wp--preset--spacing--30);
}

.wp-block-details summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
}

.td-site-footer {
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--background) 20%, transparent);
}

@media (max-width: 781px) {
	.td-site-header {
		backdrop-filter: none;
		background: var(--wp--preset--color--background);
	}

	.wp-block-navigation__responsive-container.is-menu-open {
		padding: 2rem 1.25rem !important;
	}

	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list {
		align-items: flex-start !important;
	}

	.td-hero {
		min-height: auto;
		padding-block: var(--wp--preset--spacing--60);
	}

	.td-section {
		padding-block: var(--wp--preset--spacing--60);
	}

	.td-visual-placeholder {
		min-height: 14rem;
	}

	.td-hero > .wp-block-columns,
	.td-section > .wp-block-columns,
	.td-section > .wp-block-group {
		padding-inline: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(html) {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
