/* common.css … ヘッダー・フッター・共通パーツ */

/* ==========================================================
   アイコン（色は background-color で変えられる）
   ========================================================== */
.c-icon {
	display: block;
	background-color: var(--c-blue);
	-webkit-mask: var(--icon) no-repeat center / contain;
	mask: var(--icon) no-repeat center / contain;
	transition: background-color var(--dur-hover) var(--ease);
}
.c-icon--mail  { --icon: url(../images/icon-mail.svg);  width: 20px; height: 17px; }
.c-icon--phone { --icon: url(../images/icon-phone.svg); width: 24px; height: 24px; }


/* ==========================================================
   ヘッダー（PC: 1600 基準。1200〜1600 は位置だけ線形に縮む）
   ========================================================== */
/* 上部に固定。fixed ではなく sticky にしている
   （viewport を 390 に矯正した端末で fixed の幅が 1px はみ出すため） */
.l-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--c-white);
}
.l-header__inner {
	container-type: inline-size; /* 中の cqw は「ヘッダー幅（最大1600）」の% */
	position: relative;
	z-index: 1;                  /* SP メニューパネルより手前 */
	background: var(--c-white);
	max-width: 1600px;
	height: var(--header-h);
	margin: 0 auto;
}

/* ロゴ */
.l-header__logo {
	position: absolute;
	top: 22px;
	left: 40px;
	width: 149px;
}

/* ナビ（原案 2026-11-11: 14px、文字の右端は右から 400px。電話番号との間は約 38px。1200〜1600 とも同じ）
   旧: 15px、右端 1200=404.6px / 1600=453.5px */
.l-header__nav {
	position: absolute;
	top: -2px;           /* 調整: Figma の文字の縦中心（y≈38.5）に合わせる */
	right: 400px;
	height: 100%;
	display: flex;
	align-items: center;
}
.c-gnav {
	display: flex;
	font-size: 14px;     /* 原案（旧 15px） */
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}
.c-gnav__item { display: flex; } /* li 内の改行が空白として入らないように */
/* 区切り「　|　」（Figma の文字組みどおり、全角スペースで挟む） */
.c-gnav__item + .c-gnav__item::before {
	content: "\3000|\3000";
}
.c-gnav__item a {
	display: inline-block;
	padding: 10px;       /* クリック範囲を上下左右 10px 広げる */
	margin: -10px;       /* 見た目の位置は変えない */
	transition: color var(--dur-hover) var(--ease);
}
.c-gnav__item.is-current a { color: var(--c-blue); }

/* 電話番号（原案 2026-11-11: 20px、文字の右端は右から 180px＝区切り線の 39px 左。旧 22px・1200=172.9px / 1600=202.6px） */
.l-header__tel {
	position: absolute;
	top: 0;
	right: 170px;        /* 文字の右端 180px から右の余白 10px 分を引いた値 */
	height: 100%;
	display: flex;
	align-items: center;
	padding: 0 10px;     /* クリック範囲（縦はヘッダーの高さいっぱい） */
	font-family: var(--ff-en);
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .05em;
	white-space: nowrap;
	transition: color var(--dur-hover) var(--ease);
}

/* Contact（区切り線から右端まで。原案 2026-11-11: 幅 141px 固定。旧 1200=142.3px / 1600=162.1px） */
.l-header__contact {
	position: absolute;
	top: 0;
	right: 0;
	width: 141px;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: color var(--dur-hover) var(--ease);
}
.l-header__contact::before { /* 左の縦線 */
	content: "";
	position: absolute;
	top: 15px;           /* 原案（旧 11.5 / 57） */
	left: 0;
	width: 1px;
	height: 50px;
	background: var(--c-line);
}
.l-header__contact .c-icon { margin-top: 20px; }   /* 原案（旧 17px） */
.l-header__contact-label {
	margin-top: 7px;    /* 調整: 「Contact」の上端を y=46 に */
	font-family: var(--ff-en);
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .05em;
}

/* hover: ふわっとグレー */
@media (hover: hover) {
	.c-gnav__item a:hover,
	.l-header__tel:hover,
	.l-header__contact:hover { color: var(--c-hover); }
	.l-header__contact:hover .c-icon { background-color: var(--c-hover); }
}

/* SP 専用の要素は PC では出さない */
.l-header__toggle,
.l-spmenu,
.l-spbar { display: none; }


/* ==========================================================
   ヘッダー SP（390 基準）
   ========================================================== */
