/**
 * thinx-service.css – Service セクション (#thxService) CSS
 *
 * 移管元: Post 12 (home) Elementor /3/0 widget_id=0bcb619 の inline <style>
 * 範囲:   #thxService ルートスコープに完全クローズ（外部への副作用なし）
 *
 * CSS 変数（ローカル定義、5 個）:
 *   --s-accent / --s-accent-rgb / --s-bg / --s-card-bg / --s-border
 *   ※ --s-card-bg は他 teaser の rgba(.., 0.4) より濃い rgba(.., 0.6) を採用
 *
 * 移管時の処理:
 *   - 全 .thx-svc-* セレクタに #thxService プレフィックスを追加してスコープ化
 *     （命名は他 teaser の .thx-{component}-* と異なる省略形 .thx-svc-*、
 *      Phase 2-F の命名規則統一候補として認識）
 *   - .en / .ja の補助クラスは .thx-svc-name .en/.ja 複合セレクタ内に閉じる
 *     ため、複合セレクタの先頭に #thxService をプレフィックス追加
 *   - .thx-container { ... } 定義は除外（thinx-base.css に同値定義あり、
 *     依存配列で thinx-base を指定して解決）
 *
 * @keyframes:
 *   - svc-pulse: Service 専用の hover パルスアニメ。
 *     ※ 重要: thinx-about.css にも同名 @keyframes svc-pulse が含まれている
 *     （About 物理化時に「Service 用と推定」というメモ付きでコピーした分）。
 *     両者の定義値は完全一致。CSS は同名 @keyframes を許容（後勝ち）するため
 *     実害なし。Phase 2-F のクリーンアップで「重複 @keyframes を統合」を別
 *     commit として整理予定。
 *     「機能変更禁止」「他 component 変更禁止」原則に従い、本ファイルにも
 *     そのまま含める方針（冗長定義許容）。
 *
 * @media（2 段切替、他 teaser と異なる Service 独自）:
 *   - max-width: 1024px ... 3 カラム → 2 カラム
 *   - max-width: 768px  ... 2 カラム → 1 カラム + 余白縮小 + hover 無効
 *   ※ 他 teaser の 900px 単独とは異なる。Phase 2-F のブレイクポイント統一候補。
 *
 * HTML 側に残る要素:
 *   - 3 つのサービスカード（.thx-svc-link > .thx-svc-card）の HTML 構造
 *   - 各カード独自の inline SVG アイコン
 *   - リンク先（/thinx/methodology/、/thinx/solutions/、https://www.thinx-lab.com/）
 *   - 3 カード目は外部リンク target="_blank"
 *
 * 命名規則メモ:
 *   ファイル名は thinx-service.css（home に表示される唯一の Service 紹介セクション
 *   本体。下層の Solutions / Methodology / etc は Phase 2-D で別途物理化予定）。
 *
 * @package HelloElementorThinxChild
 */

/* Service Section - Analytics Structure Design
 *
 * Phase 3 Step 2-H（v1.1.8）でローカル変数を Phase 3 統合トークンへ
 * フォールバック付き var() 参照に移行。--s-* 変数名は維持（既存
 * var(--s-...) 参照箇所への影響なし、後方互換性 100%）。
 * 同 prefix --s-* は Security (#thxSecurityPage) / Footer (#thxSitemap) と
 * 共有するが、スコープ ID で完全分離されているため値の衝突は起きない。
 * 重要バリアント: --s-card-bg は 0.6（標準 0.4 と異なる）のため
 * --thx-card-bg-strong を参照（Step 2-H 初の -strong 使用）。
 * 他は標準トークン参照。
 */
#thxService {
  --s-accent:     var(--thx-accent);
  --s-accent-rgb: var(--thx-accent-rgb);
  --s-bg:         var(--thx-bg);
  --s-card-bg:    var(--thx-card-bg-strong);
  --s-border:     var(--thx-border);

  background-color: var(--s-bg);
  color: #ECE7DA;
  /* Phase A-05a（v2.6.4）: HOME Section Rhythm 統一、120→100px。
   * Service だけが独り広い 120px だったのを HOME 共通基準値 100px へ揃える。 */
  padding: 100px 0;
  position: relative;
  overflow: hidden;
  font-family: system-ui, -apple-system, sans-serif;
  margin-top: -1px;
}

