/* MIRAIWEB：画像付きヒーロー。トップと詳細のレイアウトは互いに独立。 */
.c-image-hero { background: var(--color-background); }
.c-image-hero__grid { display: grid; align-items: center; }
.c-image-hero__content { min-width: 0; }
.c-image-hero h1 { margin: 0; }
.c-image-hero__visual { min-width: 0; min-height: 0; margin: 0; overflow: hidden; background: var(--color-background-subtle); border-radius: var(--mw-surface-radius); }
.c-image-hero__visual img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.c-image-hero__actions { margin: 32px 0 0; }

/* トップFVと詳細FVのH1は、同じサイズ・ウェイトを共有する。
 * 通常下層ヒーローや本文見出しのタイポグラフィとは独立させる。 */
main .p-front-hero__title,
main .c-image-hero--with-breadcrumb h1 {
	font-size: clamp(2rem, 3.5vw, 3rem);
	font-weight: var(--mw-font-regular);
}
@media (max-width: 768px) {
	main .p-front-hero__title,
	main .c-image-hero--with-breadcrumb h1 {
		font-size: clamp(1.375rem, 6.4vw, 1.75rem);
	}
}

/* 同一の登場アニメーションをトップ・詳細で使用。各要素の順序のみ指定する。 */
@media (prefers-reduced-motion: no-preference) {
	@keyframes mw-front-hero-copy-reveal {
		from { opacity: 0; transform: translateY(16px); }
		to { opacity: 1; transform: translateY(0); }
	}

	.p-front-hero__eyebrow,
	.p-front-hero__title > span,
	.p-front-hero__lead,
	.p-front-hero__actions,
	.c-image-hero--with-breadcrumb h1,
	.c-image-hero--with-breadcrumb .mw-detail-hero-message,
	.c-image-hero--with-breadcrumb .c-image-hero__lead,
	.c-image-hero--with-breadcrumb .c-image-hero__actions {
		animation: mw-front-hero-copy-reveal 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
	}

	.p-front-hero__eyebrow { animation-delay: 80ms; }
	.p-front-hero__title > span:first-child,
	.c-image-hero--with-breadcrumb h1 { animation-delay: 180ms; }
	.p-front-hero__title > span + span,
	.c-image-hero--with-breadcrumb .mw-detail-hero-message { animation-delay: 320ms; }
	.p-front-hero__lead,
	.c-image-hero--with-breadcrumb .c-image-hero__lead { animation-delay: 460ms; }
	.p-front-hero__actions,
	.c-image-hero--with-breadcrumb .c-image-hero__actions { animation-delay: 600ms; }

	/* フォーカスされた操作要素は遅延なく表示する。 */
	.p-front-hero__actions:focus-within,
	.c-image-hero--with-breadcrumb .c-image-hero__actions:focus-within { animation: none; }
}

