/* =========================================
   FINAL9 コーポレートサイト 共通スタイル
   コンセプト：AI x INFRASTRUCTURE
   ========================================= */

:root {
  --ink: #1B2433;          /* 基本の文字色（ネイビー） */
  --ink-soft: #4A5568;
  --muted: #6B7686;
  --bg: #FBF8F3;           /* アイボリー */
  --surface: #FFFFFF;
  --line: #E6E0D6;
  --navy: #141C2A;         /* インフラを表す濃紺 */
  --navy-2: #1E2A3D;
  --accent: #E8604A;       /* ロゴの朱色 */
  --accent-2: #F6B23C;     /* ロゴの金色 */
  --accent-deep: #C2452F;
  --grad: linear-gradient(135deg, #F6B23C 0%, #E8604A 100%);
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 28, 42, .08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.en { font-family: "Montserrat", "Segoe UI", sans-serif; letter-spacing: .14em; }

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

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo img { height: 46px; width: auto; }
.gnav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 28px; }
.gnav a { text-decoration: none; font-size: 14.5px; font-weight: 500; }
.gnav a:hover, .gnav a[aria-current="page"] { color: var(--accent); }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff !important;
  padding: 10px 20px; border-radius: 999px; font-weight: 700;
  text-decoration: none; box-shadow: 0 4px 14px rgba(232, 96, 74, .3);
  transition: transform .15s;
}
.btn-cta:hover { transform: translateY(-2px); }
.btn-cta.lg { padding: 16px 34px; font-size: 17px; }
.btn-ghost {
  display: inline-flex; align-items: center; padding: 14px 28px; border-radius: 999px;
  border: 1.5px solid currentColor; text-decoration: none; font-weight: 600;
}
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- ヒーロー（トップ） ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff;
  padding: 110px 0 120px;
}
.hero::before { /* インフラを想起させるグリッド */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero::after {
  content: ""; position: absolute; right: -140px; top: -120px; width: 520px; height: 520px;
  border-radius: 50%; border: 60px solid transparent;
  background: var(--grad) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  opacity: .22;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--accent-2); font-size: 13px; font-weight: 700; }
.hero h1 { font-size: clamp(24px, calc(4vw + 12px), 54px); line-height: 1.35; margin: 18px 0 22px; font-weight: 800; }
.hero h1 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(15px, 1.8vw, 18px); color: #C9D1DE; max-width: 640px; margin: 0 0 36px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn-ghost { color: #fff; }

