/*
 * 新デザイン共通 CSS (トップ・下層ページで共有)
 * トークン、リセット、ボタン、グローバルナビ (ヘッダー / ドロワー)、フッター。
 * 新デザインのページでは親テーマの CSS を一切読み込まないので、リセットから自前で持つ。
 *
 * Figma: andfactoryHPデザイン_2026 (GlobalNavi / GlobalNaviMini / BottomNavi / Button)
 *   - コンテンツ最大幅 1200px、ガター 40px (768px 以下は 24px)
 *   - 1100px 以下: ヘッダーの余白を詰める
 *   - 1024px 以下: フッター 2列→1列
 *   -  960px 以下: グローバルナビ → ロゴ + ハンバーガー
 *   -  768px 以下: フッターのサイトマップをアコーディオンに
 */

/* ------------------------------------------------------------------
 * Tokens (Figma variables)
 * ---------------------------------------------------------------- */
:root {
	--af-font-jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	--af-font-en: Roboto, "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;

	--af-fg: #343434;
	--af-fg-sub: #676767;
	--af-fg-light: #9f9f9f;
	--af-fg-accent: #007bbb;
	--af-fg-accent-ondark: #5cabd4;
	--af-bg: #ffffff;
	--af-bg-accent: #e6f2f8;
	--af-bg-inset: #f4f4f4;
	--af-bg-accent-emphasis: #007bbb;
	--af-bg-emphasis: #0a0a0a;
	--af-border: #9f9f9f;
	--af-border-sub: #d8d8d8;

	--af-cat-blue: #1774a5;
	--af-cat-blue-bg: #e6f2f8;
	--af-cat-gray: #606060;
	--af-cat-gray-bg: #efefef;
	--af-cat-yellow: #806b00;
	--af-cat-yellow-bg: #f3efd7;
	--af-cat-orange: #bd4408;
	--af-cat-orange-bg: #f8ece6;
	--af-cat-green: #007a66;
	--af-cat-green-bg: #e5f2f0;
	--af-cat-red: #c8314a;
	--af-cat-red-bg: #faeaed;

	--af-gutter: 40px;
	--af-content-max: 1200px;
}

/* ------------------------------------------------------------------
 * Reset
 * ---------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body.af2026 {
	margin: 0;
	font-family: var(--af-font-jp);
	font-weight: 500;
	line-height: 1.75;
	color: var(--af-fg);
	background: var(--af-bg);
	overflow-x: hidden;
}

body.af2026.is-menu-open {
	overflow: hidden;
}

[hidden] {
	display: none !important;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
}

button {
	font: inherit;
	color: inherit;
}

h1,
h2,
h3,
p,
ul {
	margin: 0;
}

ul {
	padding: 0;
	list-style: none;
}

/* ------------------------------------------------------------------
 * Buttons (Figma: Button size=L type=filled / outline)
 * ---------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 218px;
	padding: 16px 24px 16px 48px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	line-height: 28px;
	text-decoration: none;
	transition: opacity 0.2s;
}

.btn:hover {
	opacity: 0.8;
}

.btn__label {
	flex: 1 0 0;
	text-align: center;
	white-space: nowrap;
}

/* 白い円の外側に 3px の縁取り (Figma: stroke #fff 20%、外側揃え。円の内側に描くと白地に消えるため box-shadow で外に出す) */
.btn__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.btn__icon img {
	width: 16px;
	height: 16px;
}

.btn--filled {
	background: var(--af-bg-accent-emphasis);
	color: #fff;
}

.btn--outline {
	border: 2px solid #fff;
	color: #fff;
}

/* outline も filled と同じ半透明の縁取り (デザイナー指示 2026-09-02) */
.btn--outline .btn__icon {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* SP だけで効かせる改行 (メッセージ本文)。PC では非表示 */
.sp-br {
	display: none;
}

/* ------------------------------------------------------------------
 * Header (Figma: GlobalNavi / GlobalNaviMini)
 * ---------------------------------------------------------------- */
.gnav {
	position: relative;
	z-index: 100;
	background: var(--af-bg);
}

.gnav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 40px;
}

