/*
 * partners.css — トップページ「グローバルパートナー・主要顧客」セクション（2026-08-17）
 * デザイン規範: _scripts/design_spec_apple_2026-08-14.md（白基調・インク#14283a・新色禁止・8ptグリッド）
 * クラスは scy-ptn__ プレフィックスのみ。style.css には触れない。
 */

.scy-ptn {
	background: #ffffff;
	padding: clamp(96px, 12vh, 160px) 0;
	font-family: var(--scy-sans, -apple-system, BlinkMacSystemFont, 'Hiragino Sans', sans-serif);

	/* ロゴ間隔は「1つの変数」に集約する。
	 * これを row の gap ではなく li の margin-right として使うことで、
	 * 「行末→次コピーの行頭」の間隔も自動的に同じ値になる（継ぎ目の特別扱いが不要）。 */
	--scy-ptn-gap: clamp(40px, 5vw, 72px);
}

/* テーマ（SWELL）のリストマーカー・字下げを打ち消す */
ul.scy-ptn__list,
ul.scy-ptn__row {
	list-style: none !important;
	padding-left: 0 !important;
	margin-left: 0 !important;
}

.scy-ptn__list > li,
.scy-ptn__row > li {
	list-style: none !important;
}

.scy-ptn__list > li::before,
.scy-ptn__row > li::before,
.scy-ptn__list > li::marker,
.scy-ptn__row > li::marker {
	content: none !important;
}

/* 見出し・リードの左端は、ヘッダーロゴ／パンくず／本文と同じ 48px の基準線に揃える
   （2026-08-17・nav.css セクション7と同じガター。1080px中央寄せだと 1512px 画面で
   左端が 292px となり、他の要素と揃わなかった）。ロゴの流れる帯は全幅のまま。 */
.scy-ptn__inner {
	max-width: none;
	margin: 0;
	padding: 0 48px;
}

@media (max-width: 1199px) {
	.scy-ptn__inner {
		padding: 0 32px;
	}
}

@media (max-width: 767px) {
	.scy-ptn__inner {
		padding: 0 max(24px, 5vw);
	}
}

.scy-ptn__eyebrow {
	display: block;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-indent: .14em;
	text-transform: uppercase;
	color: rgba(20, 40, 55, .40);
	margin: 0 0 16px;
}

.scy-ptn__title {
	font-size: clamp(1.75rem, 2.8vw, 2.5rem);
	line-height: 1.16;
	letter-spacing: -0.01em;
	font-weight: 700;
	color: #14283a;
	margin: 0 0 16px;
}

.scy-ptn__lead {
	font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
	line-height: 1.6;
	color: rgba(20, 40, 55, .62);
	max-width: 34em;
	margin: 0 0 48px;
}

/* SWELL の本文スタイル打ち消し（縦リズムを設計どおりに戻す）
 *  - .post_content h2 { margin: 4em 0 2em }        → 眉ラベルと見出しが 84px も離れてしまう
 *  - .post_content div > :first-child { margin-top: 0 !important }   → 見出しブロックの上余白が消える
 *  - .post_content div > :last-child  { margin-bottom: 0 !important } → リード下の余白が消える
 * !important 側は margin では勝てないので padding で間隔を作る。 */
.scy-ptn .scy-ptn__title {
	margin: 0 0 16px;
}

.scy-ptn .scy-ptn__customers {
	margin-top: 0;
	padding-top: 96px;
}

.scy-ptn .scy-ptn__note {
	margin-top: 0;
	padding-top: 48px;
}

/* ---- グローバルパートナー: タイポグラフィ一覧（ロゴ未取得社のフォールバック用に残置） ---- */
.scy-ptn__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
	column-gap: 32px;
}

.scy-ptn__list li {
	border-top: 1px solid rgba(20, 40, 55, .14);
	padding: 16px 0;
	font-size: 1rem;
	line-height: 1.6;
	color: #14283a;
}

/* ---- ロゴマーキー（右→左・純CSS無限ループ）: パートナー行・顧客行で共用 ----
 * 背景は必ず白。CLSA（紺ベタ）・Morgan Stanley（黒）・GROSVENOR（濃緑＋黒）が
 * 濃色背景では沈むため（partners_manifest.md §4 実装チームへの申し送り 1）。
 *
 * ループの原理（2026-08-17 継ぎ目修正で方式を厳密化）:
 *   トラック = 完全に同一の <ul> を K 個並べたもの（K は partners_section.php が算出）。
 *   各 <li> が自分の右側に --scy-ptn-gap の margin を持つので、1コピーの幅は
 *   Σ(ロゴ幅 + gap) となり、K個のコピーは1pxの誤差もなく等幅になる。
 *   移動量は calc(-100% / K)。トラック幅 = K × コピー幅 なので、
 *   これはちょうどコピー1個分＝端数ゼロで完全一致する。
 *   （旧実装は gap + 行末 padding-right の2箇所で間隔を作っており、
 *     どちらか一方がテーマCSSに負けると継ぎ目だけ間隔が変わる構造だった） */
