/* ==========================================================
   Hero slider — 100svh full screen
   ========================================================== */
.hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 650px;
	overflow: hidden;
	background: var(--ink-2);
	color: var(--white);
}
.hero__slides { position: absolute; inset: 0; }

.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .85s ease, visibility .85s;
}
.hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* ---------- media ---------- */
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: scale(1.07);
	transition: transform 7s linear;
}
.hero__slide.is-active .hero__media img { transform: scale(1.015); }

/* 画像の見せる位置（管理画面のスライド設定） */
.hero__media picture { display: contents; }
.pos-top .hero__media img { object-position: center top; }
.pos-bottom .hero__media img { object-position: center bottom; }
.pos-left .hero__media img { object-position: left center; }
.pos-right .hero__media img { object-position: right center; }

/* 写真未設定時：フラットな暗色面 */
.hero__placeholder { position: absolute; inset: 0; background: #0d1a2a; }
.hero__slide:nth-child(4n+2) .hero__placeholder { background: #111a24; }
.hero__slide:nth-child(4n+3) .hero__placeholder { background: #0c1f1a; }
.hero__slide:nth-child(4n+4) .hero__placeholder { background: #161b22; }

/* 文字可読性のためのシェード（装飾目的の gradient ではない） */
.hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(3, 12, 21, .64) 0%, rgba(3, 12, 21, .34) 40%, rgba(3, 12, 21, .06) 70%, rgba(3, 12, 21, .18) 100%),
		linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .55) 100%);
}

/* 文字背面の暗さ（管理画面のスライド設定） */
.shade-light .hero__shade { opacity: .6; }
.shade-strong .hero__shade { background-color: rgba(3, 12, 21, .28); }

/* ---------- domain icon ---------- */
.hero__icon {
	position: absolute;
	right: 5.5vw;
	bottom: 17vh;
	z-index: 4;
	width: 110px;
	height: 110px;
	color: var(--white);
	opacity: .16;
}
.hero__icon svg { width: 100%; height: 100%; }
.hero__slide.is-active .hero__icon { animation: heroIconDrift 5.8s ease-in-out infinite alternate; }
@keyframes heroIconDrift {
	from { transform: translateY(0); }
	to { transform: translateY(-9px); }
}

/* ---------- copy ---------- */
.hero__content {
	position: relative;
	z-index: 3;
	height: 100%;
	padding: calc(var(--header) + 56px) 6vw 120px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.hero__eyebrow {
	margin: 0 0 28px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	line-height: 1.4;
	opacity: .9;
}
.hero__title {
	margin: 0;
	max-width: 900px;
	font-size: clamp(52px, 6.8vw, 108px);
	line-height: .95;
	letter-spacing: -.06em;
	font-weight: 500;
}
.hero__title-en,
.hero__title-jp { display: block; }
.hero__title-jp {
	margin-top: 18px;
	font-size: .44em;
	line-height: 1.3;
	letter-spacing: -.045em;
}
.hero__desc {
	max-width: 500px;
	margin: 28px 0 0;
	font-size: 14px;
	line-height: 1.9;
	color: rgba(255, 255, 255, .86);
}
.hero__actions { display: flex; margin-top: 34px; width: max-content; max-width: 100%; }
.hero__actions .btn + .btn { border-left: 0; }

/* ---------- counter ---------- */
.hero__count {
	position: absolute;
	right: 34px;
	top: calc(var(--header) + 24px);
	z-index: 6;
	text-align: right;
	line-height: 1;
}
.hero__count strong {
	display: block;
	font-size: 48px;
	line-height: .9;
	font-weight: 300;
	letter-spacing: -.06em;
}
.hero__count small { font-size: 10px; letter-spacing: .14em; opacity: .75; }

/* ---------- controls ---------- */
.hero__controls {
	position: absolute;
	z-index: 7;
	left: 34px;
	right: 34px;
	bottom: 22px;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "arrows tabs pause";
	gap: 24px;
	align-items: end;
}
html:not(.js) .hero__controls,
html:not(.js) .hero__count { display: none; }

.hero__arrows { grid-area: arrows; display: flex; }
.hero__arrow,
.hero__pause {
	height: 48px;
	border: 1px solid rgba(255, 255, 255, .55);
	background: transparent;
	color: var(--white);
	cursor: pointer;
	transition: background-color .2s;
}
.hero__arrow { width: 48px; font-size: 20px; line-height: 1; }
.hero__arrow + .hero__arrow { border-left: 0; }
.hero__pause {
	grid-area: pause;
	min-width: 82px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .12em;
}
.hero__arrow:hover,
.hero__pause:hover { background: rgba(255, 255, 255, .14); }

.hero__tabs {
	grid-area: tabs;
	display: grid;
	grid-template-columns: repeat(var(--tabs, 4), 1fr);
	border-top: 1px solid rgba(255, 255, 255, .3);
}
.hero__tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--white);
	text-align: left;
	padding: 13px 14px 5px;
	min-height: 44px;
	cursor: pointer;
	position: relative;
	opacity: .6;
	transition: opacity .25s;
}
.hero__tab:hover,
.hero__tab.is-active { opacity: 1; }
.hero__tab small {
	display: block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .13em;
	margin-bottom: 4px;
}
.hero__tab strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; }

