/* Front page common — tokens, container, headings, buttons, reveal */
/* Scoped to body.totop-front-page so post content is unaffected */

body.totop-front-page {
	--totop-teal: #2cb8b7;
	--totop-teal-ink: #17817f;
	--totop-teal-light: #a6d9d8;
	--totop-teal-pale: #ecf7f7;
	--totop-ink: #363332;
	--totop-ink-soft: #5c5856;
	--totop-gray: #6e6a67;
	--totop-line: #e3dfd7; /* theme-warm */
	--totop-bg: #f7f5f1; /* theme-warm page ground */
	--totop-serif: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
	--totop-head: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
	--totop-logo: "Jost", "Futura", "Inter", sans-serif;
	--totop-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
	--totop-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--totop-noise-mission: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
	--totop-noise-cta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
	background: var(--totop-bg);
}

body.totop-front-page .totop-front {
	font-family: var(--totop-sans);
	font-size: 16px;
	line-height: 1.9;
	color: var(--totop-ink);
	background: transparent;
	-webkit-font-smoothing: antialiased;
	letter-spacing: 0.02em;
}

body.totop-front-page .totop-front *,
body.totop-front-page .totop-front *::before,
body.totop-front-page .totop-front *::after {
	box-sizing: border-box;
}

body.totop-front-page .totop-front a {
	color: inherit;
	text-decoration: none;
}

body.totop-front-page .totop-front img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------- layout ---------- */
body.totop-front-page .totop-front .container {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

body.totop-front-page .totop-front .sp-only {
	display: none;
}

@media (max-width: 767px) {
	body.totop-front-page .totop-front .sp-only {
		display: inline;
	}

	body.totop-front-page .totop-front .pc-only {
		display: none;
	}
}

/* ---------- section shell ---------- */
body.totop-front-page .totop-section {
	padding: 96px 0;
	margin: 0;
	/* theme-warm: light bands share the page ground */
	background: transparent;
}

body.totop-front-page .totop-section-placeholder {
	margin: 0;
	padding: 24px;
	border: 1px dashed rgba(54, 51, 50, 0.18);
	color: var(--totop-gray);
	font-size: 14px;
	background: rgba(255, 255, 255, 0.35);
}

/* ---------- headings (mock final: v14 + v24/v25 tile on sec-label) ---------- */
body.totop-front-page .totop-front .sec-label {
	font-family: var(--totop-logo);
	font-size: clamp(46px, 6.5vw, 86px);
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--totop-ink);
	line-height: 1.05;
	margin: 0 0 4px;
}

body.totop-front-page .totop-front .sec-title {
	font-family: var(--totop-head);
	font-size: 14px;
	font-weight: 700;
	color: var(--totop-teal-ink);
	letter-spacing: 0.14em;
	line-height: 1.6;
	margin: 0 0 52px;
	/* Lightning Origin2 の h2 上下ボーダーを打ち消す */
	padding: 0;
	border: 0;
	border-top: none;
	border-bottom: none;
	background: none;
	clear: none;
}

body.totop-front-page .totop-front h2,
body.totop-front-page .totop-front h3,
body.totop-front-page .totop-front h4 {
	padding: 0;
	border: 0;
	border-top: none;
	border-bottom: none;
	background: none;
}

body.totop-front-page .totop-front h3::after,
body.totop-front-page .totop-front h3:after {
	content: none;
	display: none;
}

body.totop-front-page .totop-front .services .sec-label,
body.totop-front-page .totop-front .services .sec-title,
body.totop-front-page .totop-front .strengths .sec-label,
body.totop-front-page .totop-front .strengths .sec-title,
body.totop-front-page .totop-front .company .sec-label,
body.totop-front-page .totop-front .company .sec-title {
	text-align: right;
}

/* Mission keeps small EN label */
body.totop-front-page .totop-front .mission .sec-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.24em;
	color: var(--totop-teal-light);
	margin-bottom: 18px;
}

body.totop-front-page .totop-front .mission .sec-label.light {
	color: var(--totop-teal-light);
}

@media (max-width: 767px) {
	body.totop-front-page .totop-front .sec-label {
		font-size: clamp(40px, 12vw, 56px);
	}

	body.totop-front-page .totop-front .sec-title {
		margin-bottom: 36px;
	}

	body.totop-front-page .totop-front .issues-intro .sec-title {
		margin-bottom: 20px;
	}

	body.totop-front-page .totop-section {
		padding: 72px 0;
	}
}