@media (max-width: 568px) {
	/* 本文が短いページでも下部バーを画面の下端に置くため、body を縦並びの画面高にする */
	body {
		display: flex;
		flex-direction: column;
		min-height: 100dvh;
	}

	.l-header__logo {
		top: 26px;
		left: 20px;
		width: 120px;
	}
	.l-header__nav,
	.l-header__tel,
	.l-header__contact { display: none; }

	/* メニュー開閉ボタン（右端 80×80） */
	.l-header__toggle {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		width: 80px;
		height: 80px;
	}
	.l-header__toggle span {
		position: absolute;
		left: 25px;
		width: 30px;
		height: 2px;
		background: var(--c-blue);
		transition: transform .3s var(--ease), opacity .2s;
	}
	.l-header__toggle span:nth-child(1) { top: 29px; }
	.l-header__toggle span:nth-child(2) { top: 39px; }
	.l-header__toggle span:nth-child(3) { top: 49px; }
	/* 開いたとき: × */
	.is-menu-open .l-header__toggle span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
	.is-menu-open .l-header__toggle span:nth-child(2) { opacity: 0; }
	.is-menu-open .l-header__toggle span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

	/* メニューパネル（ヘッダー直下に重ねる） */
	.l-spmenu {
		display: block;
		position: absolute;
		top: var(--header-h);
		left: 0;
		z-index: 0;             /* ヘッダー（z-index:1）の裏から出てくる */
		width: 100%;
		height: 400px;
		background: rgba(48, 53, 58, .95); /* #30353a 95% */
		border-radius: 0 0 20px 20px;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-24px);
		transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
	}
	.is-menu-open .l-spmenu {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.l-spmenu__list {
		padding: 31px 0 33px; /* 調整: 項目の縦位置を Figma に合わせる */
		text-align: center;
		font-size: 20px;
		font-weight: 700;
		line-height: 56px;      /* Figma: 行高 2.8 */
		color: var(--c-white);
	}
	.l-spmenu__list a {
		display: inline-block;
		padding: 0 20px;
	}

	/* 画面下の Phone / Contact バー（body の最後に置き、sticky で下に固定） */
	.l-spbar {
		display: flex;
		position: sticky;
		bottom: 0;
		z-index: 90;
		margin-top: calc(var(--spbar-h) * -1); /* フッター下の紺の余白（.l-footer の padding-bottom）に重ねる */
		height: var(--spbar-h);
		background: var(--c-white);
		transition: opacity .3s var(--ease), visibility .3s;
	}
	.l-spbar.is-hidden {     /* 下スクロール中は消す（main.js） */
		opacity: 0;
		visibility: hidden;
	}
	.l-spbar__link {
		position: relative;
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		font-family: var(--ff-en);
		font-size: 16px;
		font-weight: 600;
		letter-spacing: .05em;
	}
	.l-spbar__link .c-icon { position: absolute; }
	.l-spbar__link--tel .c-icon { top: 18px; left: 20px; }
	.l-spbar__link--mail .c-icon { /* Figma の SP 版は 20×15 */
		top: 23px; left: 28px; width: 20px; height: 15px;
		-webkit-mask-size: 100% 100%; mask-size: 100% 100%;
	}
	.l-spbar__link--mail::before { /* 中央の区切り線 */
		content: "";
		position: absolute;
		top: 15px;
		left: -1px;
		width: 1px;
		height: 30px;
		border-radius: 8px;
		background: #8d8d8d;
	}
}


/* ==========================================================
   フッター（PC: 1600 基準。1200〜1600 は左右の余白だけ線形に縮む）
   縦の位置は 1600 / 1200 共通（Figma の高さ 649 = ロゴのはみ出し 38 + 帯 611）
   ========================================================== */
.l-footer {
	--footer-top: 38px; /* ロゴが帯の上にはみ出す分（この部分は透明） */
	padding-top: var(--footer-top);
	background: linear-gradient(var(--c-navy), var(--c-navy)) 0 var(--footer-top) / 100% 100% no-repeat;
	color: var(--c-white);
}
.l-footer__inner {
	container-type: inline-size; /* 中の cqw は「フッター幅（最大1600）」の% */
	position: relative;
	max-width: 1600px;
	margin: 0 auto;
}

/* ロゴ（帯の上端にかかるタブ） */
.l-footer__logo {
	position: absolute;
	top: calc(var(--footer-top) * -1);
	left: 50%;
	width: 300px;
	translate: -50% 0;
}

