/*
 * Enter.Net motion layer.
 *
 * - Logo carousel: 500ms slide, 5000ms autoplay, 10px gap, 4/3/2 per view.
 * - Cover parallax: background translateY, layer about 140% tall, scale 1.42.
 * - Optional gold button utility. Hover, focus, and active darken it. Transition 0.3s.
 * - Accordion: 300ms, cubic-bezier(0, 0.49, 0.27, 0.99), plus/minus.
 *
 * Only transform and opacity animate. Nothing is opacity:0 at first paint.
 */

:focus-visible {
	outline: 3px solid #98752c;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
		scroll-padding-top: var(--en-scroll-offset, 5rem);
	}
}

/* -------------------------------------------------------------------------
 * Logo carousel. The row is already one line, fixed height, before JS.
 * ---------------------------------------------------------------------- */

.en-carousel {
	--en-per-view: 4;
	--en-gap: 10px;
	--en-carousel-height: 176px;
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-wrap: nowrap !important;
	align-items: stretch;
	gap: var(--en-gap);
	height: var(--en-carousel-height);
	min-height: var(--en-carousel-height);
	max-height: var(--en-carousel-height);
	margin: 0;
	padding: 52px 60px 12px;
	overflow: hidden;
}

@media (max-width: 1024px) {
	.en-carousel {
		--en-per-view: 3;
	}
}

@media (max-width: 767px) {
	.en-carousel {
		--en-per-view: 2;
	}
}

