/* Hero slider (front end). Loaded only when a slider is on the page.
   Without JS the first slide is shown and the rest are hidden. */
.is-style-uyai-hero-slider {
	position: relative;
	height: min(calc(100vh - 110px), 960px);
	min-height: 560px;
	overflow: hidden;
	background: var(--wp--preset--color--ink);
	display: grid;
	padding: 0 !important;
}
.is-style-uyai-hero-slider > .wp-block-cover {
	grid-area: 1 / 1;
	min-height: 0 !important;
	height: 100%;
	align-items: flex-end;
	padding-inline: max(var(--wp--preset--spacing--gutter), calc((100% - 1480px) / 2 + var(--wp--preset--spacing--gutter)));
	padding-bottom: clamp(36px, 5vw, 64px);
	margin: 0;
}
.is-style-uyai-hero-slider > .wp-block-cover:not(:first-of-type) { display: none; }
.is-style-uyai-hero-slider > .wp-block-cover > .wp-block-cover__inner-container { max-width: 620px; width: 100%; margin: 0; }
.is-style-uyai-hero-slider > .wp-block-cover .wp-block-cover__image-background { object-position: center 30%; }

/* Slide text rhythm from the design: eyebrow 20, title 22, paragraph 32 */
.is-style-uyai-hero-slider .wp-block-cover__inner-container > * { margin: 0; }
.is-style-uyai-hero-slider .wp-block-cover__inner-container > .is-style-uyai-eyebrow { margin-bottom: 20px; line-height: normal; }
.is-style-uyai-hero-slider .wp-block-cover__inner-container > h1,
.is-style-uyai-hero-slider .wp-block-cover__inner-container > h2 { margin-bottom: 22px; text-wrap: balance; }
.is-style-uyai-hero-slider .wp-block-cover__inner-container > p:not(.is-style-uyai-eyebrow) { margin-bottom: 32px; max-width: 460px; text-wrap: pretty; }

/* Enhanced (JS) state */
.is-style-uyai-hero-slider.is-ready > .wp-block-cover {
	display: flex;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.4s ease, visibility 0s linear 1.4s;
}
.is-style-uyai-hero-slider.is-ready > .wp-block-cover.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 1.4s ease, visibility 0s;
}
.is-style-uyai-hero-slider.is-ready .wp-block-cover__image-background { transform: scale(1); transition: transform 8s ease-out; }
.is-style-uyai-hero-slider.is-ready .is-active .wp-block-cover__image-background { transform: scale(1.06); }

.uyai-hero__controls {
	position: absolute;
	right: max(var(--wp--preset--spacing--gutter), calc((100% - 1480px) / 2 + var(--wp--preset--spacing--gutter)));
	bottom: clamp(36px, 5vw, 64px);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 20px;
	color: var(--wp--preset--color--light);
	font-size: var(--wp--preset--font-size--label);
	letter-spacing: 0.14em;
}
.uyai-hero__btn {
	width: 44px;
	height: 44px;
	border: 1px solid rgba(247, 243, 238, 0.6);
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-size: 15px;
	line-height: 1;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.uyai-hero__btn:hover { background: rgba(247, 243, 238, 0.14); }
.uyai-hero__counter { font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; }

.uyai-hero__bars { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; display: flex; gap: 2px; z-index: 3; }
.uyai-hero__bar {
	flex: 1;
	border: 0;
	padding: 0;
	cursor: pointer;
	background: rgba(247, 243, 238, 0.3);
	position: relative;
}
.uyai-hero__bar::after { content: ""; position: absolute; inset: -11px 0; } /* 24px hit area */
.uyai-hero__bar[aria-current="true"] { background: var(--wp--preset--color--light); }

@media (max-width: 640px) {
	/* Controls wrap below the text, as in the design: 36 padding + 44 controls + 32 gap */
	.uyai-hero__controls { left: var(--wp--preset--spacing--gutter); right: auto; bottom: 36px; }
	.is-style-uyai-hero-slider > .wp-block-cover { padding-bottom: 112px; }
}
@media (prefers-reduced-motion: reduce) {
	.is-style-uyai-hero-slider.is-ready > .wp-block-cover,
	.is-style-uyai-hero-slider.is-ready > .wp-block-cover.is-active,
	.is-style-uyai-hero-slider.is-ready .wp-block-cover__image-background { transition: none; }
	.is-style-uyai-hero-slider.is-ready .is-active .wp-block-cover__image-background { transform: none; }
}
