/* ==========================================================================
   P01 ホーム（sankyo-hero-v7 の移植）
   ========================================================================== */

.fp { position: relative; color: var(--navy); }

/* 背景の図形（固定） */
.fp-bg { position: fixed; inset: 0; width: calc(100% - var(--lock-gap, 0px)); height: 100%; pointer-events: none; z-index: 0; }
.fp-bg .shape { transform-box: view-box; transform-origin: 50% 50%; will-change: transform; }
.fp-bg .fly { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }

/* ---------- ヒーロー ---------- */
/* v7 と同じく min-height は上下の余白を含まない（content-box）。
   ヘッダーの上にセカンダリバーが増えた分だけ上の余白を詰めて、見出し・相談カードを v7 の位置に揃える */
.fp-hero {
	position: relative; z-index: 2;
	box-sizing: content-box;
	min-height: calc(100vh - 40px);
	min-height: calc(100svh - 40px);
	padding: max(0px, calc(clamp(28px, 6vh, 80px) - var(--sbar-h))) var(--gutter) 60px;
}
.fp-hero__title { margin: 0; font-size: clamp(36px, 5.9vw, 88px); font-weight: 900; line-height: 1.4; letter-spacing: .24em; animation-delay: .16s; }
.fp-hero__lead { margin: clamp(28px, 4vh, 52px) 0 0; font-size: clamp(14px, 1.2vw, 17px); font-weight: 500; line-height: 2; letter-spacing: .06em; color: var(--ink); animation-delay: .3s; }
.fp-hero__cta {
	max-width: min(760px, calc(100vw - 2 * clamp(20px, 3.4vw, 52px) - 160px));
	margin-top: clamp(32px, 5vh, 60px);
	animation-delay: calc(1.9s * var(--spd, 1));
}
.fp-hero__scroll { position: absolute; z-index: 2; right: var(--gutter); bottom: 60px; display: flex; flex-direction: column; align-items: flex-end; gap: 28px; }
.fp-hero__scrollmark { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; animation-delay: .42s; }
.fp-hero__scrolltext { font-size: 11px; letter-spacing: .34em; color: var(--muted); }
.fp-hero__scrollline { width: 1px; height: 56px; background: var(--muted); animation: scrollLine 2.4s ease-in-out infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.fp-hero__scrollcap { text-align: right; font-size: 11px; letter-spacing: .3em; line-height: 2.1; color: var(--muted); animation-delay: .6s; }

/* v7 と同じ画面上の位置（バーとヘッダーの下から測るので、その高さを引く。--fp-hdr は front.js が設定） */
.fp-sidecap { position: absolute; z-index: 2; right: var(--gutter); top: calc(clamp(160px, 21vh, 220px) - var(--sbar-h) - var(--fp-hdr, 57px)); animation-delay: .7s; }
.fp-sidecap__copy { font-size: 15px; font-weight: 700; letter-spacing: .24em; line-height: 2; color: var(--navy); }
.fp-sidecap__rule { width: 52px; height: 1px; background: #9aa4ad; margin: 22px 0 18px; }
.fp-sidecap__en { position: relative; font-size: 10.5px; letter-spacing: .3em; line-height: 2.1; color: var(--muted); }
.fp-sidecap__wcopy { position: absolute; inset: 0; color: #fff; clip-path: circle(0px at 0px 0px); pointer-events: none; }
@media (max-width: 1279px) { .fp-sidecap { display: none !important; } }

@media (max-width: 767px) {
	.fp-hero__cta { max-width: none; }
	.fp-hero__scroll { display: none !important; }
}

/* ---------- 実績（スクロール連動） ---------- */
/* 固定枠は管理バー＋セカンダリバーの下から始める（その分だけ中身が下がる） */
.fp-tr { --tr-top: calc(var(--adminbar) + var(--sbar-h)); position: relative; z-index: 2; height: 340vh; border-top: 1px solid rgba(15, 32, 51, .07); }
.fp-tr__stage { position: sticky; top: var(--tr-top); height: calc(100vh - var(--tr-top)); overflow: hidden; }
.fp-tr__layer { position: absolute; inset: 0; }
.fp-step { position: absolute; display: flex; flex-direction: column; gap: 22px; }
.fp-step--title { gap: 30px; }
.fp-step--reason { gap: 18px; }
.fp-step__label { font-size: 11px; letter-spacing: .34em; color: var(--green); font-weight: 700; }
.fp-step__title { margin: 0; white-space: nowrap; font-size: clamp(30px, 4.4vw, 60px); font-weight: 900; line-height: 1.3; letter-spacing: .01em; }
.fp-step__text { margin: 0; font-size: clamp(13px, 1.1vw, 16px); line-height: 2.1; letter-spacing: .05em; color: var(--text); }
.fp-step__en { font-size: 10.5px; letter-spacing: .28em; color: var(--muted); padding-top: 10px; }
.fp-step__statbody { display: flex; flex-direction: column; gap: 16px; }
.fp-step__num { white-space: nowrap; font-size: clamp(44px, 6.4vw, 86px); font-weight: 900; line-height: 1; letter-spacing: -.01em; }
.fp-step__unit { font-size: .34em; margin-left: 10px; color: var(--navy); }
.fp-step__caption { font-size: 13px; letter-spacing: .08em; color: var(--text); }
.fp-step__no { font-size: 12px; font-weight: 900; letter-spacing: .2em; }
.fp-step__rtitle { margin: 0; font-size: clamp(19px, 1.6vw, 24px); font-weight: 700; letter-spacing: .04em; }
.fp-step__rtext { margin: 0; font-size: clamp(13px, 1.05vw, 15px); line-height: 2; letter-spacing: .04em; color: var(--text); }
@media (max-width: 767px) {
	.fp-step { gap: 12px !important; }
	.fp-step__statbody { gap: 8px; }
	.fp-step__en { padding-top: 0; }
}

/* ---------- ファクタリングとは ---------- */
.fp-about { position: relative; z-index: 2; padding: clamp(110px, 18vh, 190px) var(--gutter) clamp(120px, 20vh, 210px); }
.fp-about__inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(56px, 9vh, 96px); }
.fp-about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(36px, 5vw, 72px); align-items: center; }
.fp-about__text { display: flex; flex-direction: column; gap: 22px; }
.fp-about__title { margin: 0; font-size: clamp(28px, 3.6vw, 50px); font-weight: 900; line-height: 1.34; letter-spacing: .01em; }
.fp-about__fig img { display: block; width: 100%; height: auto; }
.fp-about__steps { list-style: none; margin-top: -30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(32px, 4vw, 56px); }
.fp-about__step { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.fp-about__stepno { font-size: 11px; font-weight: 900; letter-spacing: .2em; color: var(--sky); }
.fp-about__steptitle { margin: 0; font-size: clamp(16px, 1.4vw, 19px); font-weight: 700; letter-spacing: .04em; }
.fp-about__steptext { margin: 0; font-size: 13px; line-height: 2; letter-spacing: .04em; color: var(--text); }
.fp-about__more { margin-top: 42px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.fp-about__note { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.fp-online {
	margin-top: clamp(40px, 7vh, 80px); padding-top: clamp(48px, 8vh, 88px); border-top: 1px solid rgba(15, 32, 51, .12);
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: clamp(32px, 5vh, 52px);
}
.fp-online__text { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 640px; }
.fp-online__title { margin: 0; font-size: clamp(24px, 2.8vw, 38px); font-weight: 900; line-height: 1.4; letter-spacing: .01em; }
.fp-online__fig { display: flex; justify-content: center; width: 100%; }
.fp-online__fig img { display: block; width: 100%; max-width: 358px; height: auto; }

/* ---------- ご利用事例 ---------- */
.fp-cases {
	position: relative; z-index: 2; isolation: isolate; overflow: hidden;
	padding: clamp(100px, 16vh, 170px) 0 clamp(110px, 18vh, 190px) var(--gutter);
}
.fp-cases__bgs {
	position: absolute; top: 0; right: 0; bottom: 0; width: 50%; z-index: -1; pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%);
}
.fp-cases__bg { position: absolute; inset: 0; background-position: 50% center; background-size: cover; background-repeat: no-repeat; opacity: 0; transition: opacity 1.2s cubic-bezier(.22, .61, .36, 1); }
.fp-cases__bg--first {
	opacity: 1;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 47%, #000 53%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, transparent 47%, #000 53%, #000 100%);
	-webkit-mask-size: 220% 100%; mask-size: 220% 100%;
	-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	-webkit-mask-position: 0% 0; mask-position: 0% 0;
	transition: opacity 1.2s cubic-bezier(.22, .61, .36, 1), -webkit-mask-position 2.2s cubic-bezier(.45, .05, .25, 1), mask-position 2.2s cubic-bezier(.45, .05, .25, 1);
}
.fp-cases__bg--first.is-in { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
.fp-cases__wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vh, 64px); }
.fp-cases__grid, .fp-cases__nav { display: grid; grid-template-columns: clamp(240px, 26vw, 380px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.fp-cases__grid { align-items: center; }
.fp-cases__head { display: flex; flex-direction: column; gap: 18px; }
.fp-cases__sub { font-size: 13px; font-weight: 700; line-height: 2; letter-spacing: .05em; color: var(--text); }
.fp-cases__title { margin: 0; font-size: clamp(24px, 2.6vw, 36px); font-weight: 900; line-height: 1.4; letter-spacing: .01em; color: var(--blue); }
.fp-cases__head .btn-pill { margin-top: 12px; align-self: flex-start; }
.fp-cases__viewport { overflow: hidden; padding: 12px 0 34px; touch-action: pan-y; }
.fp-cases__track { display: flex; gap: clamp(18px, 2vw, 30px); transition: transform .78s var(--ease); will-change: transform; }
.fp-cases__track .casecard { flex: 0 0 clamp(290px, 30vw, 420px); height: auto; }
/* トップのカードはタイトルとリード文まで。長いリード文は6行で「…」にし、続きは詳細ページで読む */
.fp-cases__track .casecard__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.fp-cases__ctrl { display: flex; align-items: center; gap: clamp(18px, 2vw, 28px); }
.fp-cases__arrow {
	flex: none; width: 46px; height: 46px; border: 1px solid rgba(15, 32, 51, .2); background: #fff; border-radius: 999px;
	color: var(--navy); font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: border-color .4s var(--ease), color .4s var(--ease), transform .4s var(--ease), opacity .3s;
}
.fp-cases__arrow[data-case-arrow="-1"]:hover { border-color: var(--sky); color: var(--sky); transform: translateX(-2px); }
.fp-cases__arrow[data-case-arrow="1"]:hover { border-color: var(--sky); color: var(--sky); transform: translateX(2px); }
.fp-cases__dots { display: flex; align-items: center; gap: 12px; }
.fp-cases__dot { width: 7px; height: 7px; border-radius: 999px; background: rgba(15, 32, 51, .2); transition: background .4s ease, transform .4s var(--ease); }
.fp-cases__dot.is-active { background: var(--sky); transform: scale(1.4); }
.fp-cases__spbtn { margin: 8px auto 0; align-self: center; }

@media (max-width: 767px) {
	.fp-cases { padding-left: 0; }
	.fp-cases__bgs { display: none !important; }
	.fp-cases__grid, .fp-cases__nav { grid-template-columns: minmax(0, 1fr); }
	.fp-cases__head { padding: 0 20px; align-items: center; text-align: center; }
	.fp-cases__viewport { padding-left: 7vw; padding-right: 7vw; }
	.fp-cases__track .casecard { flex-basis: 86vw; }
	.fp-cases__nav > span:first-child { display: none; }
	.fp-cases__ctrl { justify-content: center; padding: 0 20px; }
	.fp-cases .casecard__bg { display: block; }
}

/* ---------- コラム ---------- */
.fp-col { position: relative; z-index: 2; padding: clamp(100px, 16vh, 170px) var(--gutter) clamp(120px, 20vh, 200px); }
.fp-col__inner { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(44px, 7vh, 72px); }
.fp-col__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.fp-col__headtext { display: flex; flex-direction: column; gap: 20px; max-width: 680px; }
.fp-col__title { margin: 0; font-size: clamp(28px, 4vw, 54px); font-weight: 900; line-height: 1.34; letter-spacing: .01em; }
@media (max-width: 767px) {
	.fp-col { padding-bottom: 56px; }
	.fp-col__head { flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* ---------- FAQ ---------- */
.fp-faq { position: relative; z-index: 2; padding: clamp(100px, 16vh, 170px) var(--gutter) clamp(110px, 18vh, 190px); }
.fp-faq__inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(40px, 6vw, 88px); align-items: start; }
.fp-faq__head { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 140px; }
.fp-faq__title { margin: 0; font-size: clamp(26px, 3.4vw, 46px); font-weight: 900; line-height: 1.34; letter-spacing: .01em; }
.fp-faq__text { margin: 0; font-size: 13px; line-height: 2.1; letter-spacing: .05em; color: var(--text); text-wrap: pretty; }
.fp-faq__head .btn-pill { margin-top: 10px; align-self: flex-start; }
.fp-faq__list { display: flex; flex-direction: column; }
.faqrow {
	display: flex; align-items: center; gap: 24px; padding: clamp(22px, 3vh, 28px) 0;
	border-top: 1px solid var(--line);
	transition: color .45s var(--ease), padding-left .45s var(--ease);
}
.faqrow:nth-last-child(2) { border-bottom: 1px solid var(--line); }
.faqrow:hover { color: var(--blue-h); padding-left: 8px; }
.faqrow__cat { flex: none; width: 64px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--sky); }
.faqrow__q { flex: 1; font-size: clamp(14px, 1.2vw, 17px); font-weight: 700; line-height: 1.8; letter-spacing: .04em; text-wrap: pretty; }
.faqrow__arrow { flex: none; font-size: 15px; color: var(--muted); }
.fp-faq__spbtn { margin: 40px auto 0; align-self: center; }
@media (max-width: 767px) {
	.fp-faq { padding-top: 56px; }
	.fp-faq__head { position: static; }
}
@media (min-width: 1280px) {
	.fp-faq__head { top: calc(var(--sbar-h) + var(--adminbar) + 96px); }
}

/* ---------- 下部の相談カード ---------- */
.fp-cta { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(100px, 16vh, 160px); }
.fp-cta__inner { width: 100%; max-width: 760px; margin: 0 auto; }