.en-carousel > ul {
	display: flex;
	flex-wrap: nowrap !important;
	align-items: stretch;
	gap: var(--en-gap);
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.en-carousel > .wp-block-image,
.en-carousel > ul > .blocks-gallery-item,
.en-carousel > ul > li {
	flex: 0 0 calc((100% - (var(--en-per-view) - 1) * var(--en-gap)) / var(--en-per-view)) !important;
	width: calc((100% - (var(--en-per-view) - 1) * var(--en-gap)) / var(--en-per-view)) !important;
	max-width: none !important;
	min-width: 0;
	min-height: 0;
	height: 100%;
	margin: 0 !important;
	box-sizing: border-box;
	overflow: hidden;
}

.en-carousel .wp-block-image a,
.en-carousel .blocks-gallery-item figure,
.en-carousel .blocks-gallery-item a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.en-carousel img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.en-carousel__controls {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

.en-carousel__controls button {
	position: absolute;
	pointer-events: auto;
	box-sizing: border-box;
	margin: 0;
	border: 0;
	background: #591a22;
	color: #e0e0e0;
	cursor: pointer;
	line-height: 1;
}

.en-carousel__prev,
.en-carousel__next {
	top: 50%;
	width: 44px;
	height: 44px;
	font-size: 28px;
	transform: translateY(-50%);
}

.en-carousel__prev {
	left: 8px;
}

.en-carousel__next {
	right: 8px;
}

.en-carousel__pause {
	top: 8px;
	left: 50%;
	min-width: 5.5rem;
	min-height: 36px;
	padding: 8px 12px;
	font-size: 16px;
	font-weight: 700;
	transform: translateX(-50%);
}

.en-carousel button:focus-visible {
	outline: 2px solid #e0e0e0;
	outline-offset: -4px;
}

.en-carousel__live {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------------------
 * Cover parallax. Scale is part of the effect so the translated image
 * never reveals a gap. It is a transform, so it does not change layout.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) and (min-width: 782px) and (hover: hover) {
	.en-parallax {
		overflow: hidden;
	}

	.en-parallax .wp-block-cover__image-background {
		transform: scale(1.42);
		transform-origin: center center;
		will-change: transform;
	}
}

/* -------------------------------------------------------------------------
 * Fade up. Opacity stays 1. The 12px settle is added only after scroll.
 * ---------------------------------------------------------------------- */

.en-fade-up {
	opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
	.en-fade-up.is-pending {
		transform: translateY(12px);
	}

	.en-fade-up.is-pending.is-settling {
		transform: translateY(0);
		transition: transform 0.6s ease;
	}
}

/* -------------------------------------------------------------------------
 * Hovers. 0.3s.
 * ---------------------------------------------------------------------- */

.wp-block-button.en-btn-gold .wp-block-button__link,
.wp-block-button.en-btn-gold .wp-element-button,
a.en-btn-gold,
button.en-btn-gold {
	background-color: #98752c;
	color: #fff;
	border-radius: 0;
	font-weight: 900;
	font-size: 19px;
	letter-spacing: 1px;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
	padding: 15px 25px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

/*
 * Kadence global.min.css sets `background` (the shorthand) on
 * .wp-block-button__link:hover/:focus/:active and the same states of
 * .wp-element-button. Declare `background` here too, at a higher
 * specificity, so the palette hover color does not stick.
 */
.wp-block-button.en-btn-gold .wp-block-button__link:hover,
.wp-block-button.en-btn-gold .wp-block-button__link:focus-visible,
.wp-block-button.en-btn-gold .wp-block-button__link:focus,
.wp-block-button.en-btn-gold .wp-block-button__link:active,
.wp-block-button.en-btn-gold .wp-element-button:hover,
.wp-block-button.en-btn-gold .wp-element-button:focus-visible,
.wp-block-button.en-btn-gold .wp-element-button:focus,
.wp-block-button.en-btn-gold .wp-element-button:active,
a.en-btn-gold:hover,
a.en-btn-gold:focus-visible,
a.en-btn-gold:focus,
a.en-btn-gold:active,
button.en-btn-gold:hover,
button.en-btn-gold:focus-visible,
button.en-btn-gold:focus,
button.en-btn-gold:active {
	background: #7c5d1c;
	background-color: #7c5d1c;
	color: #fff;
}

.wp-block-image.en-tile {
	position: relative;
}

.wp-block-image.en-tile::before,
.wp-block-cover.en-tile:not(:has(.wp-block-cover__background))::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0.3;
	transition: opacity 0.3s ease;
	pointer-events: none;
	z-index: 1;
}

.wp-block-image.en-tile:hover::before,
.wp-block-image.en-tile:focus-within::before,
.wp-block-cover.en-tile:not(:has(.wp-block-cover__background)):hover::before,
.wp-block-cover.en-tile:not(:has(.wp-block-cover__background)):focus-within::before {
	opacity: 0.45;
}

.wp-block-image.en-tile figcaption,
.wp-block-cover.en-tile .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
}

.en-tile > .wp-block-cover__background {
	transition: opacity 0.3s ease;
}

/*
 * Core cover CSS (wp-includes/blocks/cover/style.css) sets the dim on
 * .wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-NN.
 * These selectors add .en-tile and :hover / :focus-within so the overlay
 * actually changes. Image tiles keep the ::before rules above.
 */
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-10,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-10 { opacity: 0.25; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-20,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-20 { opacity: 0.35; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-30,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-30 { opacity: 0.45; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-40,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-40 { opacity: 0.55; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-50,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-50 { opacity: 0.65; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-60,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-60 { opacity: 0.75; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-70,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-70 { opacity: 0.85; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-80,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-80 { opacity: 0.95; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-90,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-90 { opacity: 1; }
.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim-100,
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim-100 { opacity: 1; }

.wp-block-cover.en-tile:hover > .wp-block-cover__background.has-background-dim:not([class*="has-background-dim-"]),
.wp-block-cover.en-tile:focus-within > .wp-block-cover__background.has-background-dim:not([class*="has-background-dim-"]) {
	opacity: 0.65;
}

/* Cover that fills a stretched column, like a column background-size: cover. */
.wp-block-column:has(> .wp-block-cover.en-fill-col) {
	display: flex;
	flex-direction: column;
}

.wp-block-cover.en-fill-col {
	flex: 1 1 auto;
	width: 100%;
	min-height: 100%;
}

.site-footer a,
#colophon a,
.site-top-footer-wrap a,
.site-middle-footer-wrap a,
.site-bottom-footer-wrap a,
footer a,
.site-top-header-wrap a,
#top-bar a,
.top-bar a {
	transition: color 0.3s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible,
#colophon a:hover,
#colophon a:focus-visible,
.site-top-footer-wrap a:hover,
.site-top-footer-wrap a:focus-visible,
.site-middle-footer-wrap a:hover,
.site-middle-footer-wrap a:focus-visible,
.site-bottom-footer-wrap a:hover,
.site-bottom-footer-wrap a:focus-visible,
footer a:hover,
footer a:focus-visible {
	color: #591a22;
}

.site-top-header-wrap a:hover,
.site-top-header-wrap a:focus-visible,
#top-bar a:hover,
#top-bar a:focus-visible,
.top-bar a:hover,
.top-bar a:focus-visible {
	color: #e9d9db;
}

/* -------------------------------------------------------------------------
 * Sticky header slide-in on Kadence's fixed row.
 * Transform only, and only on the sticky element, so the placeholder
 * Kadence reserves does not move. Body class en-header-slide gates it.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	body.en-header-slide #masthead .kadence-sticky-header.en-header-sliding {
		transition: none;
		transform: translateY(-100%);
	}

	body.en-header-slide #masthead .kadence-sticky-header.en-header-slide-in {
		transition: transform 400ms ease-out;
		transform: translateY(0);
	}
}

/* -------------------------------------------------------------------------
 * Sticky header hide-on-scroll. Transform only, so layout height stays.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	body.en-header-autohide #masthead.item-is-fixed,
	body.en-header-autohide #masthead .item-is-fixed,
	body.en-header-autohide #masthead .item-is-stuck,
	body.en-header-autohide #masthead .kadence-sticky-header {
		transition: transform 0.5s ease;
		transform: translateY(0);
	}

	body.en-header-autohide.en-header-hidden #masthead.item-is-fixed,
	body.en-header-autohide.en-header-hidden #masthead .item-is-fixed,
	body.en-header-autohide.en-header-hidden #masthead .item-is-stuck,
	body.en-header-autohide.en-header-hidden #masthead .kadence-sticky-header {
		transform: translateY(-100%);
	}
}

/* -------------------------------------------------------------------------
 * Details accordion. Native open/close. Plus/minus on the summary.
 * ---------------------------------------------------------------------- */

.wp-block-details > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 44px;
	padding: 15px 20px;
	border-bottom: 3px solid #98752c;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details > summary::marker {
	content: "";
}

.wp-block-details > summary::after {
	content: "+";
	flex: 0 0 auto;
	font-weight: 400;
	font-size: 1.25rem;
	line-height: 1;
}

.wp-block-details[open] > summary::after {
	content: "\2212";
}

.wp-block-details + .wp-block-details {
	margin-top: 10px;
}

.wp-block-details > :not(summary) {
	padding: 15px 20px 0;
}

@supports (interpolate-size: allow-keywords) {
	.wp-block-details {
		interpolate-size: allow-keywords;
	}

	.wp-block-details::details-content {
		height: 0;
		overflow: clip;
		transition: height 300ms cubic-bezier(0, 0.49, 0.27, 0.99), content-visibility 300ms allow-discrete;
	}

	.wp-block-details[open]::details-content {
		height: auto;
	}
}

/* -------------------------------------------------------------------------
 * Tabs. Without .en-js (no JavaScript), every panel is stacked.
 * With .en-js, inactive panels are hidden before first paint.
 * ---------------------------------------------------------------------- */

.en-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 12px;
}

.en-tabs__tab {
	box-sizing: border-box;
	min-height: 44px;
	margin: 0;
	padding: 0.5rem 0.9rem;
	border: 1px solid #591a22;
	background: #fff;
	color: #591a22;
	font-weight: 700;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.en-tabs__tab:hover,
.en-tabs__tab:focus-visible {
	background: #e9d9db;
	color: #591a22;
}

.en-tabs__tab[aria-selected="true"] {
	background: #591a22;
	color: #fff;
}

.en-tabs__tab[aria-selected="true"]:hover,
.en-tabs__tab[aria-selected="true"]:focus-visible {
	background: #591a22;
	color: #fff;
}

.en-tabs__panel {
	display: block;
}

.en-tabs__panel iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border: 0;
}

html.en-js .en-tabs:not(.en-tabs-ready) .en-tabs__panel ~ .en-tabs__panel {
	display: none;
}

html.en-js .en-tabs.en-tabs-ready .en-tabs__panel[hidden] {
	display: none;
}

/* -------------------------------------------------------------------------
 * Reduced motion: no autoplay assistance, no transitions, no parallax.
 * ---------------------------------------------------------------------- */

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

	.en-carousel .wp-block-image,
	.en-carousel .blocks-gallery-item,
	.en-carousel li,
	.en-parallax .wp-block-cover__image-background,
	.en-fade-up,
	.en-fade-up.is-pending,
	.en-fade-up.is-settling,
	.wp-block-button.en-btn-gold .wp-block-button__link,
	.wp-block-button.en-btn-gold .wp-element-button,
	a.en-btn-gold,
	button.en-btn-gold,
	.en-tile > .wp-block-cover__background,
	.wp-block-image.en-tile::before,
	.wp-block-cover.en-tile::before,
	.en-tabs__tab,
	.site-footer a,
	#colophon a,
	footer a,
	.site-top-header-wrap a,
	.wp-block-details::details-content,
	.en-details-body,
	body.en-header-autohide #masthead .item-is-fixed,
	body.en-header-autohide #masthead .kadence-sticky-header,
	body.en-header-slide #masthead .kadence-sticky-header.en-header-sliding,
	body.en-header-slide #masthead .kadence-sticky-header.en-header-slide-in {
		transition: none !important;
		animation: none !important;
	}

	.en-parallax .wp-block-cover__image-background,
	.en-fade-up,
	.en-fade-up.is-pending,
	.en-fade-up.is-settling,
	body.en-header-autohide.en-header-hidden #masthead .item-is-fixed,
	body.en-header-autohide.en-header-hidden #masthead .item-is-stuck,
	body.en-header-autohide.en-header-hidden #masthead .kadence-sticky-header,
	body.en-header-slide #masthead .kadence-sticky-header.en-header-sliding,
	body.en-header-slide #masthead .kadence-sticky-header.en-header-slide-in {
		transform: none !important;
	}
}
