/* ==========================================================================
   ITPG v2 LP — 本デザイン
   docs/design-direction.md のルールに準拠。装飾は最小限、構造の一貫性を優先。
   ========================================================================== */

:root {
  --color-navy: #12294b;
  --color-navy-dark: #0c1d38;
  --color-slate: #4b5a6a;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f7fa;
  --color-border: #e1e6ec;
  --color-text: #1f2a37;
  --color-accent: #e8622c;
  --color-accent-dark: #c94f1e;
  --color-warn: #b03a2e;

  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --radius-card: 8px;
  --container-max: 1120px;
  --header-height: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text);
  background: var(--color-bg);
  padding-bottom: 76px; /* モバイル固定CTAバー分の余白 */
}

section { scroll-margin-top: var(--header-height); }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* --- 見出し階層 --- */
h1, h2, h3 { font-weight: 700; line-height: 1.45; color: var(--color-navy); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; margin-bottom: 16px; }
h3 { font-size: 1.0625rem; margin-bottom: 8px; }

.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.lead, .section-lead {
  color: var(--color-slate);
  max-width: 34em;
  margin-bottom: 24px;
}

.note {
  font-size: 0.8125rem;
  color: var(--color-slate);
  margin-top: 16px;
}

/* ==========================================================================
   セクション共通（design-direction 7. セクション背景の使い分け）
   ========================================================================== */

.section { padding-block: 56px; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-navy); color: #ffffff; }
.section-dark h2,
.section-dark h3 { color: #ffffff; }
.section-dark .lead { color: #d7e0ec; }
.section-dark .eyebrow { color: #9fb3d1; }

/* ==========================================================================
   ヘッダー
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 12px 20px;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
  font-size: 1.0625rem;
}
.logo span {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-slate);
}

.site-nav { display: none; gap: 24px; }
.site-nav a { font-size: 0.9rem; text-decoration: none; }
.site-nav a:hover { color: var(--color-accent); }

.header-cta { display: none; }

/* ==========================================================================
   ボタン（design-direction 5. ボタンのデザイン）
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--color-accent-dark); border-color: var(--color-accent-dark); }

.btn-secondary {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}
.btn-secondary:hover { background: var(--color-bg-alt); }

.section-dark .btn-secondary { border-color: #ffffff; color: #ffffff; }
.section-dark .btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-large { padding: 18px 36px; }
.btn-block { width: 100%; }

.cta-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

/* ==========================================================================
   1. ファーストビュー（左：メッセージ＋CTA／右：サービス概要図）
   ========================================================================== */

.hero { background: var(--color-navy); color: #ffffff; padding-block: 56px; }
.hero h1 { color: #ffffff; }

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.9375rem;
}
.hero-stat .source {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #9fb3d1;
}
.section-dark .hero-stat { color: #ffffff; }

/* --- サービス概要図（CSSによる構成図。ダミー画像は使用しない） --- */

.hero-visual { width: 100%; }

.arch-diagram {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-card);
  padding: 24px;
}

.arch-tier {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: center;
}
.arch-tier-main {
  background: rgba(232, 98, 44, 0.16);
  border-color: var(--color-accent);
  padding: 18px 16px;
}
.arch-label { font-size: 0.8125rem; font-weight: 700; color: #ffffff; }
.arch-sub { display: block; margin-top: 8px; font-size: 0.6875rem; color: #d7e0ec; }
.arch-arrow { text-align: center; color: #9fb3d1; font-size: 1rem; line-height: 1.4; }

.arch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.chip {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-visual-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.75rem;
  color: #9fb3d1;
}

/* ==========================================================================
   カードグリッド共通（design-direction 6. カードUIのルール）
   ========================================================================== */

.card-grid {
  display: grid;
  gap: 24px;
  margin-block: 32px;
}

.card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(18, 41, 75, 0.08);
}
.card p { color: var(--color-slate); font-size: 0.9375rem; }
.card-muted { background: var(--color-bg-alt); }

.card-meta {
  font-size: 0.75rem;
  color: var(--color-slate);
  margin-bottom: 8px;
}

/* 統計・数値訴求カード：数値はアクセントカラーで強調（design-direction 2. 配色） */
.card-stat {
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--color-accent);
  margin-bottom: 8px;
  line-height: 1.2;
}
/* 事例カード（他社被害事例）のみ、警告色を数値ラベルに限定使用 */
.card-stat.warn { color: var(--color-warn); font-size: 1.25rem; }

.card-source {
  font-size: 0.75rem;
  color: var(--color-slate);
  margin-top: 12px;
}

/* --- アイコン（design-direction 9. シンプルな線画ベースのアイコン） --- */
.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(232, 98, 44, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--color-navy);
}
.icon-badge .icon { width: 26px; height: 26px; }

/* ==========================================================================
   役割分担図（NRIBiz ⇄ お客様）
   ========================================================================== */

.role-split {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.role-col {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  flex: 1;
}
.role-col.role-nribiz { border-color: var(--color-navy); border-width: 2px; }

.role-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-navy);
  background: var(--color-bg-alt);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.role-col ul { display: flex; flex-direction: column; gap: 8px; }
.role-col li {
  padding-left: 16px;
  position: relative;
  font-size: 0.9375rem;
  color: var(--color-text);
}
.role-col li::before { content: "・"; position: absolute; left: 0; color: var(--color-slate); }

.role-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-slate);
  min-height: 24px;
}
.role-arrow::after {
  content: "→";
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  transform: rotate(90deg);
}

/* ==========================================================================
   中盤CTAバナー（design-direction 5. ボタン／10. 単一CTA原則）
   ========================================================================== */

.cta-banner {
  border: 2px solid var(--color-navy);
  background: #ffffff;
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.cta-banner-text p { color: var(--color-slate); margin-bottom: 0; max-width: 34em; }
.cta-banner-text h2 { margin-bottom: 8px; }

/* ==========================================================================
   6. 導入効果：Before/After ＋ 数値強調
   ========================================================================== */

.compare {
  display: grid;
  gap: 24px;
  margin-block: 32px;
}
.compare-col {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
}
.compare-col ul { display: flex; flex-direction: column; gap: 12px; }
.compare-col li { padding-left: 20px; position: relative; font-size: 0.9375rem; }
.compare-col.before li::before {
  content: "−";
  position: absolute; left: 0; color: var(--color-slate); font-weight: 700;
}
.compare-col.after li::before {
  content: "+";
  position: absolute; left: 0; color: var(--color-accent); font-weight: 700;
}

.effect-grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}
.effect-item { display: flex; gap: 16px; align-items: flex-start; }
.effect-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.1em;
}
.effect-item p { color: var(--color-slate); font-size: 0.9375rem; }

/* ==========================================================================
   7. 導入の流れ：横方向ステップ（モバイルは縦並び）
   ========================================================================== */

.step-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.step {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 24px;
  flex: 1;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-slate);
  min-height: 20px;
}
.step-connector::after {
  content: "→";
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  transform: rotate(90deg);
}

