html.hahn-home-modal-open,
.hahn-home-modal-open body {
	overflow: hidden;
}

.hahn-home-modal {
	box-sizing: border-box;
	width: min(42rem, calc(100% - 2rem));
	max-width: none;
	max-height: calc(100dvh - 2rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 0.5rem;
	background: var(--wp--preset--color--white, #fff);
	color: var(--wp--preset--color--black, #333);
	font-family: inherit;
	overflow: auto;
	overscroll-behavior: contain;
	box-shadow: 0 1rem 4rem #0004;
}

.hahn-home-modal:not([open]) {
	display: none;
}

.hahn-home-modal::backdrop {
	background: #0009;
}

.hahn-home-modal__close {
	position: sticky;
	top: 0.5rem;
	z-index: 1;
	display: block;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0.5rem 0.5rem -3.25rem auto;
	padding: 0;
	border: 1px solid #333;
	border-radius: 50%;
	background: #fff;
	color: #333;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.hahn-home-modal :focus-visible {
	outline: 3px solid var(--wp--preset--color--primary, #c8102e);
	outline-offset: 3px;
}

.hahn-home-modal > .hahn-home-modal__image {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
}

.hahn-home-modal__body {
	display: grid;
	gap: 1rem;
	padding: 3.75rem clamp(1.25rem, 4vw, 2.5rem) 2rem;
	overflow-wrap: anywhere;
}

.hahn-home-modal__image + .hahn-home-modal__body {
	padding-top: 2rem;
}

.hahn-home-modal__body > *,
.hahn-home-modal__content > :first-child {
	margin-top: 0;
}

.hahn-home-modal__body > *,
.hahn-home-modal__content > :last-child {
	margin-bottom: 0;
}

.hahn-home-modal__eyebrow {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hahn-home-modal #hahn-home-modal-title {
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.15;
}

/* Start the backdrop first, then fade and lift the announcement into place. */
.hahn-home-modal[open]::backdrop {
	animation: hahn-home-modal-backdrop-in 200ms ease-out both;
}

.hahn-home-modal[open] {
	animation: hahn-home-modal-in 300ms ease-out 150ms both;
}

@keyframes hahn-home-modal-backdrop-in {

	from {
		background: #0000;
	}

	to {
		background: #0009;
	}
}

@keyframes hahn-home-modal-in {

	from {
		opacity: 0;
		transform: translateY(16px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Compact, nonmodal alternative anchored above the viewport's bottom edge. */
.hahn-home-modal--slide-up {
	position: fixed;
	inset: auto 1rem max(1rem, env(safe-area-inset-bottom)) auto;
	z-index: 9999;
	width: min(24rem, calc(100% - 2rem));
	max-height: min(36rem, calc(100dvh - 2rem));
	margin: 0;
	box-shadow: 0 0.5rem 2rem #0003;
	font-size: 0.9375rem;
}

.hahn-home-modal--slide-up[open] {
	animation: hahn-home-modal-slide-up 350ms ease-out both;
}

.hahn-home-modal--slide-up > .hahn-home-modal__image {
	height: 10rem;
	object-fit: cover;
}

.hahn-home-modal--slide-up .hahn-home-modal__body {
	gap: 0.75rem;
	padding: 3.75rem 1.25rem 1.25rem;
}

.hahn-home-modal--slide-up .hahn-home-modal__image + .hahn-home-modal__body {
	padding-top: 1.25rem;
}

.hahn-home-modal--slide-up #hahn-home-modal-title {
	font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.hahn-home-modal--slide-up .wp-block-button__link {
	padding: 0.75rem 1.25rem;
	font-size: 0.9375rem;
}

@keyframes hahn-home-modal-slide-up {

	from {
		opacity: 0;
		transform: translateY(calc(100% + 2rem));
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {

	.hahn-home-modal[open],
	.hahn-home-modal[open]::backdrop {
		animation: none;
	}
}
