/* Trullo Pettirosso — global CSS. Only what theme.json cannot express. */

/* Responsive tokens (breakpoints from the original design: 1024 / 767 / 575). */
:root {
	--tp-container-pad: 2rem;
	--tp-section-space: 6rem;
	--tp-split-gap: 4rem;
	--tp-stack-xl: 4rem;
	--tp-stack-lg: 3rem;
	--tp-stack-md: 1.5rem;
	--tp-intro-gap: 1.25rem;
	--tp-stack-sm: 1.5rem;
}
@media (max-width: 1024px) {
	:root { --tp-split-gap: 3rem; }
}
@media (max-width: 767px) {
	:root {
		--tp-stack-xl: 3rem;
		--tp-stack-lg: 2rem;
		--tp-stack-md: 1rem;
	}
}
@media (max-width: 575px) {
	:root {
		--tp-container-pad: 1rem;
		--tp-section-space: 4rem;
		--tp-intro-gap: 1rem;
		--tp-stack-sm: 1rem;
	}
}

/* Horizontal overflow from decorative elements is clipped (original sections had overflow:hidden). */
.wp-site-blocks { overflow-x: clip; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}
@media (max-width: 575px) {
	html { scroll-padding-top: 40px; }
}

body { -webkit-font-smoothing: antialiased; }

/* Text links inside content are underlined with offset. */
:where(.wp-block-paragraph, p) a {
	text-underline-offset: 0.15em;
	transition: var(--wp--custom--transition);
}

/* Visibility helpers for the header (desktop vs. mobile at 1024px). */
@media (max-width: 1024px) {
	.tp-hide-tablet { display: none !important; }
}
@media (min-width: 1025px) {
	.tp-show-tablet { display: none !important; }
}

/* Plain pages (Privacy Policy): same typography as the original default content. */
.tp-prose h1 { font-size: 2.4em; font-weight: 700; line-height: 1.4; letter-spacing: normal; }
.tp-prose h2 { font-size: 2.1em; font-weight: 700; line-height: 1.4; letter-spacing: normal; }
.tp-prose h3 { font-size: 1.8em; font-weight: 700; line-height: 1.4; letter-spacing: normal; }
.tp-prose .wp-block-post-content > * { margin-top: 0; margin-bottom: 0; }
.tp-prose .wp-block-post-content p { margin-bottom: 1.2em; }
.tp-prose .wp-block-post-content p:last-of-type { margin-bottom: 0; }
.tp-prose .wp-block-post-content p:last-of-type + :is(h1, h2, h3, h4, h5, h6) { margin-top: 1.2em; }

/* 404 */
.tp-404 {
	position: relative;
	overflow: hidden;
	min-height: 650px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
}
.tp-404::before {
	content: "";
	position: absolute;
	top: -5vh;
	left: 50%;
	transform: translateX(-50%);
	width: 48em;
	max-width: 100%;
	height: 80vh;
	background:
		radial-gradient(at center, rgba(0, 0, 0, 0.01) 0%, #fff 100%),
		url("../images/bg-pattern-404.svg") center / contain no-repeat;
	pointer-events: none;
}
.tp-404 > * { position: relative; z-index: 2; width: 100%; box-sizing: border-box; }
.tp-404 .wp-block-heading { line-height: 1.2; }
.tp-404 .tp-featured-icon {
	box-sizing: border-box;
	width: 3.5em;
	height: 3.5em;
	padding: 0.875em;
	border: 1px solid var(--wp--preset--color--gray-200);
	border-radius: 0.75em;
	background: var(--wp--preset--color--white);
	box-shadow: var(--wp--custom--shadow--xs-skeuomorphic);
}
.tp-404 .tp-featured-icon svg { width: 100%; height: 100%; }
@media (max-width: 575px) {
	.tp-404 { min-height: 400px; }
	.tp-404::before { min-width: 480px; }
	.tp-404 .tp-featured-icon { width: 3em; height: 3em; padding: 0.75em; }
}
/* Elevated Instagram Feed (via core/shortcode): "Load more" styled as a secondary XL button. */
.elevated-instagram-feed .transition-colors {
	padding: 0.75em 1.125em !important;
	font-size: 1rem;
	line-height: 1.5;
	gap: 0.5rem;
	color: var(--wp--preset--color--gray-700) !important;
	background-color: var(--wp--preset--color--white) !important;
	box-shadow: var(--wp--custom--shadow--button-secondary);
	border-radius: var(--wp--custom--radius--md) !important;
	font-weight: 600 !important;
}
.elevated-instagram-feed .transition-colors:hover {
	background-color: var(--wp--preset--color--gray-50) !important;
	color: var(--wp--preset--color--gray-800) !important;
}
/* Keep the feed's own top margin inside its box (prevents margin collapse). */
.elevated-instagram-feed-container { display: flow-root; }