.gnav__logo {
	display: block;
	flex: none;
}

.gnav__logo img {
	width: 195px;
	height: 32px;
}

.gnav__menu {
	display: flex;
	align-items: flex-start;
}

.gnav__menu li {
	display: block;
}

.gnav__menu a {
	display: block;
	padding: 8px 24px;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	text-decoration: none;
	color: var(--af-fg);
	transition: color 0.2s;
}

.gnav__menu a:hover,
.gnav__menu .current-menu-item > a {
	color: var(--af-fg-accent);
}

.gnav__toggle {
	display: none;
	position: relative;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

/* 2 本線 (Figma の List アイコンと同寸: 幅 23px、太さ 3px、y=10 / 22)。開くと現行サイトと同じ 0.35s ease で X に変形 */
.gnav__toggle-bar {
	position: absolute;
	left: 4.5px;
	width: 23px;
	height: 3px;
	border-radius: 1.5px;
	background: var(--af-fg);
	transition: transform 0.35s ease;
}

.gnav__toggle-bar:nth-child(1) {
	top: 8.5px;
}

.gnav__toggle-bar:nth-child(2) {
	top: 20.5px;
}

.gnav__toggle[aria-expanded="true"] .gnav__toggle-bar:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.gnav__toggle[aria-expanded="true"] .gnav__toggle-bar:nth-child(2) {
	transform: translateY(-6px) rotate(-45deg);
}

/* SP ドロワー (Figma に開いた状態のデザインは無いので、トークンに合わせて簡潔に構成) */
.gnav__drawer {
	position: fixed;
	top: 64px;
	left: 0;
	right: 0;
	bottom: 0;
	overflow-y: auto;
	background: var(--af-bg);
	padding: 8px 24px 40px;
	/* 現行サイトと同じフェード (jQuery fadeToggle 相当の 0.4s)。開閉は JS が .is-open を付け外しする */
	opacity: 0;
	transition: opacity 0.4s ease;
}

.gnav__drawer.is-open {
	opacity: 1;
}

.gnav__drawer-menu li {
	border-bottom: 0.5px solid var(--af-border-sub);
}

.gnav__drawer-menu a {
	display: block;
	padding: 24px 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 16px;
	color: var(--af-fg-accent);
	text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {

	.gnav__toggle-bar,
.gnav__drawer {
		transition: none;
	}
}

/* ------------------------------------------------------------------
 * IR の書類一覧 (Figma: IRNewsList, IRLibraryLabel)
 * トップの IR NEWS と IR 情報の各ページ・コーポレートガバナンスで共有 (template-parts/ir/news-item.php)
 * ---------------------------------------------------------------- */
.ir-item + .ir-item {
	border-top: 1px solid var(--af-border-sub);
}

.ir-item__row {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 104px;
	padding: 24px 8px;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.2s;
}

.ir-item__meta {
	flex: none;
	display: flex;
	align-items: center;
	gap: 24px;
}

.ir-item__date {
	font-size: 14px;
	font-weight: 500;
	line-height: 28px;
	color: var(--af-fg-sub);
	white-space: nowrap;
}

.ir-label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 110px;
	min-height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	line-height: 24px;
	text-align: center;
	white-space: nowrap;
	background: var(--af-cat-gray-bg);
	color: var(--af-cat-gray);
}

.ir-label--blue {
	background: var(--af-cat-blue-bg);
	color: var(--af-cat-blue);
}

.ir-label--yellow {
	background: var(--af-cat-yellow-bg);
	color: var(--af-cat-yellow);
}

.ir-label--orange {
	background: var(--af-cat-orange-bg);
	color: var(--af-cat-orange);
}

.ir-label--green {
	background: var(--af-cat-green-bg);
	color: var(--af-cat-green);
}

.ir-label--red {
	background: var(--af-cat-red-bg);
	color: var(--af-cat-red);
}

.ir-item__main {
	flex: 1 0 0;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 24px;
}

.ir-item__title {
	flex: 1 0 0;
	min-width: 0;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	line-height: 28px;
	color: var(--af-fg);
	word-break: break-word;
}

.ir-item__pdf {
	flex: none;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--af-bg-emphasis);
}

