/*
 * thinx-base.css – THINX 共通ベース
 *
 * Phase 1 移管時点では「News コンポーネントが共有するベース」のみを定義。
 * 後続フェーズで他コンポーネントが追加された段階で、この層に共通要素を集約していく。
 *
 * 移管元:
 *   - Post 32 (topics) の HTML Widget 内 <style> 先頭の Google Font @import
 *   - Post 12 (home) / Post 32 (topics) 両方の <style> 内 .thx-container 定義（同値）
 *
 * 注意:
 *   - Elementor 側 inline <style> も並行ロード中のため、現状はそちらが後勝ちで効いている。
 *     本ファイルは「待機状態のロード済み CSS」として、Elementor 側削除（Phase 1-E/F）後に
 *     主導権を引き継ぐ。
 *   - CSS 変数（--n-accent 等）は #thxNews / #thxNewsPage スコープに閉じているため、
 *     thinx-news.css 側で扱う（base には出さない）。
 */

/* ===== Google Font: Inter =====
 * 元: Post 32 <style> 1行目の @import。CSS 内 @import は他のルールより前に
 * 出現する必要があるためファイル冒頭に置く。
 *
 * Phase 2-F Step 2（v0.7.1）で、以下 6 ファイルの重複 @import を本ファイルへ
 * 一本化（マスター集約）:
 *   - thinx-header.css（wght@400;500;700）
 *   - components/thinx-security.css（wght@400;500;700;800）
 *   - components/thinx-privacy.css（同上）
 *   - components/thinx-partnership.css（同上）
 *   - components/thinx-contact-page.css（同上）
 *   - components/thinx-entry-page.css（同上）
 * 本ファイルの weight 指定 400;500;600;700;800 は他 6 ファイルの要求集合を
 * 完全内包するスーパーセット。各コンポーネント側の font-family 宣言は
 * Elementor 親テーマフォントの上書きに必要なため温存。
 *
 * 将来的に wp_enqueue_style 経路（直接 wp_enqueue or Google Fonts プラグイン）
 * への切り替えを検討（Phase 3 候補）。 */
/* 読み込みは inc/enqueue.php の thinx-fonts（<link>・3 書体を 1 本にまとめて取得）に移した（v2.14.2） */

/* ===== Google Font: Noto Serif JP =====
 * Phase 4-D（v2.1.0）で導入。Hero / About / Philosophy / Company / Contact の
 * 主要見出し（h1 / h2 / h3 級）にセリフ書体を適用し、「静かな知性」
 * 「研究組織感」を視覚化する。
 *
 * Regular weight (400) のみロードしてサイズを最小化。
 * font-display: swap で Yu Mincho ／ Hiragino Mincho を一時表示、
 * Web Font 到着後に置換（FOUT 許容）。
 *
 * 適用は .thx-serif クラス経由で明示制御。本文 ／ ラベル ／ メタ情報には
 * 適用せず Inter を温存（運用境界線：font-size 18px 以上＝セリフ、
 * 18px 未満＝サンセリフ）。 */
/* 読み込みは inc/enqueue.php の thinx-fonts（<link>・3 書体を 1 本にまとめて取得）に移した（v2.14.2） */

/* ===== Google Font: EB Garamond =====
 * Phase 5-H（v2.2.0）で導入。Wordmark ロゴ（THiИX）用。
 *
 * 用途は限定的（Header / Footer のブランドロゴ表示のみ）。
 * 本文・主タイトル・補助テキストには使用しない（Phase 4-D の serif 群を維持）。
 *
 * Regular weight (400) のみロードしてサイズを最小化。
 * font-display: swap で Georgia を一時表示、Web Font 到着後に置換。 */
/* 読み込みは inc/enqueue.php の thinx-fonts（<link>・3 書体を 1 本にまとめて取得）に移した（v2.14.2） */

/* ===== .thx-container =====
 * News セクションの中身を 1120px に内寄せする共通コンテナ。
 * home / topics 両方で同一定義のため共通化。 */
