/* Front page hero — scoped to avoid affecting article content */
/* Final cascade matched to totop-site-main/assets/css/style.css (.hero + v7/v12/v21) */

body.totop-front-page.totop-new-header {
	padding-top: 0;
}

body.totop-front-page #totopHero.hero {
	--totop-hero-teal: #2cb8b7;
	--totop-hero-teal-light: #a6d9d8;
	--totop-hero-teal-ink: #17817f;
	--totop-hero-serif: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
	--totop-hero-logo: "Jost", "Futura", "Inter", sans-serif;
	--totop-hero-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	position: relative;
	box-sizing: border-box;
	/* v12: FVは縦100%のフルスクリーン */
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding: calc(var(--totop-header-h) + 48px) 0 96px;
	overflow: hidden;
	color: #fff;
	margin: 0;
}

/* Lightning / Bootstrap の h1・p 余白・サイズを無効化 */
body.totop-front-page #totopHero.hero *,
body.totop-front-page #totopHero.hero *::before,
body.totop-front-page #totopHero.hero *::after {
	box-sizing: border-box;
}

body.totop-front-page #totopHero.hero p,
body.totop-front-page #totopHero.hero h1 {
	margin-top: 0;
}

/* v12: ヘッダー可読性用の上部 scrim */
body.totop-front-page #totopHero.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 180px;
	background: linear-gradient(180deg, rgba(8, 14, 14, 0.42), transparent);
	z-index: 0;
	pointer-events: none;
}

body.totop-front-page #totopHero .hero-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(ellipse 900px 600px at 78% 30%, rgba(44, 184, 183, 0.28), transparent 60%),
		radial-gradient(ellipse 700px 500px at 15% 85%, rgba(44, 184, 183, 0.14), transparent 60%),
		linear-gradient(160deg, #202b2b 0%, #17211f 55%, #1c2827 100%);
}

body.totop-front-page #totopHero .hero-bg::before {
	content: "";
	position: absolute;
	inset: -20%;
	background: radial-gradient(ellipse 600px 420px at 50% 50%, rgba(166, 217, 216, 0.12), transparent 65%);
	animation: totopHeroGlow 14s ease-in-out infinite alternate;
}

@keyframes totopHeroGlow {
	from { transform: translate(-6%, -4%); }
	to { transform: translate(8%, 6%); }
}

body.totop-front-page #totopHero .hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.22);
	transform-origin: 10% 15%;
}

/* v12: テキスト帯（左下）を局所的に暗くして可読性を確保 */
body.totop-front-page #totopHero .hero-overlay {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 680px 520px at 24% 66%, rgba(10, 16, 16, 0.5), transparent 70%),
		linear-gradient(180deg, rgba(24, 30, 30, 0.5) 0%, rgba(24, 30, 30, 0.4) 55%, rgba(24, 30, 30, 0.6) 100%);
}

/* mock: .container.hero-content */
body.totop-front-page #totopHero .totop-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

/* base + v21 */
body.totop-front-page #totopHero .hero-en {
	font-family: var(--totop-hero-logo);
	font-weight: 500;
	font-size: 17px;
	letter-spacing: 0.16em;
	text-transform: none;
	color: var(--totop-hero-teal-light);
	margin: 0 0 24px;
}

/* base + v7 */
body.totop-front-page #totopHero h1 {
	position: static;
	font-family: var(--totop-hero-serif);
	font-weight: 600;
	font-size: clamp(28px, 5.4vw, 56px);
	line-height: 1.6;
	letter-spacing: 0.08em;
	font-feature-settings: "palt";
	word-break: auto-phrase;
	margin: 0 0 28px;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
	color: #fff;
}

body.totop-front-page #totopHero h1 .u {
	display: block;
}

body.totop-front-page #totopHero .hero-lead {
	max-width: 600px;
	font-size: 15.5px;
	line-height: 1.9;
	color: rgba(255, 255, 255, 0.88);
	margin: 0 0 40px;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

body.totop-front-page #totopHero .hero-actions {
	display: flex;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
}

body.totop-front-page #totopHero .totop-btn-primary {
	display: inline-block;
	background: var(--totop-hero-teal);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.08em;
	padding: 15px 40px;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.25s var(--totop-hero-ease), transform 0.25s var(--totop-hero-ease);
}

body.totop-front-page #totopHero .totop-btn-primary:hover {
	background: #249d9c;
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

body.totop-front-page #totopHero .totop-btn-text {
	display: inline-block;
	position: relative;
	font-weight: 500;
	color: var(--totop-hero-teal-ink);
	padding: 4px 2px;
	text-decoration: none;
}

body.totop-front-page #totopHero .totop-btn-text::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s var(--totop-hero-ease);
}

body.totop-front-page #totopHero .totop-btn-text:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

body.totop-front-page #totopHero .totop-btn-text--white {
	color: #fff;
}

body.totop-front-page #totopHero .hero-scroll {
	position: absolute;
	bottom: 0;
	left: 40px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

body.totop-front-page #totopHero .hero-scroll span {
	font-size: 10px;
	letter-spacing: 0.3em;
	color: rgba(255, 255, 255, 0.7);
	writing-mode: vertical-rl;
}

body.totop-front-page #totopHero .hero-scroll i {
	display: block;
	width: 1px;
	height: 56px;
	background: rgba(255, 255, 255, 0.35);
	position: relative;
	overflow: hidden;
}

body.totop-front-page #totopHero .hero-scroll i::after {
	content: "";
	position: absolute;
	top: -100%;
	left: 0;
	width: 100%;
	height: 100%;
	background: #fff;
	animation: totopScrollLine 2.2s var(--totop-hero-ease) infinite;
}

@keyframes totopScrollLine {
	0% { top: -100%; }
	55% { top: 0; }
	100% { top: 100%; }
}

@media (max-width: 767px) {
	body.totop-front-page #totopHero.hero {
		min-height: 100svh;
		padding: calc(var(--totop-header-h) + 40px) 0 80px;
	}

	body.totop-front-page #totopHero .hero-actions {
		flex-direction: column;
		align-items: flex-start;
	}

	body.totop-front-page #totopHero .hero-scroll {
		left: 22px;
	}

	body.totop-front-page #totopHero .hero-scroll i {
		height: 40px;
	}
}

/* v7: 狭い画面向け */
@media (max-width: 380px) {
	body.totop-front-page #totopHero h1 {
		font-size: 27px;
		letter-spacing: 0.05em;
	}

	body.totop-front-page #totopHero .hero-lead {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.totop-front-page #totopHero .hero-bg::before,
	body.totop-front-page #totopHero .hero-scroll i::after {
		animation: none;
	}

	body.totop-front-page #totopHero .hero-video {
		display: none;
	}
}
