/* =============================================================================
   style.css — CROSSROAD LAB サイト共通のスタイル

   ・外部フォントは読み込まない（表示が速く、訪問者の情報を第三者に渡さないため）
   ・色は下の変数だけで決まる。ダークモードは OS の設定に自動で合わせる
   ============================================================================= */

:root {
  --bg:        #f7f8fa;
  --surface:   #ffffff;
  --text:      #1d2330;
  --muted:     #5b6475;
  --line:      #e2e6ee;
  --accent:    #265ea8;   /* AllThumb のアイコンの枠と同じ青 */
  --accent-2:  #1e4f90;
  --accent-bg: #e9f0fb;
  --warn-bg:   #fff6e0;
  --warn-line: #f0d48a;
  --code-bg:   #eef1f6;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(20, 30, 50, .05), 0 6px 20px rgba(20, 30, 50, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #11151c;
    --surface:   #181e27;
    --text:      #e6e9ef;
    --muted:     #a0a8b8;
    --line:      #2a3240;
    --accent:    #6ea3ec;
    --accent-2:  #8db6f1;
    --accent-bg: #1c2a40;
    --warn-bg:   #2b2515;
    --warn-line: #6b5a2a;
    --code-bg:   #222a36;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "Yu Gothic", YuGothic, "Hiragino Sans",
               "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-2); }

code, kbd, .mono {
  font-family: Consolas, "Cascadia Mono", "BIZ UDGothic", monospace;
  font-size: .9em;
}
code { background: var(--code-bg); padding: .1em .4em; border-radius: 6px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---- ヘッダ / フッタ ------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  font-weight: 700; letter-spacing: .12em; color: var(--text); text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
}
.brand img { width: 26px; height: 26px; }
.site-nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: .95em; }
.site-nav a:hover { color: var(--text); }

.site-footer {
  margin-top: 72px; padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: .88em;
}

/* ---- 見出しと本文 ---------------------------------------------------------- */
h1, h2, h3 { line-height: 1.4; letter-spacing: .03em; }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 {
  font-size: 1.45rem; margin: 64px 0 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.1rem; margin: 28px 0 8px; }
p { margin: 0 0 1em; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---- トップ ---------------------------------------------------------------- */
.hero { padding: 64px 0 24px; }
.hero h1 { font-size: 2.3rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 28px; }
.card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  color: var(--text); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head img { width: 44px; height: 44px; }
.card-title { font-size: 1.2rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); font-size: .95em; }
.card .more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .95em; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .78em; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent);
}

/* ---- 製品ページ ------------------------------------------------------------ */
.product-hero {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  padding: 56px 0 8px;
}
.product-title { display: flex; align-items: center; gap: 16px; }
.product-title img { width: 64px; height: 64px; }
.product-title h1 { margin: 0; }

.download-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 700;
  padding: 13px 26px; border-radius: 10px; font-size: 1.05rem;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn svg { width: 20px; height: 20px; }
.meta { color: var(--muted); font-size: .9em; margin: 12px 0 0; }

.shot {
  margin: 36px 0 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface);
}
.shot img { display: block; width: 100%; }
.caption { color: var(--muted); font-size: .88em; text-align: center; margin-top: 10px; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.feature h3 { margin: 0 0 6px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: .94em; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--accent-bg); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 2px 0 18px 48px; margin: 0;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.note {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
  padding: 16px 20px; margin: 16px 0;
}
.note > :last-child { margin-bottom: 0; }

/* SHA-256 のような長い英数字の列。
   改行しないままにすると、スマホでページ全体が横にはみ出す（実際に起きた）ので折り返す。 */
.hash {
  display: block; white-space: normal; word-break: break-all; overflow-wrap: anywhere;
  background: var(--code-bg); padding: 10px 14px; border-radius: 8px;
}

/* 1fr ではなく minmax(0, 1fr)：グリッドの列が中身の最小幅より縮めるようにする */
dl.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; }
dl.spec dt { color: var(--muted); }
dl.spec dd { margin: 0; min-width: 0; }

@media (max-width: 600px) {
  h1, .hero h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; margin-top: 48px; }
  .site-nav a { margin-left: 14px; }
  dl.spec { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.spec dd { margin-bottom: 10px; }
}