.ir-item__pdf img {
	width: 16px;
	height: 16px;
}

.ir__empty {
	padding: 24px 8px;
	font-size: 14px;
	line-height: 28px;
	color: var(--af-fg-sub);
}

a.ir-item__row:hover {
	background: var(--af-bg-inset);
}

@media (max-width: 768px) {
	.ir-item__title {
		font-size: 14px;
		line-height: 24px;
	}

	.ir-item__date,
	.ir-label {
		line-height: 24px;
	}

	.ir-item__row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		min-height: 0;
		padding: 16px 8px;
	}

	.ir-item__meta {
		gap: 8px;
	}

	.ir-item__main {
		gap: 16px;
	}
}

/* ------------------------------------------------------------------
 * Footer (Figma: BottomNavi)
 * ---------------------------------------------------------------- */
.footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 var(--af-gutter);
	border-top: 0.5px solid var(--af-border-sub);
}

.footer__inner {
	width: 100%;
	max-width: var(--af-content-max);
	display: flex;
	flex-direction: column;
	gap: 48px;
	padding: 64px 0;
}

.footer__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 56px;
}

.footer__brand {
	flex: none;
	min-width: 445px;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.footer__logo {
	display: block;
}

.footer__logo img {
	width: 195px;
	height: 32px;
}

.footer__company {
	display: flex;
	flex-direction: column;
	gap: 8px;
	line-height: 28px;
}

.footer__company-name {
	font-size: 16px;
	font-weight: 700;
}

.footer__company-address {
	font-size: 14px;
	font-weight: 500;
}

/* 会社 SNS (Figma: BottomNavi > SNS)。アイコンは 32px 四方 */
.footer__sns {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer__sns-link {
	display: block;
	width: 32px;
	height: 32px;
	transition: opacity 0.2s;
}

.footer__sns-link:hover {
	opacity: 0.6;
}

.footer__sns-link img {
	display: block;
	width: 32px;
	height: 32px;
}

/* Facebook のロゴ (22px) は Figma どおり 32px の枠の内側に置く (上・左 5.5px、右・下 4.5px) */
.footer__sns-link--facebook {
	padding: 5.5px 4.5px 4.5px 5.5px;
}

.footer__sns-link--facebook img {
	width: 22px;
	height: 22px;
}

.footer__nav {
	flex: 1 0 0;
	min-width: 445px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.footer__sitemap {
	display: flex;
	gap: 10px;
}

.footer__col {
	flex: 1 0 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.footer__head {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 16px;
	color: var(--af-fg-accent);
	text-decoration: none;
	white-space: nowrap;
}

.footer__head:hover {
	text-decoration: underline;
}

.footer__acc {
	display: none;
}

.footer__links {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.footer__links a {
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	color: var(--af-fg);
	text-decoration: none;
	white-space: nowrap;
}

.footer__links a:hover {
	text-decoration: underline;
}

.footer__ext {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.ext-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px;
	border: 0.5px solid var(--af-border);
	border-radius: 8px;
	text-decoration: none;
	color: var(--af-fg);
	transition: background-color 0.2s;
}

.ext-btn:hover {
	background: var(--af-bg-inset);
}

.ext-btn__note {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 26px;
}

.ext-btn__note img {
	width: 53px;
	height: 12px;
}

.ext-btn__label {
	flex: 1 0 0;
	min-width: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 28px;
}

.ext-btn__icon {
	flex: none;
	width: 16px;
	height: 16px;
}

.footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0 24px;
	padding: 24px 32px;
	border-radius: 16px;
	background: var(--af-bg-inset);
}

.footer__legal {
	flex: 1 0 0;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
}

.footer__legal a {
	font-size: 12px;
	font-weight: 500;
	line-height: 24px;
	color: var(--af-fg-sub);
	text-decoration: none;
	white-space: nowrap;
}

.footer__legal a:hover {
	text-decoration: underline;
}

.footer__copyright {
	font-size: 11px;
	font-weight: 500;
	line-height: 20px;
	color: var(--af-fg-light);
	white-space: nowrap;
}

/* ------------------------------------------------------------------
 * <= 1100px: ヘッダーの余白を詰める (961〜1100px でメニュー 7 項目がはみ出すため)
 * ---------------------------------------------------------------- */
@media (max-width: 1100px) {
	.gnav__inner {
		padding: 24px;
	}

	.gnav__menu a {
		padding: 8px 16px;
	}
}

/* ------------------------------------------------------------------
 * <= 1024px: NEWS 1列、フッター 1列、事業トグルはサムネイル無し
 * ---------------------------------------------------------------- */
@media (max-width: 1024px) {

	.footer__brand,
	.footer__nav {
		min-width: 100%;
	}
}

/* ------------------------------------------------------------------
 * <= 960px: ヘッダーをミニ化 (ロゴ + ハンバーガー)
 * ---------------------------------------------------------------- */
@media (max-width: 960px) {
	.gnav__inner {
		height: 64px;
		padding: 0 24px;
	}

	.gnav__logo img {
		width: 147px;
		height: 24px;
	}

	.gnav__nav {
		display: none;
	}

	.gnav__toggle {
		display: block;
	}
}

/* ------------------------------------------------------------------
 * <= 768px: SP
 * ---------------------------------------------------------------- */
@media (max-width: 768px) {
	:root {
		--af-gutter: 24px;
	}

	.sp-br {
		display: inline;
	}

	/* footer */
	.footer__inner {
		gap: 32px;
		padding: 40px 0;
	}

	.footer__top {
		gap: 32px;
	}

	/* flex: none だと内容の最大幅で確保されて 320px 幅ではみ出すので、幅を親に合わせる */
	.footer__brand {
		flex: 0 1 100%;
		width: 100%;
		min-width: 0;
	}

	.footer__company {
		gap: 0;
	}

	.footer__company-address {
		word-break: break-all;
	}

	.footer__nav {
		flex: 0 1 100%;
		width: 100%;
		min-width: 0;
		gap: 32px;
	}

	.footer__sitemap {
		flex-direction: column;
		gap: 0;
	}

	.footer__col {
		gap: 0;
	}

	.footer__col--group .footer__head--pc {
		display: none;
	}

	.footer__col--group {
		border-bottom: 0.5px solid var(--af-border-sub);
	}

	.footer__acc {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		padding: 24px 8px;
		border: 0;
		background: transparent;
		text-align: left;
		cursor: pointer;
	}

	.footer__acc-label {
		flex: 1 0 0;
		font-size: 16px;
		font-weight: 700;
		line-height: 16px;
		color: var(--af-fg-accent);
	}

	.footer__acc-icon {
		flex: none;
		width: 16px;
		height: 16px;
	}

	.footer__acc[aria-expanded="true"] .footer__acc-icon--open,
	.footer__acc[aria-expanded="false"] .footer__acc-icon--close {
		display: none;
	}

	.footer__col--group .footer__links {
		display: none;
		gap: 0;
		padding-bottom: 8px;
	}

	.footer__col--group.is-open .footer__links {
		display: flex;
	}

	.footer__col--group .footer__links a {
		display: block;
		padding: 16px 8px;
	}

	.footer__col--heads .footer__head {
		padding: 24px 8px;
		border-bottom: 0.5px solid var(--af-border-sub);
	}

	.footer__ext {
		grid-template-columns: minmax(0, 1fr);
	}

	.footer__bottom {
		flex-direction: column;
		align-items: center;
		gap: 24px;
		padding: 24px 16px;
	}

	.footer__legal {
		flex: none;
		justify-content: center;
		gap: 16px 32px;
	}

	.footer__legal a {
		line-height: 12px;
	}
}

/* ------------------------------------------------------------------
 * セクション見出し・NEWS 一覧 (トップの NEWS と、サービス詳細の関連ニュースで共通)
 * ---------------------------------------------------------------- */
/* SP でコンテンツ一覧の下に置く「一覧を見る」。PC では非表示 */
.section-more {
	display: none;
}

/* Section header (Figma: SectionHeader primary / inverse) */
.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 16px;
	width: 100%;
}

.section-head__text {
	flex: 1 0 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	color: var(--af-fg-accent);
}

.section-head--inverse .section-head__text {
	color: #fff;
}

.section-head__sub {
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	letter-spacing: 0.24em;
}

.section-head__title {
	font-family: var(--af-font-en);
	font-size: 88px;
	font-weight: 900;
	line-height: 56px;
	letter-spacing: 0.04em;
}

/* NEWS (Figma: NEWS section, NewsList)。ニュース一覧ページ (archive.php) の .news-list とは別物なので .news__list の中に限る */
.news {
	display: flex;
	justify-content: center;
	padding: 72px var(--af-gutter);
	background: linear-gradient(0deg, #ffffff 0%, #007bbb 79.327%);
}

.news__inner {
	width: 100%;
	max-width: var(--af-content-max);
	display: flex;
	flex-direction: column;
	gap: 64px;
}

.news__list {
	padding: 32px;
	border-radius: 16px;
	background: #fff;
}

.news__list > .news-list {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
}

.news-item {
	flex: 1 0 441px;
	min-width: 441px;
	max-width: 100%;
}

.news-item__link {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 156px;
	padding: 16px;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.2s;
}

.news-item__link:hover {
	background: var(--af-bg-inset);
}

.news-item__thumb {
	flex: none;
	width: 222px;
	height: 125px;
	border-radius: 8px;
	border: 1px solid var(--af-border-sub);
	overflow: hidden;
	background: #efefef;
}

.news-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.news-item__body {
	flex: 1 0 0;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.news-item__text {
	flex: 1 0 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	line-height: 28px;
}

.news-item__date {
	font-size: 14px;
	font-weight: 500;
	color: var(--af-fg-sub);
	white-space: nowrap;
}

.news-item__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	color: var(--af-fg);
	word-break: break-word;
}

.news-item__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	min-height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--af-bg-accent);
	/* デザイナー回答 (2026-09-02): コントラスト確保のため IR ラベル「適時開示」と同じ文字色にする */
	color: var(--af-cat-blue);
	font-size: 12px;
	font-weight: 500;
	line-height: 24px;
	white-space: nowrap;
}

@media (max-width: 1024px) {
	.news-item {
		flex-basis: 100%;
		min-width: 100%;
	}
}

@media (max-width: 768px) {
	/* section header */
	.section-head {
		align-items: flex-end;
		gap: 16px;
	}

	/* SP のセクション見出し (Figma SP フレーム: 64px / 36px, 眉見出し 14px) */
	.section-head__title {
		font-size: 64px;
		line-height: 36px;
		letter-spacing: 0.04em;
	}

	.section-head__sub {
		font-size: 14px;
		letter-spacing: 0.24em;
	}

	/* SP では見出し横のボタンを消し、一覧の下に filled ボタンを置く */
	.section-head .btn {
		display: none;
	}

	.section-more {
		display: inline-flex;
		align-self: center;
		width: 218px;
	}

	/* news */
	.news {
		padding: 72px var(--af-gutter);
	}

	.news__inner {
		gap: 40px;
	}

	.news__list {
		padding: 32px;
	}

	.news__list > .news-list {
		flex-direction: column;
		gap: 24px;
	}

	.news-item__link {
		flex-direction: column;
		align-items: stretch;
		height: auto;
		gap: 8px;
		padding: 0;
	}

	.news-item__thumb {
		width: 100%;
		height: auto;
		aspect-ratio: 356 / 200;
	}

	.news-item__body {
		height: auto;
	}

	.news-item__text {
		flex: none;
	}

	.news-item__title {
		font-size: 14px;
	}

	.news-item__tags {
		gap: 8px;
	}
}

/* aspect-ratio 非対応ブラウザ向けの保険 */
@supports not (aspect-ratio: 1 / 1) {
	@media (max-width: 768px) {
		.news-item__thumb {
			height: 180px;
		}
	}
}
