/* ============================================
   Home #main_visual 写真のゆっくりしたクロスフェード（トップページのみ）
   設置場所: /wp-content/themes/swell_child/assets/css/vayu-hero-crossfade.css
   #main_visual 本体・すりガラスの札・葉ボタンの確定デザインには一切触れない。
   追加した写真レイヤーと一時停止ボタンのスタイルのみ。
   ============================================ */

.vayu-hero-fade-layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	opacity: 0;
	will-change: opacity;
}

.vayu-hero-fade-fg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.vayu-hero-fade-bg {
	display: none;
	position: absolute;
	inset: -20px;
	background-size: cover;
	background-position: center;
	filter: blur(28px) saturate(1.05);
	transform: scale(1.15);
}

/* スマホの縦長ヒーローだと横長写真がobject-fit:coverだけでは
   上下方向を切り取れず(全高がそのまま入ってしまう)、狙った部分が
   見えないことがある。写真ごとにmobileTransformが指定されている場合だけ
   スマホでさらに拡大・焦点移動する */
@media (max-width: 768px) {
	.vayu-hero-fade-fg[style*="--vayu-mobile-transform"] {
		transform: var(--vayu-mobile-transform);
		transform-origin: var(--vayu-mobile-transform-origin, center);
	}
}

/* 縦長写真をPCでは切り取らず「引いた」見た目にする：
   ぼかした背景の上に、写真全体をcontainで小さめに収める */
@media (min-width: 769px) {
	.vayu-hero-fade-layer:has(.vayu-hero-fade-bg) .vayu-hero-fade-bg {
		display: block;
	}
	.vayu-hero-fade-layer:has(.vayu-hero-fade-bg) .vayu-hero-fade-fg {
		object-fit: contain;
	}
}

.vayu-hero-pausebtn {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 5;
	width: 38px;
	height: 38px;
	min-width: 38px;
	min-height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	background: rgba(251, 250, 247, 0.42);
	-webkit-backdrop-filter: blur(8px) saturate(0.9);
	backdrop-filter: blur(8px) saturate(0.9);
	color: #52624f;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease;
}
.vayu-hero-pausebtn:hover,
.vayu-hero-pausebtn:focus-visible {
	background: rgba(251, 250, 247, 0.62);
}
.vayu-hero-pausebtn:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.9);
	outline-offset: 2px;
}

.vayu-hero-pausebtn__icon {
	position: relative;
	display: block;
	width: 10px;
	height: 12px;
}
.vayu-hero-pausebtn__icon::before,
.vayu-hero-pausebtn__icon::after {
	content: "";
	position: absolute;
	top: 0;
	width: 3px;
	height: 12px;
	background: currentColor;
	border-radius: 1px;
}
.vayu-hero-pausebtn__icon::before {
	left: 0;
}
.vayu-hero-pausebtn__icon::after {
	right: 0;
}
.vayu-hero-pausebtn.is-paused .vayu-hero-pausebtn__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
}
.vayu-hero-pausebtn.is-paused .vayu-hero-pausebtn__icon::before,
.vayu-hero-pausebtn.is-paused .vayu-hero-pausebtn__icon::after {
	content: none;
}

@media (max-width: 600px) {
	.vayu-hero-pausebtn {
		top: 10px;
		right: 10px;
		width: 34px;
		height: 34px;
		min-width: 34px;
		min-height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vayu-hero-fade-layer,
	.vayu-hero-pausebtn {
		display: none !important;
	}
}