/* ==========================================================================
   8. 実績・信頼材料
   ========================================================================== */

.source-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-block: 24px;
}
.source-list li {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--color-slate);
}

/* ==========================================================================
   9. よくある質問
   ========================================================================== */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.faq-list details {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--color-accent);
}
.faq-list details[open] summary::after { content: "\2212"; }

.faq-list p {
  margin-top: 12px;
  color: var(--color-slate);
}

/* ==========================================================================
   10. 問い合わせCTA（ページ最下部）
   ========================================================================== */

.contact-cta-wrapper {
  text-align: center;
  padding: 40px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-card);
  margin-top: 32px;
  box-shadow: 0 4px 12px rgba(12, 29, 56, 0.15);
}

.contact-cta-wrapper p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #d7e0ec;
  margin-bottom: 28px;
}

.contact-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  background-color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(232, 98, 44, 0.3);
}

.contact-cta-btn:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(232, 98, 44, 0.4);
}

/* モバイル調整 */
@media (max-width: 767px) {
  .contact-cta-wrapper {
    padding: 32px 16px;
  }
  .contact-cta-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
  }
}
/* ==========================================================================
   フッター
   ========================================================================== */

.site-footer {
  background: var(--color-navy-dark);
  color: #c3cede;
  padding-block: 24px;
  font-size: 0.8125rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner a { color: #c3cede; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ==========================================================================
   モバイル固定CTAバー（design-direction 8. スマートフォン表示の方針）
   ========================================================================== */

.mobile-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  padding: 10px 20px;
  box-shadow: 0 -2px 8px rgba(18, 41, 75, 0.08);
}
.mobile-cta-bar .btn { width: 100%; }

/* ==========================================================================
   レスポンシブ：タブレット以上（768px〜）
   ========================================================================== */

@media (min-width: 768px) {
  .container { padding-inline: 40px; }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.125rem; }

  .section { padding-block: 80px; }
  .hero { padding-block: 88px; }

  .header-cta { display: inline-flex; padding: 10px 20px; font-size: 0.875rem; min-height: 40px; }

  .cta-group { flex-direction: row; }

  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }

  .compare { grid-template-columns: repeat(2, 1fr); }
  .effect-grid { grid-template-columns: repeat(2, 1fr); }

  .role-split { flex-direction: row; align-items: stretch; }
  .role-arrow { width: 48px; flex-shrink: 0; }
  .role-arrow::after { transform: rotate(0deg); }

  .cta-banner { flex-direction: row; align-items: center; justify-content: space-between; padding: 40px 48px; }
  .cta-banner-text { flex: 1; }

  .step-list { flex-direction: row; align-items: stretch; }
  .step-connector { width: 48px; flex-shrink: 0; }
  .step-connector::after { transform: rotate(0deg); }

  .contact-form { padding: 32px; }
}

/* ==========================================================================
   レスポンシブ：デスクトップ（1024px〜）
   ========================================================================== */

@media (min-width: 1024px) {
  .site-nav { display: flex; }

  .section { padding-block: 96px; }
  .hero { padding-block: 96px; }

  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
  }

  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }

  body { padding-bottom: 0; }
  .mobile-cta-bar { display: none; }
}
