/* 合同会社COM-B八王子 コーポレートサイト
   外部CDN・外部フォント不使用。システムフォントスタックのみ。 */

:root {
  --ink:      #1f2933;   /* 本文 */
  --ink-soft: #52616b;   /* 補助テキスト */
  --line:     #dfe3e8;   /* 罫線 */
  --bg:       #ffffff;   /* 背景 */
  --bg-alt:   #f4f6f8;   /* 交互セクション背景 */
  --accent:   #2b4c6f;   /* 落ち着いた紺 */
  --accent-d: #16324a;   /* ホバー時の濃い紺 */
  --max:      760px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* 固定ヘッダー分、アンカー先が隠れないように */
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

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

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-d);
}

/* 固定ヘッダー分だけアンカー着地位置を下げる(モバイルはナビが2段になるため深め) */
section[id] {
  scroll-margin-top: 96px;
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(120%);
  z-index: 10;
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-nav a:hover {
  color: var(--accent);
}

/* ヒーロー */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(17, 38, 57, 0.78), rgba(22, 50, 74, 0.86)),
    url("assets/hero.webp") center / cover no-repeat;
  color: #fff;
}
.hero h1 {
  margin: 0 0 20px;
  font-size: 1.9rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: #fff;
}
.hero-lead {
  margin: 0 0 28px;
  color: #d8e2ec;
  font-size: 1.02rem;
}
.hero-lead strong {
  color: #fff;
}
/* 画像ヒーロー上のボタン調整 */
.hero .btn {
  background: #fff;
  color: var(--accent-d);
  border-color: #fff;
}
.hero .btn:hover {
  background: #d8e2ec;
  color: var(--accent-d);
}
.hero .btn-quiet {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.hero .btn-quiet:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.hero-actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
}
.btn:hover {
  background: var(--accent-d);
  color: #fff;
}
.btn-quiet {
  background: transparent;
  color: var(--accent);
}
.btn-quiet:hover {
  background: var(--bg-alt);
  color: var(--accent-d);
}

/* セクション */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.section-alt {
  background: var(--bg-alt);
}
.section h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}
.section-lead {
  margin: 0 0 28px;
  color: var(--ink-soft);
}

/* カード */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px 18px;
  background: var(--bg);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}
.card p {
  margin: 0 0 10px;
  color: var(--ink);
}
.card-meta {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.note {
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* 特徴 */
.feature {
  margin-bottom: 28px;
}
.feature:last-child {
  margin-bottom: 0;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}
.feature p {
  margin: 0 0 12px;
}
.link-external {
  font-weight: 600;
}

/* 会社概要テーブル */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
}
.profile-table th,
.profile-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
}
.profile-table tr:last-child th,
.profile-table tr:last-child td {
  border-bottom: none;
}
.profile-table th {
  width: 30%;
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
}

/* お問い合わせ */
.contact-mail {
  margin: 16px 0 0;
  font-size: 1.15rem;
}
.contact-mail a {
  font-weight: 600;
}

/* フッター */
.site-footer {
  padding: 28px 0;
}
.site-footer p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* レスポンシブ（モバイル優先で、広い画面向けに拡張） */
@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .card p {
    font-size: 0.95rem;
  }
}

/* 資格リスト */
.cert-list {
  margin: 8px 0 12px;
  padding-left: 1.4em;
}
.cert-list li {
  margin-bottom: 2px;
}
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.badge-row img {
  width: 56px;
  height: 56px;
}

/* 構築事例ページ */
.brand-link {
  color: inherit;
  text-decoration: none;
}
.hero-sub {
  padding: 48px 0 40px;
}
.case {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.case:last-child {
  border-bottom: none;
}
.case h2 {
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0;
  display: inline;
}
/* クリックで開閉するサマリ行 */
.case summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.case summary::-webkit-details-marker {
  display: none;
}
.case summary::after {
  content: "＋";
  position: absolute;
  right: 4px;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}
.case[open] summary::after {
  content: "−";
}
.case summary:hover h2 {
  color: var(--accent);
}
.case-lead {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.case-detail dt {
  font-weight: 700;
  color: var(--accent);
  margin-top: 12px;
}
.case-detail dd {
  margin: 4px 0 0;
}
.case-figure {
  margin: 20px 0 0;
}
.case-figure svg {
  width: 100%;
  height: auto;
  max-width: 640px;
  display: block;
}
.case-figure figcaption {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* お問い合わせフォーム */
#contact-form {
  max-width: 560px;
}
.form-row {
  margin-bottom: 16px;
}
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.form-row .req {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a4443c;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form-row textarea {
  resize: vertical;
}
/* ハニーポット(botのみが埋める欄): 視覚・支援技術の両方から隠す */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 1.5em;
  font-size: 0.95rem;
}
.form-status.ok {
  color: #1e6b45;
}
.form-status.ng {
  color: #a4443c;
}
.form-actions .btn {
  border: none;
  cursor: pointer;
  font: inherit;
}
.form-actions .btn:disabled {
  opacity: 0.6;
  cursor: default;
}