/* 背景グリッド：92px同期 */
#thxService::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(200,190,170,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200,190,170,0.05) 1px, transparent 1px);
  background-size: 92px 92px;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 1;
}

/* .thx-container は thinx-base.css の同値定義に依存（物理化時に除外） */

#thxService .thx-svc-header {
  margin-bottom: 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#thxService .thx-svc-title-ja {
  font-size: 18px;
  font-weight: 700;
  color: var(--s-accent);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

#thxService .thx-svc-label {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: rgba(236, 231, 218, 0.7);
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

/* Phase 4-D-9（v2.1.8）：正典 .thx-philosophy-main-copy 準拠の serif 化。
 * sans 800 / 1.4 / 0.05em → Georgia + Noto Serif JP / 400 / 1.5 / 0.02em。
 * font-size の clamp は Service 専用（24-38px）として維持。
 *
 * Phase A-03-1（v2.6.3）: clamp 最小値 24→28px へ統一。
 *   THINX Heading System v1 / Tier 2 (Section Headline) 基準化、
 *   News / About teaser / Recruit teaser / Contact teaser / Company teaser と完全揃え。
 *   Service だけが残していた独自最小値（24px）を解消、Anthropic 系の整然感を獲得。 */
#thxService .thx-svc-title {
  font-family: Georgia, "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ECE7DA;
}

/* Service Grid - 3カラムに対応
 *
 * Phase A-02a（v2.6.1）: カード間 gap を 24→32px へ拡張。
 *   1280px container 下で 3 カード並列時の呼吸感を獲得、
 *   Anthropic 水準の余白設計へ最適化。
 *   カード幅は (1280-48-64)/3 ≈ 389px へ微減（24px 時 395px）。 */
#thxService .thx-svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

#thxService .thx-svc-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  height: 100%;
}

#thxService .thx-svc-card {
  position: relative;
  background: var(--s-card-bg);
  border: 1px solid var(--s-border);
  border-radius: 28px;
  /* Phase A-02a（v2.6.1）: padding を 50/35 → 56/48 へ正方形寄りへ調整。
   * 横方向の不足（-15px の縦横アンバランス）を解消し、
   * 縦横バランスの取れた呼吸感を獲得。
   * Anthropic 系カードの典型 padding 48-64px 帯へ整合。 */
  padding: 56px 48px;
  height: 100%;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Hover Effect: Card */
#thxService .thx-svc-link:hover .thx-svc-card {
  border-color: rgba(var(--s-accent-rgb), 0.5);
  transform: translateY(-12px);
  background: rgba(10, 30, 56, 0.85);
  box-shadow:
    0 40px 80px rgba(0,0,0,0.6),
    0 0 40px rgba(var(--s-accent-rgb), 0.15);
}

/* Hover Effect: Scan Line */
#thxService .thx-svc-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(var(--s-accent-rgb), 0.08),
    transparent
  );
  transition: none;
}

#thxService .thx-svc-link:hover .thx-svc-card::after {
  top: 100%;
  transition: top 1.8s ease-in-out;
}

/* Icon Animation */
#thxService .thx-svc-icon {
  width: 50px;
  height: 50px;
  /* Phase A-02a（v2.6.1）: アイコン→タイトル距離を 35→28px に詰める。
   * 視線がアイコンからタイトルへ自然に流れる距離へ最適化、
   * アイコンとタイトルの結束感を強化。 */
  margin-bottom: 28px;
  color: var(--s-accent);
  transition: transform 0.6s ease;
}

#thxService .thx-svc-link:hover .thx-svc-icon {
  transform: scale(1.15) rotate(-3deg);
}