/* 進捗バー：単色 */
.hero__tab::before {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	top: -1px;
	height: 2px;
	background: var(--green);
}
.hero__tab.is-active::before { right: 0; }
.hero.is-playing .hero__tab.is-active::before {
	right: 100%;
	animation: heroProgress var(--hero-interval, 6000ms) linear forwards;
}
@keyframes heroProgress { to { right: 0; } }

/* ---------- wipe transition ---------- */
.hero__wipe {
	position: absolute;
	inset: 0;
	z-index: 9;
	pointer-events: none;
	transform: translateX(-101%);
	background: var(--white);
}
.hero__wipe.run { animation: heroWipe .72s var(--ease-wipe); }
@keyframes heroWipe {
	0% { transform: translateX(-101%); }
	48%, 52% { transform: translateX(0); }
	100% { transform: translateX(101%); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
	.hero__controls { grid-template-columns: auto 1fr; grid-template-areas: "arrows tabs"; }
	.hero__pause { display: none; }
	.hero__icon { right: 22px; bottom: 21vh; width: 86px; height: 86px; }
}

@media (max-width: 640px) {
	.hero { min-height: 640px; }
	.hero__content {
		padding: calc(var(--header) + 42px) 18px 150px;
		justify-content: flex-end;
	}
	.hero__title { font-size: clamp(44px, 13.5vw, 68px); }
	.hero__title-jp { font-size: .46em; margin-top: 12px; }
	.hero__desc { font-size: 13px; margin-top: 18px; }
	.hero__eyebrow { margin-bottom: 18px; font-size: 10px; }
	.hero__actions { width: 100%; margin-top: 26px; }
	.hero__actions .btn { min-width: 0; flex: 1; gap: 8px; padding: 13px 12px; }
	.hero__count { right: 16px; top: calc(var(--header) + 18px); }
	.hero__count strong { font-size: 34px; }
	.hero__controls {
		left: 16px;
		right: 16px;
		bottom: 16px;
		grid-template-columns: 1fr;
		grid-template-areas: "tabs";
	}
	.hero__arrows { position: absolute; right: 0; bottom: 58px; }
	.hero__arrow { width: 44px; height: 44px; }
	.hero__tab { padding: 11px 6px 4px; }
	.hero__tab strong { display: none; }
	.hero__icon { width: 64px; height: 64px; right: 16px; top: calc(var(--header) + 80px); bottom: auto; }
}

@media (max-height: 560px) and (orientation: landscape) {
	.hero { min-height: 560px; }
	.hero__icon { display: none; }
}

/* ---------- reduced motion ---------- */
.motion-off .hero__media img { transform: none; }
@media (prefers-reduced-motion: reduce) {
	.hero__media img { transform: none; }
}