/* ---------- tile mark (injected by JS onto .sec-label) ---------- */
body.totop-front-page .totop-front .tile-mark {
	display: inline-block;
	width: 0.46em;
	height: 0.46em;
	margin-right: 0.24em;
	vertical-align: 0.02em;
}

body.totop-front-page .totop-front .tile-mark svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

body.totop-front-page .totop-front .tile-mark .t4 {
	transform-box: fill-box;
	transform-origin: center;
	transform: rotate(0deg);
	transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s;
}

body.totop-front-page .totop-front .tile-mark.turn .t4 {
	transform: rotate(45deg);
}

/* ---------- buttons ---------- */
body.totop-front-page .totop-front .totop-btn-primary,
body.totop-front-page .totop-front .btn-primary {
	display: inline-block;
	background: var(--totop-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-ease), transform 0.25s var(--totop-ease);
	cursor: pointer;
	border: 0;
}

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

body.totop-front-page .totop-front .totop-btn-primary.large,
body.totop-front-page .totop-front .btn-primary.large {
	padding: 18px 56px;
	font-size: 16px;
}

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

body.totop-front-page .totop-front .totop-btn-text::after,
body.totop-front-page .totop-front .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-ease);
}

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

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

body.totop-front-page .totop-front .arrow {
	display: inline-block;
	transition: transform 0.25s var(--totop-ease);
}

/* ---------- CTA copy (shared type) ---------- */
body.totop-front-page .totop-front .cta-copy {
	font-family: var(--totop-serif);
	font-weight: 600;
	font-size: clamp(28px, 4.2vw, 44px);
	letter-spacing: 0.05em;
	line-height: 1.5;
	margin: 0 0 20px;
	color: #fff;
}

/* ---------- mission / cta dark shells (theme-warm final) ---------- */
body.totop-front-page .totop-front .mission {
	position: relative;
	overflow: hidden;
	max-width: none;
	width: 100%;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	--mx: 0;
	clip-path: inset(0 calc((1 - var(--mx)) * 11%) round calc(28px * (1 - var(--mx))));
	background:
		var(--totop-noise-mission),
		linear-gradient(155deg, #2c4a46 0%, #223d39 60%, #28453f 100%);
	color: #fff;
	padding: 116px 0;
}

@media (prefers-reduced-motion: reduce) {
	body.totop-front-page .totop-front .mission {
		clip-path: none;
		max-width: min(1240px, calc(100% - 40px));
		margin: 0 auto;
		border-radius: 20px;
		box-shadow: 0 30px 70px rgba(24, 40, 38, 0.16);
	}
}

body.totop-front-page .totop-front .cta {
	position: relative;
	overflow: hidden;
	background:
		var(--totop-noise-cta),
		linear-gradient(160deg, #27433e 0%, #1d3531 100%);
	color: #fff;
	padding: 104px 0;
}

@media (max-width: 767px) {
	body.totop-front-page .totop-front .mission {
		padding: 72px 0;
	}

	body.totop-front-page .totop-front .cta {
		padding: 64px 0;
	}
}

/* ---------- reveal ---------- */
html.js body.totop-front-page .totop-front .reveal,
html.js body.totop-front-page .totop-front .reveal-group > * {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s var(--totop-ease), transform 0.7s var(--totop-ease);
}

html.js body.totop-front-page .totop-front .reveal.visible,
html.js body.totop-front-page .totop-front .reveal-group.visible > * {
	opacity: 1;
	transform: translateY(0);
}

body.totop-front-page .totop-front .reveal-group.visible > *:nth-child(2) {
	transition-delay: 0.08s;
}

body.totop-front-page .totop-front .reveal-group.visible > *:nth-child(3) {
	transition-delay: 0.16s;
}

body.totop-front-page .totop-front .reveal-group.visible > *:nth-child(4) {
	transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
	html.js body.totop-front-page .totop-front .reveal,
	html.js body.totop-front-page .totop-front .reveal-group > * {
		opacity: 1;
		transform: none;
		transition: none;
	}

	body.totop-front-page .totop-front .tile-mark .t4 {
		transform: rotate(45deg) !important;
		transition: none !important;
	}

	body.totop-front-page .totop-front .totop-btn-primary,
	body.totop-front-page .totop-front .btn-primary {
		transition: none;
	}
}

/* ---------- focus ---------- */
body.totop-front-page .totop-front a:focus-visible,
body.totop-front-page .totop-front button:focus-visible {
	outline: 2px solid var(--totop-teal-ink);
	outline-offset: 3px;
	border-radius: 2px;
}
