/* =========================================================
   lp.css : 紹介ページ（lp.html）のスタイル
   ログインなしで見えるように、.htaccess の許可リストに入れてある。

   目次（上から順に、ページの並びと同じ）
     1. 色・フォント（変数）
     2. 基本（リセット・本文・リンク・見出し・ボタン）
     3. ヘッダー・ヒーロー（最初の画面）
     4. 練習画面の見本（ターミナル）
     5. セクション共通・カード（特長）
     6. 分野（カテゴリ・チップ）
     7. 練習の流れ・注意書き・由来
     8. プラン
     9. 最後の呼びかけ・フッター
    10. 画面が狭いとき
   ※ 同じ強さの指定は、あとに書いたものが勝つ。順番を入れ替えるときは注意
   ========================================================= */


/* ---------- 1. 色・フォント（変数） ---------- */
:root {
  /* 色 */
  --bg: #edf0f4;
  --surface: #fff;
  --ink: #1a2130;
  --muted: #586174;
  --line: #d3d9e3;
  --accent: #2b45d6;
  --accent-ink: #fff;
  --soft: rgba(43, 69, 214, .08);

  /* 練習画面の見本（ターミナル）の色 */
  --term-bg: #0d1220;
  --term-ink: #e6eaf2;
  --term-dim: #8b95b3;
  --ok: #7fd8b0;
  --warn: #f0c36a;

  /* フォント */
  --font-ui: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

/* ダークモード：変わる色だけ、上書きする */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d121a;
    --surface: #161c27;
    --ink: #e6eaf2;
    --muted: #9aa4b8;
    --line: #2a3243;
    --accent: #8197ff;
    --accent-ink: #0d121a;
    --soft: rgba(129, 151, 255, .12);
    --term-bg: #080c14;
  }
}


/* ---------- 2. 基本（リセット・本文・リンク・見出し・ボタン） ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.8;
}

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

/* 中身の幅をそろえる入れ物 */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.3;
  margin: 0 0 16px;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.4;
  margin: 0 0 8px;
  text-wrap: balance;
}

/* ボタン（.ghost ＝ 枠だけ、.small ＝ 小さめ） */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
}

.btn:hover {
  filter: brightness(1.08);
}

.btn.ghost {
  background: transparent;
  color: var(--accent);
}

.btn.small {
  padding: 7px 16px;
  font-size: 14px;
}


/* ---------- 3. ヘッダー・ヒーロー（最初の画面） ---------- */
header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  /* スクロールしても、画面の上に残る（追従） */
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 背景は、画面の幅いっぱいに、敷く（ヘッダーは、.wrap の中にあるため、疑似要素で広げる） */
header.top::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: -1;
}

/* 目次のリンク（#dojo など）で飛んだとき、追従するヘッダーに、見出しが隠れないようにする */
section[id] {
  scroll-margin-top: 72px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions .btn {
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 40px;
  width: auto;
  display: block;
}

@media (prefers-color-scheme: dark) {
  .brand img {
    filter: invert(.9);
  }
}

.hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 0 64px;
  text-align: center;
}

.eyebrow {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 8px;
}

.lead {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 28px;
  text-wrap: pretty;
}

/* ボタンの並び */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* 数字の一覧（演習の数・ミッションの数・教材の数） */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
  justify-content: center;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.stats b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
}

.stats span {
  font-size: 13px;
  color: var(--muted);
}


/* ---------- 4. 練習画面の見本（ターミナル） ---------- */
.term {
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(20, 30, 60, .25);
}