.scy-ptn__marquee {
	overflow: hidden;
	margin-top: 48px;
	background: #ffffff;
	-webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

/* will-change: transform は指定しない。
 * 顧客行のトラックは実測 15,628px 幅あり、常時レイヤー化するとGPUの
 * 最大テクスチャ幅（環境により 8,192px）を超えて描画欠けの原因になり得る。
 * transform アニメーションは指定しなくても再生中は合成されるため不要。 */
.scy-ptn__track {
	display: flex;
	width: -moz-max-content;
	width: max-content;
	animation: scy-ptn-flow var(--scy-ptn-dur, 55s) linear infinite;
}

/* ロゴが1枚でも未読込のうちは流さない（穴が空いた状態で流れると「途切れて」見えるため）。
 * このクラスは functions.php が出力するスクリプトが付け外しする。
 * JSが動かない環境では付与されないので、従来どおり即座に流れる。 */
.scy-ptn.is-loading .scy-ptn__track {
	animation-play-state: paused;
}

/* hover で止めない（2026-08-17 CEO指示「カーソルを合わせてもそのまま流れるように」）。
 * animation-play-state: paused の hover 指定は意図的に置かない。 */

.scy-ptn__row {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* 間隔は gap ではなく li の margin-right で持たせる（継ぎ目を構造的に消す）。
 * .post_content ul li 等のテーマ既定に負けないよう詳細度を上げてある。 */
.scy-ptn .scy-ptn__row > li {
	flex: 0 0 auto;
	margin: 0 var(--scy-ptn-gap) 0 0;
	padding: 0;
}

/* ロゴPNGは「キャンバス高固定＋インク面積ベースの光学補正済み」で納品されている。
 * したがって指定してよいのは height のみ。width / max-width / object-fit での
 * 再調整は光学バランスを壊すため禁止（customers_manifest.md 申し送り 2）。
 * 顧客=キャンバス200px / パートナー=キャンバス160px と基準が異なり、
 * パートナー側はインクの占有率が小さいため、高さを 1.5 倍にして見た目の重さを揃える。 */
.scy-ptn__row img {
	display: block;
	height: 48px;
	width: auto;
}

.scy-ptn__row--ptn img {
	height: 72px;
}

/* 移動量はコピー数から calc で厳密に出す（-33.3333% のような丸めを持ち込まない）。
 * --scy-ptn-copies は partners_section.php がトラックに出力する。 */
@keyframes scy-ptn-flow {
	from { transform: translateX(0); }
	to   { transform: translateX(calc(-100% / var(--scy-ptn-copies, 2))); }
}

/* ---- 注記 ---- */
.scy-ptn__note {
	font-size: .8125rem;
	line-height: 1.8;
	color: rgba(20, 40, 55, .40);
	margin: 48px 0 0;
}

/* ---- SP ---- */
@media (max-width: 767px) {
	.scy-ptn {
		padding: 96px 0;
	}
	.scy-ptn .scy-ptn__customers {
		padding-top: 64px;
	}
	.scy-ptn .scy-ptn__note {
		padding-top: 40px;
	}
	.scy-ptn__row img {
		height: 36px;
	}
	.scy-ptn__row--ptn img {
		height: 56px;
	}
	.scy-ptn__list {
		grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
		column-gap: 24px;
	}
	.scy-ptn__list li {
		padding: 12px 0;
		font-size: .9375rem;
	}
}

/* ---- アクセシビリティ: 動きの抑制時は静的折返し表示 ---- */
@media (prefers-reduced-motion: reduce) {
	.scy-ptn__track {
		animation: none;
		width: auto;
	}
	.scy-ptn__row {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 24px;
	}
	/* 折返し表示では左右均等の余白にする（右だけmarginだと中央揃えが崩れるため） */
	.scy-ptn .scy-ptn__row > li {
		margin: 0 calc(var(--scy-ptn-gap) / 2);
	}
	.scy-ptn__row[aria-hidden="true"] {
		display: none;
	}
	.scy-ptn__marquee {
		-webkit-mask-image: none;
		mask-image: none;
	}
}