/* タイトルエリア */
#thxService .thx-svc-name {
  /* Phase A-02a（v2.6.1）: タイトル→desc 距離を 24→20px に詰める。
   * タイトルと本文の連続性を高め、タイトルが本文に押される印象を解消。 */
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#thxService .thx-svc-name .en {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ECE7DA;
}

#thxService .thx-svc-name .ja {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--s-accent);
  text-transform: uppercase;
}

/* Phase 4-D-4（v2.1.3）：Service desc を「読ませる本文」として 15px へ昇格、line-height 微調整。
 * Phase A-02a（v2.6.1）: line-height 1.75→1.7、margin-bottom 30→28px へ微調整。
 *   line-height 1.75 はやや広め、4-6 行で縦伸びの要因。1.7 で標準帯へ整合。
 *   margin-bottom -2px は累積 margin 整理の一環。 */
#thxService .thx-svc-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(236, 231, 218, 0.85);
  margin-bottom: 28px;
}

#thxService .thx-svc-list {
  list-style: none;
  padding: 0;
  /* Phase A-02a（v2.6.1）: list→more 距離を 40→32px に詰める。
   * 累積 margin 整理の最大削減ポイント（-8px）、カード末尾 CTA との連続性を強化。 */
  margin: 0 0 32px 0;
}

/* Phase 4-D-3（v2.1.2）／4-D-4（v2.1.3）：サービス bullet list を本文系として段階的に昇格、最終 15px。 */
#thxService .thx-svc-list li {
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(200, 190, 170, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(236, 231, 218, 0.7);
}

#thxService .thx-svc-list li::before {
  content: "";
  width: 5px;
  height: 1px;
  background: var(--s-accent);
}

#thxService .thx-svc-more {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--s-accent);
  text-transform: uppercase;
}

#thxService .thx-svc-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(var(--s-accent-rgb), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
  /* Phase A-23（v2.9.14）: wrap 時の正円維持。 */
  flex-shrink: 0;
}

#thxService .thx-svc-link:hover .thx-svc-arrow {
  background: var(--s-accent);
  color: #fff;
  border-color: var(--s-accent);
  box-shadow: 0 0 20px rgba(var(--s-accent-rgb), 0.6);
}

/* Action Pulse Animation */
#thxService .thx-svc-link:hover .thx-svc-arrow::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--s-accent);
  animation: svc-pulse 2s infinite;
}

/*
 * @keyframes は @rule のためスコープなし（グローバル）。
 * "svc-pulse" は thinx-about.css にも同名定義が存在する（About 物理化時の
 * コピー残）が、両者の値は完全一致。CSS は同名 @keyframes を許容（後勝ち）
 * するため実害なし。Phase 2-F の重複整理候補。
 */
@keyframes svc-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* スマホ対応の最適化（Service 独自の 2 段切替） */
@media (max-width: 1024px) {
  #thxService .thx-svc-grid { grid-template-columns: 1fr 1fr; }
}

/* Phase A-05c（v2.6.5）: モバイル card padding 横 24→32px。
 * Anthropic / Vercel 系の card padding 横 32px 標準帯へ整合、
 * モバイル時の Service カード横方向の呼吸感を獲得。 */
@media (max-width: 768px) {
  #thxService { padding: 80px 0; }
  #thxService .thx-svc-grid { grid-template-columns: 1fr; gap: 24px; }
  #thxService .thx-svc-card { padding: 40px 32px; }
  /* Phase A-21（v2.9.9）: スマホ版 header を左寄せに変更、
   * HOME 他 5 セクション（News / About / Company / Recruit / Contact）と統一。
   * 意図的改行は HTML 内 <br class="thx-mobile-break"> で制御（thinx-base.css）。 */
  #thxService .thx-svc-header {
    margin-bottom: 48px;
    align-items: flex-start;
    text-align: left;
  }
  #thxService .thx-svc-link:hover .thx-svc-card { transform: none; }
  #thxService .thx-svc-link:hover .thx-svc-icon { transform: none; }
}