/* 左右の余白: 1200=60px / 1600=100px */
.l-footer__body {
	--pad: clamp(60px, 10cqw - 60px, 100px);
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 0 var(--pad);
}

/* --- 会社情報 --- */
.l-footer__info {
	padding-top: 113px;  /* 調整: 社名の位置 */
	font-weight: 700;
	line-height: 1;
}
.l-footer__company {
	font-size: 20px;
}
.l-footer__address {
	margin-top: 27px;
	font-size: 16px;
}
.l-footer__lead {
	margin-top: 27px;
	font-size: 14px;
}
.l-footer__tel {
	display: flex;
	align-items: baseline;
	margin-top: 19px;
	font-family: var(--ff-en);
	font-weight: 600;
	white-space: nowrap;
}
.l-footer__tel-link {
	font-size: 30px;
	letter-spacing: .05em;
	transition: opacity var(--dur-hover) var(--ease);
}
.l-footer__fax {
	margin-left: 24px;  /* 調整: TEL との間 */
	font-size: 20px;
	letter-spacing: .05em;
}
/* 営業時間（3つの開始位置は Figma どおり 0 / 66 / 181px） */
.l-footer__hours {
	display: flex;
	margin-top: 13px;
	font-size: 14px;
	white-space: nowrap;
}
.l-footer__hours-label { width: 66px; }
.l-footer__hours-time {
	width: 115px;
	font-family: var(--ff-en);
	font-weight: 600;
	letter-spacing: .05em;
}

/* Contact ボタン（280×60 の角丸。SP は 230×50。フッター以外のページでも使う） */
.l-footer__info .c-contact-btn { margin-top: 39px; }
.c-contact-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 280px;
	height: 60px;
	border-radius: 50px;
	background: var(--c-dark);
	color: var(--c-white);
	transition: background-color var(--dur-hover) var(--ease);
}
.c-contact-btn__label {
	font-family: var(--ff-en);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: .05em;
}
.c-contact-btn .c-icon { position: absolute; top: 50%; translate: 0 -50%; }
.c-contact-btn .c-icon--mail-s { left: 20px; }
.c-contact-btn .c-icon--arrow  { right: 20px; background-color: var(--c-white); }
.c-icon--mail-s { --icon: url(../images/icon-mail-s.svg); width: 20px; height: 15px; }
.c-icon--arrow  { --icon: url(../images/icon-arrow.svg);  width: 12px; height: 16px; }
.c-icon--pin    { --icon: url(../images/icon-pin.svg);    width: 20px; height: 27px; }  /* 設置情報・トップで使う */

/* --- ナビ（右上に1行。区切りは「　|　」） --- */
.l-footer__nav {
	position: absolute;  /* 右上に置く（1200 では会社情報と横の範囲が重なるため、列にしない） */
	top: 117px;          /* 調整: 社名と上端をそろえる */
	right: var(--pad);
}
.c-fnav {
	display: flex;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}
.c-fnav__item { display: flex; }
.c-fnav__item + .c-fnav__item::before { content: "\3000|\3000"; }
.c-fnav__item a {
	padding: 10px;       /* クリック範囲を上下左右 10px 広げる */
	margin: -10px;
	transition: opacity var(--dur-hover) var(--ease);
}

/* --- 英文のあしらい（1600〜1200 は文字サイズごと縮めて常に1行。1600 以上は 1600 のまま） ---
   文字サイズ = 1600 の値 × (中身の幅 / 1400)。中身の幅は 0.8×フッター幅 + 120px */
.l-footer__tagline {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 80px;    /* 調整: ベースラインを y=553 に */
	font-family: var(--ff-en);
	color: var(--c-blue);
	line-height: 1;
	white-space: nowrap;
}
.l-footer__tagline-main {
	font-size: calc(2.8571cqw + 4.2857px);  /* 1600=50px / 1200=38.6px */
	line-height: 50px;   /* 文字が縮んでも行の高さは固定（下の要素を動かさない） */
	font-weight: 600;
	letter-spacing: .05em;
}
.l-footer__tagline-sub {
	font-size: calc(.9143cqw + 1.3714px);   /* 原案 2026-11-11: 1600=16px / 1200=12.3px（旧 24px、字間 .078em） */
	font-weight: 500;
	letter-spacing: .05em;
	margin-right: -.05em;   /* 末尾の字間を除き、右端を線の端にそろえる */
}

