/* ============================================
   style.css - デザイントークン・レイアウト・タイポ
   ============================================ */

:root {
  /* カラー: 信頼感のあるネイビー基調 */
  --navy: #0f2c52;
  --navy-dark: #0a1f3c;
  --navy-light: #1c4a86;
  --accent: #2f6fd6;
  --accent-soft: #e8f0fc;

  --up: #1f9d55;      /* 上昇=緑 */
  --up-soft: #e4f6ec;
  --down: #d64545;    /* 下落=赤 */
  --down-soft: #fbe9e9;
  --warn: #c98a1b;
  --warn-soft: #fbf1dd;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #dce3ec;
  --text: #16202e;
  --text-muted: #5a6b80;
  --text-invert: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 44, 82, 0.06), 0 1px 3px rgba(15, 44, 82, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 44, 82, 0.10);
  --shadow-lg: 0 12px 32px rgba(15, 44, 82, 0.16);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  --maxw: 1120px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;
}

/* ダークモード */
[data-theme="dark"] {
  --navy: #0b1626;
  --navy-dark: #060d18;
  --navy-light: #1b3f6b;
  --accent: #5b9bff;
  --accent-soft: #16273f;

  --up: #46c883;
  --up-soft: #14301f;
  --down: #f0736f;
  --down-soft: #35191a;
  --warn: #e0ab52;
  --warn-soft: #322611;

  --bg: #0c1420;
  --surface: #131f30;
  --surface-2: #1a293d;
  --border: #26374d;
  --text: #e6edf5;
  --text-muted: #9db0c7;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

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

/* ---------- ヘッダー / ナビ ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--text-invert);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand .logo {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--up));
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
}

.nav-toggle {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}

/* ---------- セクション見出し ---------- */
main {
  display: block;
}

.section {
  padding: 56px 0;
}
.section:nth-child(even) {
  background: var(--surface-2);
}

.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}

.section-head p,
.lead {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ---------- ページヒーロー(下層) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--navy), var(--navy-light));
  color: var(--text-invert);
  padding: 52px 0;
}
.page-hero .breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}
.page-hero .breadcrumb a:hover {
  text-decoration: underline;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}
.page-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- ホーム ヒーロー ---------- */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(47, 111, 214, 0.25), transparent),
    linear-gradient(160deg, var(--navy-dark), var(--navy-light));
  color: var(--text-invert);
  padding: 80px 0 72px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #7fd7a3, #6db0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  max-width: 620px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- グリッド ユーティリティ ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- テキスト系 ---------- */
.prose p { margin-bottom: 14px; color: var(--text); }
.prose h3 { margin: 28px 0 10px; font-size: 1.2rem; }
.prose ul.bullets {
  margin: 8px 0 16px;
  padding-left: 0;
}
.prose ul.bullets li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.prose ul.bullets li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
}

.text-up { color: var(--up); }
.text-down { color: var(--down); }
.muted { color: var(--text-muted); }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 44px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.site-footer h4 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 0.95rem;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  display: inline-block;
  padding: 3px 0;
}
.site-footer a:hover {
  color: #fff;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* skip link (a11y) */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 999;
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 8px;
}
