/*
 * Dalla Terra alla Forma — structural exceptions.
 *
 * Page composition, spacing, colors and typography belong to Gutenberg block
 * attributes and theme.json. Keep this file limited to relationships that
 * WordPress Core blocks cannot currently express.
 */

@font-face {
	font-family: "DTF Garamond";
	src: url("../fonts/EBGaramond-Variable.ttf") format("truetype");
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
}

@font-face {
	font-family: "DTF Garamond";
	src: url("../fonts/EBGaramond-Italic-Variable.ttf") format("truetype");
	font-style: italic;
	font-weight: 400 800;
	font-display: swap;
}

@font-face {
	font-family: "DTF Manrope";
	src: url("../fonts/Manrope-Variable.ttf") format("truetype");
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
}

body {
	--wp--preset--font-family--system-sans: "DTF Manrope", sans-serif;
	--wp--preset--font-family--heading: "DTF Garamond", Georgia, serif;
	font-family: var(--wp--preset--font-family--system-sans);
	font-size: clamp(1rem, .25vw + .94rem, 1.075rem);
	line-height: 1.7;
}

.dtf-overlay-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--wp--preset--font-family--heading);
}

.dtf-overlay-header {
	position: sticky;
	top: 0;
	z-index: 20;
	height: 0;
}

.dtf-overlay-header .dtf-site-header {
	position: absolute;
	inset: 0 0 auto;
	width: 100%;
}

.dtf-site-header {
	color: var(--wp--preset--color--on-primary);
}

.dtf-site-header a {
	color: inherit;
	text-decoration: none;
}

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

.dtf-site-header__utility a,
.dtf-site-header__main .wp-block-site-title a,
.dtf-site-header__main .wp-block-navigation-item__content,
.dtf-site-footer .wp-block-navigation-item__content {
	display: inline-flex;
	min-height: 24px;
	align-items: center;
}

.dtf-site-header__main .wp-block-navigation-item__content,
.dtf-site-footer .wp-block-navigation-item__content {
	padding-block: 4px;
}

.dtf-site-header__nav {
	font-size: .86rem !important;
	font-weight: 650;
}

.dtf-site-header__nav .wp-block-navigation__container {
	column-gap: clamp(1.25rem, 2.4vw, 2.75rem);
}

.dtf-site-header__utility {
	background: color-mix(in srgb, var(--wp--preset--color--primary-strong) 88%, transparent);
	border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.dtf-site-header__utility p,
.dtf-site-header__main p {
	margin-block: 0;
}

.dtf-site-header__main {
	background: color-mix(in srgb, var(--wp--preset--color--foreground) 90%, transparent);
	backdrop-filter: blur(10px);
}

.dtf-site-header .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: currentColor;
	color: inherit;
}

.dtf-site-footer a {
	color: inherit;
}

.dtf-site-footer .wp-block-site-title a,
.dtf-site-footer .wp-block-navigation a {
	text-decoration: none;
}

.dtf-site-footer .wp-block-navigation a:hover,
.dtf-site-footer .wp-block-navigation a:focus-visible {
	color: var(--wp--preset--color--primary);
}

.dtf-page-lead {
	max-width: 24ch;
	margin-inline: auto;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.65rem, 2.8vw, 2.6rem) !important;
	line-height: 1.24;
}

.wp-block-post-content {
	position: relative;
	isolation: isolate;
	background-image:
		radial-gradient(circle at 20% 30%, rgb(77 52 37 / 3.5%) 0 .7px, transparent .9px),
		radial-gradient(circle at 72% 64%, rgb(125 82 50 / 3%) 0 .6px, transparent .85px);
	background-size: 17px 19px, 29px 31px;
}

.wp-block-post-content::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: 2rem;
	right: 0;
	width: min(42vw, 34rem);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, rgb(225 149 91 / 10%), transparent 70%);
	pointer-events: none;
}

.wp-block-post-content > .wp-block-image.alignwide:first-of-type {
	aspect-ratio: 2 / 1;
	overflow: hidden;
}

.wp-block-post-content > .wp-block-image.alignwide:first-of-type img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wp-block-details {
	padding-block: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

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

main a:not(.wp-element-button):visited {
	color: var(--wp--preset--color--primary-strong);
}

@media (max-width: 900px) {
	.dtf-site-header__utility {
		display: none !important;
	}

	.dtf-site-header__main {
		padding-block: 1rem !important;
	}

	.dtf-site-header__main > .wp-block-buttons {
		display: none;
	}

	.dtf-site-header .wp-block-navigation__responsive-container-open {
		display: inline-flex;
		width: 44px;
		height: 44px;
		align-items: center;
		justify-content: center;
	}

	.wp-block-post-content > .wp-block-image.alignwide:first-of-type {
		aspect-ratio: 4 / 3;
	}
}

@media (prefers-reduced-transparency: reduce) {
	.dtf-site-header__main {
		background: var(--wp--preset--color--foreground);
		backdrop-filter: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.animated,
	.hidden-animated {
		animation: none !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}
}