/* --- 最下段（上に青い線） --- */
.l-footer__bottom {
	display: flex;
	flex-direction: row-reverse; /* HTML はリンクが先。PC はコピーライトを左に */
	justify-content: space-between;
	align-items: baseline;
	margin-top: 18px;
	padding: 27px 0 28px;
	border-top: 1px solid var(--c-blue);
	line-height: 1;
}
.l-footer__links {
	display: flex;
	font-size: 12px;     /* 原案 2026-11-11（旧 14px） */
	font-weight: 500;
}
.l-footer__links li + li { margin-left: 2em; } /* Figma: 全角スペース2つ */
.l-footer__links a { transition: opacity var(--dur-hover) var(--ease); }
.l-footer__copy {
	font-family: var(--ff-en);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .05em;
}

/* hover: 白い文字は少し薄く、ボタンは少し明るく */
@media (hover: hover) {
	.l-footer a:not(.c-contact-btn):hover { opacity: .6; }
	.c-contact-btn:hover { background-color: #464c52; }
}


/* ==========================================================
   フッター SP（390 基準。すべて中央揃えの縦並び）
   ========================================================== */
@media (max-width: 568px) {
	.l-footer {
		--footer-top: 23px;
		margin-top: auto;                  /* 本文が短いときもフッターとバーを画面の下端へ */
		padding-bottom: var(--spbar-h);    /* 下部バーの分。バーが消えても紺が続く */
	}
	.l-footer__logo { width: 180px; }

	.l-footer__body {
		--pad: 30px;
		text-align: center;
	}

	/* --- 会社情報 --- */
	.l-footer__info {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding-top: 77px;   /* 調整: 社名の位置 */
	}
	.l-footer__address { margin-top: 28px; }
	.l-footer__lead    { margin-top: 27px; }
	.l-footer__tel {          /* TEL と FAX は2行に */
		flex-direction: column;
		align-items: center;
		margin-top: 15px;
	}
	.l-footer__fax { margin: 13px 0 0; }
	.l-footer__hours {
		justify-content: center;
		margin-top: 24px;
	}
	.l-footer__hours { text-align: left; }  /* 3つの開始位置は PC と同じ */
	.c-contact-btn {
		width: 230px;
		height: 50px;
	}
	.c-contact-btn .c-icon--arrow { right: 15px; width: 8px; height: 12px; }

	/* --- ナビ（2列×3行。列の間に縦線） --- */
	.l-footer__nav {
		position: static;
		margin-top: 50px;
	}
	.c-fnav {
		display: grid;
		grid-template-columns: 1fr 1fr;
		font-size: 14px;
	}
	.c-fnav__item {
		position: relative;
		justify-content: center;
		line-height: 40px;   /* 1行 40px（Figma の行の間隔） */
	}
	.c-fnav__item + .c-fnav__item::before { content: none; }
	.c-fnav__item:nth-child(even)::after { /* 縦線 */
		content: "";
		position: absolute;
		top: 10px;
		left: -1px;
		width: 1px;
		height: 20px;
		background: var(--c-white);
	}
	.c-fnav__item a {
		padding: 0 20px;
		margin: 0;
	}

	/* --- 英文のあしらい（左揃え・2段。390 のバランスのまま、中身の幅 (画面幅 - 60) に比例して文字ごと拡大縮小） --- */
	.l-footer__tagline {
		flex-direction: column;
		align-items: flex-start;
		margin-top: 45px;
		text-align: left;
		white-space: normal;
	}
	.l-footer__tagline-main {
		font-size: calc(9.697cqw - 5.818px);   /* 32px × (幅 - 60) / 330。390=32px / 568=49.3px */
		white-space: nowrap;
		line-height: 1;
	}
	.l-footer__tagline-sub {
		margin-top: calc(2.4242cqw - 1.4545px); /* 8px を同じ比率で */
		font-size: calc(4.2424cqw - 2.5455px);  /* 14px を同じ比率で。390=14px / 568=21.6px */
		line-height: 1.6;
		letter-spacing: .05em;
		margin-right: 0;
	}

	/* --- 最下段（リンクが上、コピーライトが下） --- */
	.l-footer__bottom {
		flex-direction: column;
		align-items: center;
		margin-top: 11px;
		padding: 20px 0 29px;
	}
	.l-footer__links { font-size: 12px; }
	.l-footer__copy {
		margin-top: 21px;
		font-size: 10px;
	}
}