.thx-container {
	/* Phase A-01（v2.6.0）: マスター値を 1120→1280px へ拡張。
	 * Anthropic / Vercel / Linear 系の標準帯へ移行、Service 3 カラム
	 * の縦長感軽減、サイト全体の伸びやかなレイアウトを実現。
	 * 同期する箇所：
	 *   - thinx-header.css .nav-container
	 *   - thinx-footer.css #thxFooter .thx-container
	 *   - thinx-footer.css #thxSitemap .thx-container !important（旧、ロールバック用）
	 *   - thinx-philosophy.css #thxPhilosophy .thx-container !important
	 * 影響なし（独自 override）：
	 *   - Contact/Entry form 850px / Privacy/Security 900px */
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	position: relative;
	z-index: 2;
}

/* ================================================================
 * Phase 4-D（v2.1.0）追加ユーティリティクラス
 * --------------------------------------------------------------
 * 「研究組織型」UI を構築するための 3 つの基底クラス。
 * 各 components の主要見出し ／ CTA ／ 装飾に適用する。
 * ================================================================ */

/* ===== .thx-serif =====
 * Hero / About / Philosophy / Company / Contact の主要見出しに適用。
 * Georgia（英数）＋ Noto Serif JP（日本語）の二段フォールバック。
 * Web Font 未到着時は Yu Mincho / Hiragino Mincho へフォールバック。 */
.thx-serif {
	font-family: Georgia, "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
	font-weight: 400;
	letter-spacing: 0.005em;
}

/* ===== .thx-outline-cta =====
 * Phase 4-D の細枠 CTA。塗りボタンではなく border + text のみ。
 * 静かな知性 ／ 控えめな誘導を表現。
 * hover で背景を accent 色塗りに反転。 */
.thx-outline-cta {
	display: inline-block;
	padding: 9px 22px;
	border: 1px solid var(--thx-accent);
	border-radius: 4px;
	color: var(--thx-accent);
	background: transparent;
	font-family: "Inter", system-ui, -apple-system, sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.3s var(--thx-ease), color 0.3s var(--thx-ease);
	cursor: pointer;
}
.thx-outline-cta:hover,
.thx-outline-cta:focus {
	background: var(--thx-accent);
	color: var(--thx-text);
}

/* ===== .thx-accent-bar =====
 * Hero / About / Philosophy 等の見出し前に配置する 2px 縦線装飾。
 * 「思想の起点」を視覚化する小さな accent。 */
.thx-accent-bar {
	display: inline-block;
	width: 2px;
	background: var(--thx-accent);
	vertical-align: -3px;
	margin-right: 10px;
	flex-shrink: 0;
}
.thx-accent-bar.is-large {
	height: 28px;
	vertical-align: -4px;
	margin-right: 12px;
}
.thx-accent-bar.is-small {
	height: 18px;
}

/* ================================================================
 * Scroll Reveal v1 - Phase A-05b（v2.7.0）
 * ----------------------------------------------------------------
 * Anthropic 系の控えめな fade + slide-up 演出。
 *   - translateY 16px → 0
 *   - opacity 0 → 1
 *   - duration 0.7s
 *   - easing cubic-bezier(0.16, 1, 0.3, 1)（easeOutExpo 系）
 *   - 1 度のみ発火（JS で unobserve）
 *   - Hero / Header / Footer は対象外
 *   - prefers-reduced-motion 完全対応
 *
 * 対象セレクタは assets/js/thinx-reveal.js の TARGETS 配列で一元管理。
 * HTML 修正不要、JS が起動時に自動でクラスを付与する。
 *
 * ロールバック:
 *   inc/enqueue.php で thinx-reveal.js の enqueue をコメントアウトすれば、
 *   class 付与が止まり、CSS の opacity:0 も発動せず通常表示に戻る。
 * ================================================================ */

.thx-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
.thx-reveal.is-revealed {
	opacity: 1;
	transform: translateY(0);
}

/* カスケード（同一コンテナ内の子要素を 120ms ずつ遅延） */
.thx-reveal-stagger > * {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
		transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: opacity, transform;
}
.thx-reveal-stagger.is-revealed > * {
	opacity: 1;
	transform: translateY(0);
}
.thx-reveal-stagger.is-revealed > *:nth-child(1) { transition-delay: 0ms; }
.thx-reveal-stagger.is-revealed > *:nth-child(2) { transition-delay: 120ms; }
.thx-reveal-stagger.is-revealed > *:nth-child(3) { transition-delay: 240ms; }
.thx-reveal-stagger.is-revealed > *:nth-child(4) { transition-delay: 360ms; }
.thx-reveal-stagger.is-revealed > *:nth-child(5) { transition-delay: 480ms; }