.term .bar {
  padding: 8px 14px;
  background: #1a2238;
  color: var(--term-dim);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.term .body {
  padding: 14px 16px;
}

.term .p {
  color: var(--ok);
}

.term .dim {
  color: var(--term-dim);
}

.term .err {
  color: #ff8a80;
}

/* 「日本語で言うと」の説明 */
.term .ja {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-left: 3px solid var(--warn);
  background: rgba(240, 195, 106, .08);
  color: #f4dca4;
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.6;
}


/* ---------- 5. セクション共通・カード（特長） ---------- */
section {
  padding: 44px 0;
}

/* 背景を、一段、変えたセクション */
section.alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.sub {
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 46em;
  text-wrap: pretty;
}

/* 3 列に並べる入れ物 */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

section.alt .card {
  background: var(--bg);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.5;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* 番号のアイコン */
.card .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}


/* ---------- 6. 分野（カテゴリ・チップ） ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.cat h3 {
  margin: 0;
  font-size: 18px;
}

.cat p {
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

/* 演習の名前の札（.soon ＝ 準備中。点線） */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  background: var(--bg);
}

.chips li.soon {
  border-style: dashed;
  color: var(--muted);
  background: transparent;
}


/* ---------- 7. 練習の流れ・注意書き・由来 ---------- */
/* 番号つきの手順（番号は、CSS のカウンターで付ける） */
.steps {
  counter-reset: s;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: s;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px;
}

.steps li::before {
  content: counter(s);
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.steps b {
  display: block;
  margin-bottom: 4px;
}

.steps span {
  font-size: 14px;
  color: var(--muted);
}

/* 注意書き（本物との違い） */
.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 15px;
}

.note ul {
  margin: 8px 0 0;
  padding-left: 1.3em;
}

/* 名前の由来 */
.origin {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 40px;
  align-items: center;
  margin-top: 20px;
}

.origin .eq {
  font-family: var(--font-display);
  font-weight: 700;font-size: clamp(24px, 4vw, 36px);
  line-height: 1.3;
}

.origin .eq small {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.origin p {
  margin: 0 0 12px;
  color: var(--muted);
  text-wrap: pretty;
}

.origin p:last-child {
  margin-bottom: 0;
}

.origin b {
  white-space: nowrap;
}


/* ---------- 8. プラン ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.plan {
  position: relative; /* 右上の .slot を、カードの中に置くため */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
}

.plan h3 {
  margin: 0;
  font-size: 20px;
}

.plan .for {
  margin: 2px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.plan .price {
  font-family: var(--font-display);
  font-weight: 700;font-size: 26px;
  line-height: 1.3;
  margin: 0 0 14px;
}

.plan .price small {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--muted);
}

.plan ul {
  margin: 0 0 18px;
  padding-left: 1.3em;
  font-size: 15px;
}

.plan li {
  margin: 4px 0;
}

/* ボタンは、カードの一番下にそろえる */
.plan .btn {
  margin-top: auto;
  text-align: center;
}

/* パートナーの枠（現在の人数 / 上限）。カードの右上 */
.plan .slot {
  position: absolute;
  top: 18px;
  right: 18px;
  font-family: var(--font-display);
  font-weight: 700;font-size: 15px;
  line-height: 1;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  white-space: nowrap;
}

.plan .slot b {
  font-weight: 400;
  font-size: 17px;
}

.plans-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}


/* ---------- 9. 最後の呼びかけ・フッター ---------- */
.final {
  text-align: center;
  padding: 56px 0;
}

.final p {
  color: var(--muted);
  margin: 0 0 22px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  margin-right: 16px;
}

.foot-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.8;
}


/* ---------- 10. 画面が狭いとき ---------- */
/* ※ 一番最後に書く（上の指定を、上書きするため） */
@media (max-width: 860px) {
  .hero {
    padding: 40px 0 44px;
  }

  /* 複数列 → 1 列 */
  .grid3,
  .cats,
  .plans,
  .origin {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }

  /* 狭い画面では、左右の余白を、もとの広さに戻す */
  .wrap {
    padding: 0 20px;
  }

  /* ヘッダーの 3 つのボタンが、狭い画面でも、1 行に収まるように */
  .top-actions {
    gap: 5px;
  }

  .top-actions .btn.small {
    padding: 6px 9px;
    font-size: 12.5px;
  }

  .brand img {
    height: 30px;
  }

  h2 {
    font-size: 22px;
  }
}
