/* ============================================================
   scdb.jp サイト共通スタイル
   デザインコンセプト: 深いネイビー×エレクトリックブルーの「クール」な
   テック系トーン。本文は白背景で可読性を確保し、ヘッダー/フッター/
   アクセントにネイビーとブルーのグラデーションを効かせる。
   ============================================================ */

:root {
  --color-ink: #0b1220;
  --color-ink-soft: #1c2740;
  --color-navy: #0f1729;
  --color-navy-2: #16213e;
  --color-accent: #3b82f6;
  --color-accent-2: #22d3ee;
  --color-accent-strong: #2563eb;
  --color-bg: #f7f9fc;
  --color-surface: #ffffff;
  --color-border: #e2e8f5;
  --color-text: #1a2338;
  --color-text-soft: #55617a;
  --color-success-bg: #ecfdf5;
  --color-success-text: #067647;
  --color-error-bg: #fef2f2;
  --color-error-text: #b91c1c;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(15, 23, 41, .06), 0 8px 24px -12px rgba(15, 23, 41, .18);
  --font-heading: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --font-body: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--color-ink); line-height: 1.4; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); margin: 2.4em 0 .9em; padding-top: .2em; border-top: 1px solid var(--color-border); }
article > h2:first-of-type, .no-rule { border-top: none; padding-top: 0; margin-top: 1.2em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .7em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em 1.4em; }
li { margin-bottom: .4em; }
a { color: var(--color-accent-strong); text-decoration-color: rgba(37,99,235,.35); }
a:hover { text-decoration-color: currentColor; }
strong { color: var(--color-ink); }
code { background: #eef1f8; padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* ---------- PR/広告バナー(ステマ規制対応の常時表示) ---------- */
.pr-banner {
  background: var(--color-ink);
  color: #cbd5f5;
  font-size: .82rem;
  padding: 8px 0;
}
.pr-banner .container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-banner__badge {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #04121f;
  font-weight: 700;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.pr-banner a { color: #8fd8ff; }

/* ---------- ヘッダー / ナビゲーション ---------- */
.site-header {
  background: linear-gradient(120deg, var(--color-navy), var(--color-navy-2));
  position: sticky; top: 0; z-index: 40;
  box-shadow: 0 4px 24px -12px rgba(0,0,0,.35);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.site-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.site-logo__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #04121f; font-family: var(--font-heading); font-weight: 700; font-size: .85rem;
}
.site-logo__text { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: 0; cursor: pointer;
}
.nav-toggle__bar { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

.site-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; }
.site-nav__item { position: relative; }
.site-nav__item > a {
  display: flex; align-items: center; gap: 4px;
  color: #d6ddf5; text-decoration: none; font-size: .92rem; font-weight: 500;
  padding: 10px 14px; border-radius: 999px; transition: background .15s, color .15s;
  white-space: nowrap;
}
.site-nav__item > a:hover, .site-nav__item.is-active > a { background: rgba(255,255,255,.1); color: #fff; }
.site-nav__caret { font-size: .7em; opacity: .7; }

.site-nav__submenu {
  list-style: none; margin: 0; position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 200px; background: var(--color-surface); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card); padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.site-nav__item.has-children:hover .site-nav__submenu,
.site-nav__item.has-children:focus-within .site-nav__submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.site-nav__submenu a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--color-text);
  text-decoration: none; font-size: .9rem;
}
.site-nav__submenu a:hover { background: #eef2ff; color: var(--color-accent-strong); }

/* ---------- パンくず ---------- */
.breadcrumb { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.breadcrumb ol {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--color-text-soft);
}
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 6px; color: #b6c0d9; }
.breadcrumb a { color: var(--color-text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent-strong); }
.breadcrumb li[aria-current="page"] { color: var(--color-ink); font-weight: 500; }

/* ---------- レイアウト ---------- */
.site-main { display: block; }
article, .page { max-width: 800px; margin: 0 auto; padding: 40px 20px 80px; }
.page-wide { max-width: 1080px; margin: 0 auto; padding: 40px 20px 80px; }
.article-meta { color: var(--color-text-soft); font-size: .85rem; margin-bottom: 2em; }
.lead { font-size: 1.08rem; color: var(--color-text-soft); }

/* ---------- Hero(トップページ) ---------- */
.hero {
  background: radial-gradient(1200px 500px at 20% -10%, rgba(59,130,246,.25), transparent),
              linear-gradient(120deg, var(--color-navy), var(--color-ink));
  color: #fff;
  padding: 64px 0 56px;
}
.hero h1 { color: #fff; max-width: 720px; }
.hero p { color: #c3ccea; max-width: 640px; font-size: 1.05rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.hero__badge {
  font-size: .78rem; color: #cfe0ff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); padding: 5px 12px; border-radius: 999px;
}

/* ---------- ボタン / CTA ---------- */
.btn, .cta-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  text-decoration: none; border: 0; cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.cta-button {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #04121f; box-shadow: 0 8px 20px -8px rgba(37,99,235,.55);
}
.cta-button:hover { transform: translateY(-1px); text-decoration: none; }
.cta-button--ghost {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); box-shadow: none;
}
.btn { background: #eef1f8; color: var(--color-text); }
.btn--primary { background: var(--color-accent-strong); color: #fff; }
.btn--danger { background: #fee2e2; color: #b91c1c; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }

/* ---------- サービスカード / グリッド ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 24px 0; }
.service-card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-card);
}
.service-card h3 { margin-top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-card .price-tag { font-family: var(--font-heading); font-weight: 700; color: var(--color-accent-strong); font-size: 1.15rem; }
.service-card ul { margin-left: 1.1em; font-size: .93rem; color: var(--color-text-soft); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef2ff; color: var(--color-accent-strong); }
.tag--best { background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); color: #04121f; }

/* ---------- 比較テーブル ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0; border-radius: var(--radius); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); font-size: .92rem; min-width: 640px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: top; }
thead th { background: var(--color-navy); color: #e6ebff; font-family: var(--font-heading); font-weight: 500; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f5f8ff; }
td strong { color: var(--color-ink); }

/* ---------- おすすめ/ハイライトボックス ---------- */
.callout {
  background: #eef4ff; border: 1px solid #d7e6ff; border-radius: var(--radius);
  padding: 18px 20px; margin: 22px 0;
}
.callout--warn { background: #fff7ed; border-color: #fde3c1; }
.recommend-box {
  background: linear-gradient(135deg, #eef4ff, #f6fbff); border: 1px solid #d7e6ff;
  border-radius: var(--radius); padding: 18px 20px; margin: 18px 0;
}

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--color-surface); overflow: hidden; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 18px; cursor: pointer; font-weight: 700; color: var(--color-ink);
}
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--color-accent-strong); transition: transform .2s; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 18px; color: var(--color-text-soft); transition: max-height .25s ease, padding .25s ease; }
.faq-item.active .faq-answer { max-height: 600px; padding: 0 18px 16px; }

/* ---------- フェードイン ---------- */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- フッター ---------- */
.site-footer { background: var(--color-ink); color: #aab4d1; margin-top: 40px; }
.site-footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
  padding: 44px 20px 28px;
}
.site-footer__col--brand .site-footer__desc { font-size: .85rem; color: #8b96b8; }
.site-footer__pr { font-size: .78rem; color: #7784a8; margin-top: 12px; }
.site-footer__logo { font-family: var(--font-heading); font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-footer__heading { color: #fff; font-weight: 700; margin-bottom: 10px; font-size: .92rem; }
.site-footer ul { list-style: none; margin: 0; }
.site-footer a { color: #aab4d1; text-decoration: none; font-size: .88rem; line-height: 2; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; font-size: .78rem; color: #7784a8;
}

/* ---------- 管理画面 ---------- */
.admin-page { max-width: 980px; }
.admin-page h1 { margin-bottom: .3em; }
.admin-section { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow-card); }
.admin-login { max-width: 360px; margin: 40px auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-card); }
.admin-form-row { margin-bottom: 14px; }
.admin-form-row label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 5px; color: var(--color-text-soft); }
.admin-form-row input { width: 100%; padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 8px; font-size: .95rem; font-family: inherit; }
.admin-table th, .admin-table td { font-size: .85rem; }
.flash { padding: 12px 16px; border-radius: 8px; margin: 14px 0; font-size: .9rem; }
.flash--success { background: var(--color-success-bg); color: var(--color-success-text); }
.flash--error { background: var(--color-error-bg); color: var(--color-error-text); }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.badge--direct { background: #ecfdf5; color: #067647; }
.badge--asp { background: #eef4ff; color: #2563eb; }
.badge--unclear { background: #fff7ed; color: #b45309; }
.badge--none { background: #f1f5f9; color: #64748b; }
.asp-service { margin-top: 22px; }
.asp-service__verified { font-size: .75rem; font-weight: 400; color: var(--color-text-soft); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--color-navy-2);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .site-nav.is-open { max-height: 80vh; overflow-y: auto; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 8px 12px 16px; gap: 0; }
  .site-nav__item > a { padding: 12px 8px; border-radius: 8px; }
  .site-nav__submenu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    background: rgba(255,255,255,.04); display: none; margin-top: 4px;
  }
  .site-nav__item.has-children.is-open .site-nav__submenu { display: block; }
  .site-nav__submenu a { color: #cdd6f2; }
  .site-nav__submenu a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .site-footer__inner { grid-template-columns: 1fr; }
}
