/*
 * Page-only behaviour: the fixed header and its spacer, states set by
 * assets/js/shell.js and the entrance animation. Never loaded in the editor
 * canvas, where the header must not cover the content and nothing may start
 * invisible. The layout at every width is assets/css/layout.css (page and
 * canvas).
 */

.wp-site-blocks {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 100px 0 0;

	/* The source fullcontainer clips full-bleed carousel overflow horizontally. */
	overflow-x: clip;
}

.wp-site-blocks > main {
	flex: 1;
	margin-top: 0;
}

.wp-site-blocks > footer,
.wp-block-post-content {
	margin-top: 0;
	margin-bottom: 0;
}

.wp-site-blocks header:has(> .is-style-shell-header) {
	position: fixed;
	z-index: 800;
	top: var(--wp-admin--admin-bar--height, 0);
	right: 0;
	left: 0;
	overflow: clip visible;
}

.wp-site-blocks .is-style-shell-header,
.wp-site-blocks .is-style-shell-header .is-style-shell-logo img {
	transition: all 0.3s ease-out;
}

/* The fixed shell's original spacer stays unchanged when its chrome shrinks. */
@media (width >= 992px) {
	.wp-site-blocks .is-style-shell-header[data-scrolled] {
		min-height: 80px;
		padding-block: 15px;
	}

	/* Core image dimensions are inline. */
	.wp-site-blocks .is-style-shell-header[data-scrolled] .is-style-shell-logo img {
		width: 65px !important;
		height: 50px !important;
	}
}

@media (width <= 991.98px) {
	.wp-site-blocks {
		padding-top: 70px;
	}

	.wp-site-blocks > main:not(:has(> :is(.wp-block-post-content, .is-style-image-hero, .is-style-plain-hero):first-child)) {
		padding-top: 30px;
	}
}

/*
 * Hero entrance, matched to the legacy AOS attributes (runs on load, CSS only so
 * nothing flashes before JS): page fade-down 0.1s; hero title fade (home) or
 * fade-up (other pages) after 0.2s; address / hero buttons fade-right after 0.6s
 * over 0.8s with ease-out-back.
 */
@keyframes brinkhotel-fade {
	from {
		opacity: 0;
	}
}

@keyframes brinkhotel-fade-up {
	from {
		opacity: 0;
		transform: translate3d(0, 100px, 0);
	}
}

@keyframes brinkhotel-fade-down {
	from {
		opacity: 0;
		transform: translate3d(0, -100px, 0);
	}
}

@keyframes brinkhotel-fade-right {
	from {
		opacity: 0;
		transform: translate3d(-100px, 0, 0);
	}
}

@keyframes brinkhotel-contact-icon {
	0%,
	50%,
	100% {
		transform: rotate(5deg);
	}

	25%,
	75% {
		transform: rotate(-5deg);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.wp-site-blocks {
		animation: brinkhotel-fade-down 0.1s ease backwards;
	}

	.is-style-home-hero-content > .is-style-hero-title {
		animation: brinkhotel-fade 0.4s ease 0.2s backwards;
	}

	.is-style-hero-title-row,
	.is-style-hero-content > .is-style-hero-title,
	.is-style-plain-hero-content > .is-style-hero-title {
		animation: brinkhotel-fade-up 0.4s ease 0.2s backwards;
	}

	.is-style-hero-location,
	.is-style-hero-buttons {
		animation: brinkhotel-fade-right 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.6s backwards;
	}

	:is(.is-style-contact-address, .is-style-contact-telephone, .is-style-contact-email) a:hover::before {
		animation: brinkhotel-contact-icon 0.6s linear;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks .is-style-shell-header,
	.wp-site-blocks .is-style-shell-header .is-style-shell-logo img {
		transition: none;
	}
}