/* トップページのファーストビュー。 */
.c-image-hero:not(.c-image-hero--with-breadcrumb) { padding: 76px 0 72px; border-bottom: 1px solid var(--color-border); }
.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__grid { grid-template-columns: minmax(0, 1.18fr) minmax(400px, .82fr); gap: 64px; }
.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__content,
main .c-image-hero:not(.c-image-hero--with-breadcrumb) h1 { max-width: 700px; }
main .c-image-hero:not(.c-image-hero--with-breadcrumb) h1 { font-weight: var(--mw-font-regular); }
.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__lead { max-width: 680px; margin: 28px 0 0; color: var(--color-text); line-height: 2; }
@media (max-width: 1080px) {
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 48px; }
}
@media (max-width: 960px) {
	.c-image-hero:not(.c-image-hero--with-breadcrumb) { padding: 58px 0 60px; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) :is(.c-image-hero__content, .c-image-hero__lead, .c-image-hero__visual) { max-width: 720px; }
	main .c-image-hero:not(.c-image-hero--with-breadcrumb) h1 { max-width: 720px; }
}
@media (max-width: 600px) {
	.c-image-hero:not(.c-image-hero--with-breadcrumb) { padding: 0; overflow-x: clip; border-bottom: 0; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__container { position: relative; width: 100%; max-width: none; margin-inline: 0; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__grid { position: relative; display: block; width: 100%; min-height: calc(100svh - 68px); overflow: hidden; isolation: isolate; background: var(--color-primary-deepest); }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__grid::after { position: absolute; inset: 0; z-index: 1; content: ""; background: linear-gradient(to bottom, color-mix(in srgb, var(--color-primary-deepest) 30%, transparent) 0%, color-mix(in srgb, var(--color-primary-deepest) 42%, transparent) 24%, color-mix(in srgb, var(--color-primary-deepest) 68%, transparent) 46%, color-mix(in srgb, var(--color-primary-deepest) 90%, transparent) 72%, color-mix(in srgb, var(--color-primary-deepest) 97%, transparent) 100%); pointer-events: none; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__content { position: relative; z-index: 2; display: flex; min-height: inherit; max-width: none; flex-direction: column; justify-content: center; padding: 24px; color: var(--color-text-inverse); }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__visual { position: absolute; inset: 0; z-index: 0; width: 100%; max-width: none; height: 100%; border-radius: 0; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__visual img { height: 100%; aspect-ratio: auto; }
	main .c-image-hero:not(.c-image-hero--with-breadcrumb) h1 { max-width: none; color: var(--color-text-inverse); line-height: 1.4; text-shadow: 0 2px 18px color-mix(in srgb, var(--color-primary-deepest) 55%, transparent); }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) h1 br { display: none; }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__lead { max-width: none; margin-top: 16px; color: var(--color-text-inverse); line-height: 1.7; text-shadow: 0 1px 14px color-mix(in srgb, var(--color-primary-deepest) 45%, transparent); }
	.c-image-hero:not(.c-image-hero--with-breadcrumb) .c-image-hero__actions { gap: 8px; margin-top: 20px; }
}

/* サービス・課題・業種の詳細ページ。背景画像化しない。 */
.c-image-hero--with-breadcrumb {
	--mw-hero-gutter: 32px;
	--mw-hero-spacing: 96px;
	--mw-hero-title-leading: 1.2;
	--mw-hero-breadcrumb-size: .875rem;
	--mw-hero-body-size: var(--mw-font-body-size);
	padding: 56px 0 var(--mw-hero-spacing);
}
.c-image-hero--with-breadcrumb > .l-container { width: min(1440px, calc(100% - 2 * var(--mw-hero-gutter))); max-width: none; margin-inline: auto; padding: 0; }
.c-image-hero--with-breadcrumb .c-breadcrumb { margin: 0 0 calc(var(--mw-hero-spacing) + 24px); padding: 0; }
.c-image-hero--with-breadcrumb .c-breadcrumb ol { margin: 0; padding: 0; gap: 8px 0; line-height: 1.5; }
main .c-image-hero--with-breadcrumb .c-breadcrumb :is(li, a:not(.c-button)) { font-size: var(--mw-hero-breadcrumb-size); font-weight: var(--mw-font-regular); line-height: 1.5; }
.c-image-hero--with-breadcrumb .c-image-hero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
main .c-image-hero--with-breadcrumb h1 { color: var(--color-heading); font-family: var(--mw-font-family); line-height: var(--mw-hero-title-leading); letter-spacing: 0; text-align: left; }
main .c-image-hero--with-breadcrumb .mw-detail-hero-message { margin: 20px 0 0; font-size: var(--mw-font-lp-message-size); font-weight: var(--mw-font-heading); line-height: 1.6; color: var(--color-heading); }
main .c-image-hero--with-breadcrumb .c-image-hero__lead { margin: 16px 0 0; color: var(--color-text-secondary); font-size: var(--mw-hero-body-size); line-height: 1.9; }
@media (max-width: 1055px) {
	.c-image-hero--with-breadcrumb { --mw-hero-gutter: 24px; --mw-hero-spacing: 64px; }
}
@media (max-width: 671px) {
	.c-image-hero--with-breadcrumb { --mw-hero-gutter: 16px; --mw-hero-spacing: 48px; --mw-hero-title-leading: 1.25; --mw-hero-breadcrumb-size: .75rem; --mw-hero-body-size: var(--mw-font-body-size-mobile); }
	.c-image-hero--with-breadcrumb .c-image-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.c-image-hero--with-breadcrumb .c-image-hero__visual { width: 100%; }
}
@media (max-width: 600px) {
	.c-image-hero--with-breadcrumb .c-image-hero__actions { gap: 8px; margin-top: 20px; }
	.c-image-hero--with-breadcrumb h1 br { display: none; }
}