/* 下層ページのヘッダー */
.page-hero { background: var(--navy); color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--accent-2); font-size: 13px; font-weight: 700; }
.page-hero h1 { font-size: clamp(26px, 4vw, 40px); margin: 10px 0 12px; line-height: 1.4; }
.page-hero p { color: #C9D1DE; margin: 0; max-width: 720px; }
.breadcrumb { font-size: 13px; color: #9AA6B8; margin-bottom: 18px; }
.breadcrumb a { color: #9AA6B8; }

/* ---------- セクション共通 ---------- */
section.sec { padding: 96px 0; }
section.sec.alt { background: var(--surface); }
section.sec.dark { background: var(--navy-2); color: #fff; }
.sec-head { margin-bottom: 48px; }
.sec-head .label { color: var(--accent); font-size: 13px; font-weight: 700; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 36px); margin: 8px 0 14px; line-height: 1.45; }
.sec-head p { color: var(--ink-soft); margin: 0; max-width: 760px; }
.dark .sec-head p { color: #C9D1DE; }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.alt .card { background: var(--bg); }
.card h3 { font-size: 19px; margin: 14px 0 10px; line-height: 1.5; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.card .num { font-weight: 800; font-size: 14px; color: var(--accent); }
.icon-badge {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
}
.icon-badge svg { width: 26px; height: 26px; }

/* 2本柱（AI × インフラ） */
.pillars { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 20px; }
.pillar { background: var(--surface); border-radius: var(--radius); padding: 36px 32px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.pillar .tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: #FDEDE7; color: var(--accent-deep); }
.pillar.infra .tag { background: #E7ECF4; color: var(--navy-2); }
.pillar h3 { font-size: 22px; margin: 14px 0 12px; }
.pillar ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--ink-soft); }
.pillar li { margin: 4px 0; }
.pillar-x { display: grid; place-items: center; font-size: 40px; font-weight: 800; color: var(--accent); }

/* 統計 */
.stat { text-align: center; padding: 34px 20px; }
.stat .v { font-size: 46px; font-weight: 800; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .v small { font-size: 20px; }
.stat p { margin: 10px 0 0; font-size: 14.5px; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 18px; }
.dark .note { color: #9AA6B8; }

/* ステップ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.step .en { font-size: 12px; color: var(--accent); font-weight: 700; }
.step h3 { margin: 6px 0 8px; font-size: 18px; }
.step p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* 業種カード */
.ind-card { display: block; text-decoration: none; overflow: hidden; padding: 0; transition: transform .2s, box-shadow .2s; }
.ind-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(20, 28, 42, .14); }
.ind-card .thumb { height: 120px; background: var(--navy-2); display: grid; place-items: center; color: var(--accent-2); position: relative; }
.ind-card .thumb svg { width: 52px; height: 52px; }
.ind-card .body { padding: 22px 24px 26px; }
.ind-card .en { font-size: 11.5px; color: var(--accent); font-weight: 700; }
.ind-card h3 { margin: 4px 0 8px; font-size: 19px; }
.ind-card p { font-size: 14.5px; }
.ind-card .more { display: inline-block; margin-top: 12px; color: var(--accent); font-weight: 700; font-size: 14px; }

/* 課題・解決 */
.problem { border-left: 4px solid var(--accent); }
.solution h3 { display: flex; align-items: center; gap: 10px; }
.solution h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); flex: none; }
.effect { display: flex; gap: 20px; align-items: center; }
.effect .v { font-size: 38px; font-weight: 800; white-space: nowrap; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* テーブル（会社概要） */
.info-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.info-table th, .info-table td { text-align: left; padding: 20px 26px; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table th { width: 200px; background: #F4EFE7; font-weight: 700; font-size: 15px; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.todo { background: #FFF3C4; padding: 1px 6px; border-radius: 4px; font-size: 13px; color: #7A5B00; }

/* 年表（プロフィール） */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 108px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 40px; padding: 0 0 34px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 102px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--bg); }
.timeline .yr { font-weight: 800; color: var(--accent-deep); text-align: right; font-size: 15px; }
.timeline h3 { margin: 0 0 6px; font-size: 18px; }
.timeline p, .timeline ul { margin: 0; color: var(--ink-soft); font-size: 15px; }
.timeline ul { padding-left: 1.2em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { font-size: 12.5px; padding: 4px 12px; border-radius: 999px; background: #E7ECF4; color: var(--navy-2); font-weight: 600; }
.chip.ai { background: #FDEDE7; color: var(--accent-deep); }

.profile-head { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.avatar { width: 220px; height: 220px; border-radius: 50%; background: var(--navy-2); display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 70%; }

/* CTA帯 */
.cta-band { background: var(--grad); color: #fff; padding: 80px 0; text-align: center; }
.cta-band h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 14px; line-height: 1.5; }
.cta-band p { margin: 0 0 30px; opacity: .95; }
.cta-band .btn-cta { background: #fff; color: var(--accent-deep) !important; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.cta-band .url { display: block; margin-top: 14px; font-size: 14px; opacity: .9; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 24px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; gap: 12px; }
.faq summary::before { content: "Q"; color: var(--accent); font-weight: 800; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); padding-left: 24px; }

/* ---------- フッター ---------- */
.site-footer { background: var(--navy); color: #C9D1DE; padding: 60px 0 28px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.site-footer .cols > div:first-child { min-width: 0; }
.site-footer img { height: 44px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent-2); }
.copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: 12.5px; color: #8793A6; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 960px) {
  .g3, .g4, .steps { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; }
  .pillar-x { font-size: 30px; }
}
@media (max-width: 760px) {
  section.sec { padding: 68px 0; }
  .g2, .g3, .g4, .steps { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .gnav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .gnav.open { display: block; }
  .gnav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; }
  .gnav li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .gnav li:last-child a { border: 0; margin-top: 12px; justify-content: center; }
  .logo img { height: 40px; }
  .hero { padding: 80px 0 90px; }
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { padding-bottom: 8px; }
  .info-table td { padding-top: 8px; }
  .timeline::before { left: 7px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .timeline li::before { left: 0; }
  .timeline .yr { text-align: left; }
  .profile-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .avatar { width: 160px; height: 160px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .effect { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* 箇条書き（会社概要の事業内容など） */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding-left: 1em; text-indent: -1em; }
.plain-list li::before { content: "・"; }

/* ---------- 日本語の改行 ----------
   ビルド時に BudouX で文節の切れ目へ <wbr> を入れてある。
   keep-all で文字単位の折り返しを止め、文節の切れ目でだけ改行する */
body { word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
h1, h2, h3 { text-wrap: balance; }
p, li, td, summary { text-wrap: pretty; }

/* ---------- セクション内タブ ---------- */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 72px; z-index: 40; }
.subnav .container { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a { flex: none; text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 16px; border-radius: 999px; color: var(--ink-soft); white-space: nowrap; }
.subnav a:hover { background: var(--bg); color: var(--ink); }
.subnav a[aria-current="page"] { background: var(--navy-2); color: #fff; }

/* ---------- 前後ページ送り ---------- */
.pager-wrap { padding: 0 0 80px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pager a { display: block; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 26px; font-weight: 700; font-size: 17px; transition: border-color .2s, transform .2s; }
.pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.pager small { display: block; font-size: 12.5px; color: var(--accent); font-weight: 700; margin-bottom: 2px; }
.pager .next { text-align: right; }

/* ---------- 比較表 ---------- */
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 15px; min-width: 640px; }
.compare th, .compare td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { background: var(--navy-2); color: #fff; font-size: 14.5px; }
.compare tbody th { background: #F4EFE7; width: 150px; font-size: 14.5px; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }

/* ---------- チェックリスト ---------- */
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 4px; flex: none; }
.checklist strong { display: block; }
.checklist span { color: var(--ink-soft); font-size: 14.5px; }
.check-result { margin-top: 24px; padding: 22px 26px; border-radius: var(--radius); background: var(--navy-2); color: #fff; font-weight: 700; }
.check-result .count { font-size: 30px; color: var(--accent-2); margin: 0 4px; }

/* ---------- 計算式 ---------- */
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.formula .box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 22px; text-align: center; min-width: 130px; }
.formula .box small { display: block; color: var(--muted); font-size: 12.5px; }
.formula .box b { font-size: 24px; }
.formula .op { font-size: 26px; font-weight: 800; color: var(--accent); }
.formula .box.total { background: var(--grad); color: #fff; border: 0; }
.formula .box.total small { color: rgba(255,255,255,.85); }

/* ---------- 横棒（導入前後） ---------- */
.bar-row { margin: 18px 0; }
.bar-row .lbl { font-weight: 700; margin-bottom: 6px; }
.bar { display: flex; height: 46px; border-radius: 10px; overflow: hidden; font-size: 13px; font-weight: 700; color: #fff; }
.bar > div { display: flex; align-items: center; justify-content: center; padding: 0 8px; white-space: nowrap; }
.bar .routine { background: #8793A6; }
.bar .human { background: var(--navy-2); }
.bar .free { background: var(--grad); }

/* ---------- 汎用 ---------- */
.lead-text { font-size: 17px; color: var(--ink-soft); max-width: 820px; }
.callout { border-left: 4px solid var(--accent); background: var(--surface); padding: 22px 26px; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); }
.callout h3 { margin: 0 0 8px; font-size: 18px; }
.callout p { margin: 0; color: var(--ink-soft); }
.link-card { display: block; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.link-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(20, 28, 42, .14); }
.link-card .more { display: inline-block; margin-top: 14px; color: var(--accent); font-weight: 700; font-size: 14px; }
.operator a { color: #fff; }

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .gnav { position: fixed; inset: 72px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .gnav.open { display: block; }
  .gnav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; }
  .gnav li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .gnav li:last-child a { border: 0; margin-top: 12px; justify-content: center; }
}
@media (max-width: 760px) {
  .checklist, .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .subnav { top: 72px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .site-footer .cols { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols > div:first-child { grid-column: 1 / -1; }
}
