/*
 * SaC Corporate — ヘッダーとヒーローの寸法・動き（指示 H-B / 1-A、2026-10-19）
 * 参考：https://clecom.jp/ のHomeのヘッダーとヒーローセクション。画像は反映せず、SaCの画像を使う。
 * 基準は画面幅1440px（スクロールバー込み）で測った寸法・動き。コードは参考にせず、測定値をもとに新規に記述した。
 * clecom の文章・画像・イラスト・ロゴは使っていない。
 */
/* =============================================================
 * フォント：Noto Sans JP に統一（指示 F-1、2026-10-19）。Font Awesome のアイコンは除く
 * ============================================================= */
body,
body :where(h1, h2, h3, h4, h5, h6, p, a, li, ul, ol, span, div, button, input, textarea, select, label, td, th, strong, b, small, em, dt, dd, section, article, nav, header, footer, main):not(.fas):not(.fab):not(.far):not(.fa):not([class*="fa-"]) {
	font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif !important;
}

:root {
	--sac-ink: #003040;                              /* SaCの文字色（現行のまま） */
	--sac-nav-bg: #ffffff;                           /* メニュー台の背景。clecom と同じく白。透明にするときは transparent */
	--sac-hero-h: max(720px, calc(100vh + 240px));   /* ヒーローの高さ（1440×825 で 1065px） */
}

/* =============================================================
 * 全ページ共通：ページ全体（ウィンドウ）がスクロールするようにする
 * 現行CSSの「html, body { height: 100%; overflow-x: hidden }」のせいで、body がスクロールの入れ物になり、
 * スクロール量（window.scrollY）が常に0のままだった。横はみ出しだけを防ぎ（clip）、縦はページ全体でスクロールさせる。
 * ============================================================= */
html { height: auto !important; min-height: 0 !important; overflow: visible !important; }
body { height: auto !important; min-height: 100vh !important; overflow-x: clip !important; overflow-y: visible !important; }
body.menu-open { overflow: hidden !important; }   /* スマホのメニューを開いている間は、後ろをスクロールさせない */

/* =============================================================
 * ヘッダー（PC：1025px以上）。スマホ・タブレットは、現行のハンバーガーメニューのまま
 * ============================================================= */
@media (min-width: 1025px) {
	body #masthead .header-container {
		position: fixed !important;
		top: 0 !important; left: 0 !important; right: 0 !important;
		width: auto !important; max-width: none !important;
		height: 152px; margin: 0; padding: 0 17px 0 31px !important;
		box-sizing: border-box;
		display: flex !important; justify-content: space-between; align-items: flex-start;
		transition: height 0.4s;
		z-index: 9999;
	}
	body #masthead .header-logo { margin-top: 38px; transition: margin-top 0.4s; }
	body #masthead .header-logo img { height: 76px; max-height: 76px; width: auto; transition: none; }

	body #masthead .header-menu-wrapper {
		display: flex !important; align-items: center; gap: 0;
		margin-top: 34px; height: 84px; box-sizing: border-box;
		padding: 0 20px 0 52px !important;
		border-radius: 50px !important;
		background: var(--sac-nav-bg) !important;
		box-shadow: none !important;
		transition: margin-top 0.4s;
	}
	body #masthead .nav-menu { gap: 0; align-items: stretch; height: 84px; }
	body #masthead .nav-item { display: flex; align-items: center; height: 84px; }
	body #masthead .nav-link {
		display: flex; flex-direction: column; justify-content: center;
		height: 84px; padding: 0 28.5px 0 18px; text-decoration: none; text-align: left;
	}
	body #masthead .nav-en {
		font-size: 20px; font-weight: 600; line-height: 26px; letter-spacing: 0.14px;
		padding-left: 1.2rem;
	}
	body #masthead .nav-en::before { font-size: 14px; }
	body #masthead .nav-ja {
		font-size: 12px; font-weight: 500; line-height: 16px; letter-spacing: 0.06em;
		margin-top: 2px; padding-left: 1.2rem;
	}
	body #masthead .button-area { gap: 9px; margin-left: 4px; align-items: center; }
	body #masthead .contact-button,
	body #masthead .recrui-button {
		display: inline-flex; align-items: center; justify-content: center;
		height: 56px; padding: 0 28px; box-sizing: border-box;
		font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: 0.16px;
		transition: all 0.4s ease-out;
	}
	body #masthead .contact-button { min-width: 148px; }
	body #masthead .recrui-button { padding-right: 40px; }

	/* スクロールすると少し縮む（152px → 110px。0.4秒） */
	body #masthead .header-container.is-shrink { height: 110px; }
	body #masthead .header-container.is-shrink .header-logo { margin-top: 17px; }
	body #masthead .header-container.is-shrink .header-menu-wrapper { margin-top: 13px; }
}