/* Reduced Motion 完全対応 */
@media (prefers-reduced-motion: reduce) {
	.thx-reveal,
	.thx-reveal-stagger > * {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}

/* Phase A-21（v2.9.9）の .thx-mobile-break は v2.9.10 で完全廃止。
 * 元来 PC 側でも <br> による 2 行表示が維持されていたため、
 * PC で display: none にする設計は誤りだった。
 * 通常の <br> で PC / Mobile 共通の改行位置を実現する方針へ復帰。
 * Service スマホ版の左寄せ化（thinx-service.css の @media 768 内）は維持。 */

/* ================================================================
 * Phase A-26（v2.9.17）: スマホ CTA もう一段階引き締め（A-25 ベース調整）
 * ----------------------------------------------------------------
 * A-25 からの追加変更（letter-spacing / line-height は思想保持で維持）:
 *   - btn-text font-size: 12 → 11px（-1px / -8%）
 *       11px は uppercase + weight 700 + シアン色での視認性下限。
 *       10px は知的トーンが崩れるため、11px が THINX らしい高級感を
 *       保持できる最小値。PC（14px）からの総削減 -21%。
 *   - リンク gap: 10 → 8px（-2px / -20%）
 *       8px はサイト全体の 8px グリッド最小単位。円 36px に追従した
 *       「テキストと円の最短一体距離」。
 *   - 円形ボタン: 40 → 36px（-4px / -10%）
 *       36px は Material Design icon button "small" 標準サイズ。
 *       4px グリッド整合。PC（44px）からの総削減 -18%。
 *       タップ領域はリンク全体（縦余白込み）で 44px 以上を担保。
 *   - 矢印アイコン: 12 → 11px（円縮小に追従、円内比率 31% 維持）
 *
 * 完全維持されるもの（A-25 と同じ）:
 *   - letter-spacing 0.08em（PC 知的トーン継承）
 *   - line-height 1.35（可読性下限）
 *   - 色 / hover / border / アニメーション / font-weight / uppercase
 *
 * ----------------------------------------------------------------
 * 旧コメント（Phase A-25 / v2.9.16、参考情報として保持）:
 * ----------------------------------------------------------------
 * A-24（font 13 / ls 0.12 / gap 12 / 円 44 維持）では実機で視覚変化が
 * 不十分という判断のもと、円形ボタン縮小を含む本格的なスマホ最適化に拡張。
 * PC（>900px）は完全維持、Mobile/Tablet のみ「明確にコンパクト化」する。
 *
 * 変更プロパティと根拠:
 *   - btn-text font-size: 14 → 12px（-2px / -14%）
 *       12px はモバイル UI でのラベルテキスト標準下限。weight 700 + uppercase
 *       で視認性は担保され、Methodology / Solutions の長文 CTA でも一行
 *       または自然な 2 行 wrap に収まる。
 *   - btn-text letter-spacing: 0.15 → 0.08em（-0.07em / -47%）
 *       PC の「広めの知的感」思想は維持しつつ、文字数の多い CTA で発生する
 *       横方向の張り出しを抑制。0.08em はモバイル UPPERCASE ラベルの定石値。
 *   - btn-text line-height: 未指定（≈1.5）→ 1.35（-10%）
 *       2 行 wrap 時の縦占有を削減。1.35 は uppercase + ls 0.08em と組合せ
 *       で読みやすさを損なわない最小値。
 *   - リンク gap: 16 → 10px（-6px / -38%）
 *       円が 40px に縮小されるため 16px は離れすぎる。10px は円直径の 25%、
 *       PC の比率（16/44 ≈ 36%）から引き締め、テキストと円の一体感を維持。
 *   - 円形ボタン: 44 → 40px（-4px / -9%）
 *       iOS HIG の最小タップ領域 44×44 は「タップ可能領域」基準であり、
 *       実際のタップ領域はリンク全体（.thx-cta-link）が担保。円自体は
 *       装飾アクセントのため -9% に縮小しても操作性は維持される。
 *       40px は THINX のシアン円アクセントを「軽快さ」と「視認性」の両立点
 *       に置く値。8px グリッド準拠でレイアウト整合性も保持。
 *   - 矢印アイコン font-size: 14 → 12px（円縮小に追従、円内比率維持）
 *       円 40px × アイコン 12px = 30% 比率（PC: 44 × 14 = 32% 比率）と
 *       ほぼ同等。視覚的なバランス継承。
 *
 * 完全維持されるもの（PC と同じ）:
 *   - 円の border-radius 50% / border 1px solid / アクセントカラー
 *   - btn-text font-weight 700 / color / border-bottom / padding-bottom 6px
 *   - hover 演出（bg accent / color #fff / translateX(5px) / box-shadow 20px）
 *   - hover ::before pulse animation
 *   - text-transform: uppercase
 *   - flex-shrink: 0（A-23 正円維持機構）
 *   - リンク全体の縦余白（padding / margin）
 *
 * 対象 CTA（7 種類）:
 *   - HOME About teaser / Recruit teaser / Company teaser / Contact teaser
 *   - Methodology（top / footer）/ Solutions（top / footer）
 *   - Partnership submit
 *
 * 対象外（操作性 / 既存仕様優先）:
 *   - Contact form / Entry form の submit-link
 *       form 内 submit ボタンは操作性優先で gap 16 / 円 44 維持。
 *       #thxPartnerPage スコープを明示しているため form ページには非適用。
 *   - Service mini CTA（.thx-svc-more / .thx-svc-arrow）
 *       元々 13px / 円 32px のミニ仕様、追加調整不要。
 *
 * PC（≥901px）への影響: ゼロ（@media 900 内のみ）
 * ロールバック: 本ブロック全削除 + functions.php を 2.9.15 に戻すのみで
 *   A-24 状態に即時復帰可能。
 * ================================================================ */
@media (max-width: 900px) {
	/* btn-text の Mobile コンパクト化 */
	#thxAbout .thx-about-btn-text,
	#thxRecruit .thx-recruit-btn-text,
	#thxCompany .thx-company-btn-text,
	#thxContact .thx-contact-btn-text,
	#thxMethodology .thx-cta-btn-text,
	#thxSolutions .thx-cta-btn-text,
	#thxPartnerPage .thx-submit-btn-text {
		font-size: 11px;
		letter-spacing: 0.08em;
		line-height: 1.35;
	}

	/* リンク gap の Mobile コンパクト化（HOME teaser 4 + Methodology + Solutions = 6 種類）*/
	#thxAbout .thx-about-link,
	#thxRecruit .thx-recruit-link,
	#thxCompany .thx-company-link,
	#thxContact .thx-contact-link,
	#thxMethodology .thx-cta-link,
	#thxSolutions .thx-cta-link {
		gap: 8px;
	}

	/* Partnership submit-link は !important で gap 16 強制のため、
	 * Mobile @media で同 !important で上書きが必要 */
	#thxPartnerPage .thx-submit-link {
		gap: 8px !important;
	}

	/* 円形ボタンの Mobile コンパクト化（44 → 40px、アクセント色は各 CSS の hover で継承）
	 * flex-shrink: 0 は各 CSS で A-23 に指定済のため再指定不要 */
	#thxAbout .thx-about-arrow,
	#thxRecruit .thx-recruit-arrow,
	#thxCompany .thx-company-arrow,
	#thxContact .thx-contact-arrow,
	#thxMethodology .thx-cta-arrow,
	#thxSolutions .thx-cta-arrow,
	#thxPartnerPage .thx-submit-arrow {
		width: 36px;
		height: 36px;
	}

	/* 矢印アイコン（Font Awesome i 要素）の font-size を円に追従させて縮小。
	 * 円内 30% 比率を維持し、PC（14/44 ≈ 32%）と視覚的に整合させる */
	#thxAbout .thx-about-arrow i,
	#thxRecruit .thx-recruit-arrow i,
	#thxCompany .thx-company-arrow i,
	#thxContact .thx-contact-arrow i,
	#thxMethodology .thx-cta-arrow i,
	#thxSolutions .thx-cta-arrow i,
	#thxPartnerPage .thx-submit-arrow i {
		font-size: 11px;
	}
}