/* =============================================================
 * ヒーロー（HOME）
 * ============================================================= */
body.home { padding-top: 0 !important; }   /* ヒーローを画面の最上部から始める */

.sac-hero {
	position: relative; box-sizing: border-box;
	height: var(--sac-hero-h);
	/* 本文領域の幅の上限（1140px）を抜けて、画面の幅いっぱいに広げる */
	width: 100vw; max-width: none; margin-left: calc(50% - 50vw);
	overflow-x: clip; overflow-y: visible; z-index: 1;   /* 横ははみ出しを隠し、縦は下の大きな文字を見せる */
}
.sac-hero * { box-sizing: border-box; }

/* ---- 背景の飾り（ドット・同心円・ピンクの円） ---- */
.sac-hero__bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.sac-hero__dots {
	position: absolute; left: 0; top: 0; width: 50vw; height: 100%;
	background-image: radial-gradient(circle, rgba(0, 48, 64, 0.12) 1.6px, transparent 1.8px);
	background-size: 34px 34px;
	-webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
	mask-image: linear-gradient(to right, #000 55%, transparent);
}
.sac-hero__ring {
	position: absolute; border-radius: 50%; transform: translate(-50%, -50%);
	left: calc(460 * 100% / 1425); top: 470px;
}
.sac-hero__ring--1 { width: 880px; height: 880px; background: rgba(0, 48, 64, 0.025); }
.sac-hero__ring--2 { width: 490px; height: 490px; background: rgba(255, 255, 255, 0.55); }
/* ピンクの形：画像と同じ切り抜き（形も一緒に変わる）を、左へ28px・上へ110pxずらしたもの。画像の左上に、細い三日月状に見える */
.sac-hero__blob {
	position: absolute; left: calc(46.1vw - 28px); top: -110px; width: 55vw; height: 100%;
	clip-path: url(#sac-hero-clip);
	background: #fbd5e3; opacity: 0.9;
}

/* ---- 画像（右側。左が丸く膨らむ形で切り抜く。形は10秒周期で少しずつ変わる。複数枚は1秒でフェード、14秒かけて左へゆっくり動く） ---- */
.sac-hero__slides {
	position: absolute; top: 0; left: 46.1vw; width: 55vw; height: 100%;
	margin: 0; padding: 0; list-style: none; overflow: hidden; z-index: 1;
	clip-path: url(#sac-hero-clip);   /* 形は10秒周期で少しずつ変わる（SVGの変形アニメーション） */
}
.sac-hero__slides li {
	position: absolute; inset: 0; margin: 0; list-style: none;
	opacity: 0; transition: opacity 1s ease;
}
.sac-hero__slides li.is-active { opacity: 1; }
.sac-hero__slides img {
	position: absolute; top: 0; left: 0; display: block;
	width: 100%; max-width: none; height: 100%; object-fit: cover;
}
/* 画像は固定（横に動かさない。ユーザー指示 2026-10-19）。動くのはマスクの形だけ */

/* ---- 斜めの光の筋（長さ約370px・細い線が3秒周期で流れる。開始は1秒ずつずらす／短い太めの筋は5秒周期） ---- */
.sac-line {
	position: absolute; z-index: 2; overflow: hidden; pointer-events: none;
	left: calc(var(--x) * 100% / 1425); top: calc(var(--y) * 1px);
	width: 3px; height: 369px; border-radius: 2px;
	transform: translate(-50%, -50%) rotate(55deg);
	background: color-mix(in srgb, var(--c) 20%, transparent);
}
.sac-line::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to bottom, transparent 0%, var(--c) 50%, transparent 100%);
	animation: sac-streak 3s linear infinite; animation-delay: var(--d, 0s);
}
.sac-line--s { width: 10px; height: 123px; border-radius: 24px; opacity: 0.4; }
.sac-line--s::before { animation-duration: 5s; }
.sac-line--pk { --c: #ff6f9f; }
.sac-line--pp { --c: #a98bff; }
.sac-line--bl { --c: #4dc3ff; }
@keyframes sac-streak {
	0%   { transform: translateY(100%); }
	50%  { transform: translateY(0); }
	90%  { transform: translateY(-100%); }
	100% { transform: translateY(-100%); }
}

/* ---- 左の余白に置くイラスト（左端から大きく置き、右側は文字ブロックの手前で見切れる。2026-10-19） ---- */
.sac-hero__side {
	position: absolute; z-index: 4; margin: 0; pointer-events: none;
	left: 0; bottom: 26px; width: calc(242 * 100% / 1425); height: min(690px, 68%);
	overflow: hidden; display: flex; justify-content: flex-end;   /* 画像を枠の右端に合わせる＝見切れるのは画像の左側 */
}
.sac-hero__side img { flex: none; display: block; height: 100% !important; width: auto !important; max-width: none !important; aspect-ratio: 2 / 3; object-fit: contain; }   /* 縦横比は画像のまま。枠からはみ出す右側は見切れる */

/* ---- 文字ブロック（左端242px。ヒーローの高さの中で上下中央に置く） ---- */
.sac-hero__catch {
	position: absolute; z-index: 5;
	left: calc(242 * 100% / 1425); top: 32px; bottom: 0; width: 553px;
	display: flex; flex-direction: column; justify-content: center;
}
.sac-hero__title {
	margin: 0; font-size: 48px; font-weight: 600; line-height: 72px; letter-spacing: 3.84px;   /* 新しい見出し（10文字／行）が幅553pxに収まる大きさ。2026-10-19 */
	color: #224e36;
}
.sac-hero__eyebrow {
	display: block; margin-bottom: 4px;
	font-size: 16px; font-weight: 600; line-height: 34px; letter-spacing: 1.6px; color: var(--sac-ink);
}
/* 「中小企業の人手不足を」はグラデーションにせず、濃い紺色（2026-10-19） */
.sac-hero__navy { color: #1f3f73; }
.sac-hero__grad {
	display: inline;
	background-image: linear-gradient(70deg, #ab8cc0, #f78da7, #ab8cc0, #f78da7);
	background-size: 300% 100%; background-repeat: repeat;
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
	animation: sac-grad 10s linear infinite;
}
/* 色が10秒かけて流れ続ける（1周期ぶん動かして、つなぎ目が見えないようにする） */
@keyframes sac-grad { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.sac-hero__text {
	width: 550px; max-width: 100%; margin: 24px 0 0;
	font-size: 16px; font-weight: 600; line-height: 34px; letter-spacing: 1.6px; color: #224e36;
}
.sac-hero__cta {
	align-self: flex-start; display: inline-flex; align-items: center;
	margin-top: 64px; height: 72px; padding: 0 48px;
	font-size: 16px; font-weight: 600; line-height: 1; letter-spacing: 1.6px; color: #fff; text-decoration: none;
	border-radius: 50px; background: linear-gradient(135deg, #f857a6, #ff5858);
	box-shadow: 0 4px 8px rgba(248, 87, 166, 0.3);
	transition: all 0.4s ease-out;
}
.sac-hero__cta:hover { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(248, 87, 166, 0.4); }

/* ---- SCROLL 表示と、下部の大きな文字（細い・ピンク。ゆっくり流れる） ---- */
.sac-hero__scroll {
	position: absolute; right: 32px; top: calc(100vh - 250px);
	z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none;
}
.sac-hero__scroll b {
	writing-mode: vertical-rl; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0.32em;
	color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.sac-hero__scroll i { position: relative; display: block; width: 2px; height: 72px; overflow: hidden; background: rgba(255, 255, 255, 0.35); }
.sac-hero__scroll i::before {
	content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #fff;
	animation: sac-scrollbar 2.4s ease-in-out infinite;
}
@keyframes sac-scrollbar { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }

.sac-hero__marquee {
	position: absolute; left: 0; right: 0; top: calc(var(--sac-hero-h) - 74px); height: 300px;   /* 文字が見切れないよう、文字の高さ（300px）ぶん確保 */
	overflow: hidden; z-index: 0; pointer-events: none;
}
.sac-hero__marquee-track { display: flex; width: max-content; animation: sac-marquee 60s linear infinite; }
.sac-hero__marquee-track span {
	flex: none; padding-right: 5vw; white-space: nowrap;
	font: 100 300px/300px 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	color: rgba(236, 122, 155, 0.35);
}
@keyframes sac-marquee { to { transform: translateX(-50%); } }

/* ---- 動きを減らす設定の人には、動きを止める ---- */
@media (prefers-reduced-motion: reduce) {
	.sac-hero__grad, .sac-hero__slides li.is-active img, .sac-line::before,
	.sac-hero__scroll i::before, .sac-hero__marquee-track { animation: none !important; }
}

/* ---- タブレット・スマホ（1024px以下）：縦に並べる ---- */
@media (max-width: 1024px) {
	:root { --sac-hero-h: auto; }
	.sac-hero__side { display: none; }
	.sac-hero { display: flex; flex-direction: column; height: auto; padding: 110px 20px 48px; }
	.sac-hero__catch { position: relative; order: 1; left: auto; top: auto; bottom: auto; width: auto; max-width: 640px; margin: 0 auto; }
	.sac-hero__title { font-size: clamp(34px, 9vw, 52px); line-height: 1.5; letter-spacing: 0.08em; }
	.sac-hero__text { width: auto; font-size: 15px; line-height: 1.9; margin-top: 16px; }
	.sac-hero__cta { margin-top: 28px; height: 60px; padding: 0 32px; font-size: 15px; }
	.sac-hero__slides {
		position: relative; order: 2; left: auto; width: 100%; max-width: 520px; height: 75vw; max-height: 420px;
		margin: 32px auto 0; clip-path: circle(50% at 50% 50%);
	}
	.sac-hero__blob, .sac-hero__ring, .sac-line, .sac-hero__marquee, .sac-hero__scroll { display: none; }
	.sac-hero__dots { width: 100%; }
}

/* =============================================================
 * ヘッダー「事業紹介」のサブメニュー（案B：2列のメガメニュー・写真付き。2026-10-19）
 * ============================================================= */
@media (min-width: 1025px) {
	body #masthead .has-submenu { position: relative; }
	body #masthead .submenu {
		display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
		visibility: hidden; opacity: 0; pointer-events: none;
		position: absolute; top: calc(100% + 10px); left: 50%; z-index: 999;
		width: 640px; margin: 0; padding: 14px; list-style: none; box-sizing: border-box;
		background: #fff; border: 0; border-radius: 24px;
		box-shadow: 0 18px 44px rgba(0, 48, 64, 0.18);
		transform: translate(-50%, -10px) scale(.98); transform-origin: 50% 0;
		transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1), visibility .3s;
	}
	/* 触れたまま、すき間を通ってもメニューが消えないようにする橋 */
	body #masthead .submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
	body #masthead .has-submenu:hover .submenu,
	body #masthead .has-submenu:focus-within .submenu { visibility: visible; opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
	body #masthead .submenu li { padding: 0; text-align: left; white-space: normal; }
	body #masthead .submenu li a { display: block; padding: 8px 8px 12px; border-radius: 16px; color: #003040; text-decoration: none; transition: background .25s ease; }
	body #masthead .submenu li a:hover { background: #eef5fa; color: #003040; }
	body #masthead .submenu li a::before { content: ""; display: block; height: 104px; margin-bottom: 10px; border-radius: 14px; background: #e3e8eb center / cover no-repeat; transition: transform .4s ease; }
	body #masthead .submenu li:nth-child(1) a::before { background-image: url("../images/service-ai-consulting.jpg"); }
	body #masthead .submenu li:nth-child(2) a::before { background-image: url("../images/service-ai-seminar.jpg"); }
	body #masthead .submenu li:nth-child(3) a::before { background-image: url("../images/service-system.jpg"); }
	body #masthead .submenu li:nth-child(4) a::before { background-image: url("../images/service-homepage.jpg"); }
	body #masthead .submenu li a:hover::before { transform: scale(1.03); }
	body #masthead .sm-txt { display: block; padding: 0 6px; }
	body #masthead .sm-txt b { display: block; font-size: 15px; line-height: 22px; font-weight: 700; letter-spacing: .04em; }
	body #masthead .sm-txt small { display: block; margin-top: 1px; font-size: 12px; line-height: 18px; font-weight: 500; color: #5b6e77; letter-spacing: .03em; }
}

/* =============================================================
 * 表示確認の修正（2026-10-20）
 * ① ヘッダー：画面幅1025〜1249px（iPad横・小さめのノートPC）で右端がはみ出すため、余白と文字をやや詰める。
 *    1250px以上（通常のPC）は、上のルールのまま変わらない。
 * ② ホームのヒーローのボタン：スマホで文言が2行になるとき、ボタンの高さを伸ばして収める。
 * 戻すとき：backup\2026-10-20_表示確認の修正前\css\ の同名ファイルで上書き
 * ============================================================= */
@media (min-width: 1025px) and (max-width: 1249px) {
	body #masthead .header-container { padding: 0 12px 0 20px !important; }
	body #masthead .header-logo img { height: 64px; max-height: 64px; }
	body #masthead .header-menu-wrapper { padding: 0 12px 0 28px !important; }
	body #masthead .nav-link { padding: 0 12px 0 8px; }
	body #masthead .nav-en { font-size: 17px; padding-left: 1rem; }
	body #masthead .nav-ja { padding-left: 1rem; }
	body #masthead .contact-button,
	body #masthead .recrui-button { padding: 0 20px; font-size: 14px; }
	body #masthead .contact-button { min-width: 0; }
	body #masthead .recrui-button { padding-right: 28px; }
}
@media (max-width: 1024px) {
	.sac-hero__cta { height: auto; min-height: 60px; padding: 14px 32px; line-height: 1.5; text-align: center; justify-content: center; box-sizing: border-box; max-width: 100%; }
}
