/* =========================================
   base.css
   - Reset / Design Tokens / Typography
   (News Media – Global Standard)
   Main Color: #00a0e8
========================================= */

/* ------------------------------
   1. Reset & Box model
------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ------------------------------
   2. Body
------------------------------ */

/* 長文の横幅を制御（読みやすい“間”） */
.site-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* モバイルは少しだけコンパクトに */
@media (max-width: 767px) {
  .site-container {
    padding: 0 1rem;
  }
}

/* ------------------------------
   2. Design Tokens (LIGHT MODE)
   - #00a0e8 に合わせて、全体を“クール寄り”に統一
------------------------------ */
:root {
  /* Background
     真っ白を避けつつ、#00a0e8 と相性の良いクールな白 */
  --jp-color-bg: #f5fbff;
  --jp-color-surface: #ffffff;
  --jp-color-surface-soft: #f0f9ff; /* うっすらブルーを含む面 */

  /* Borders
     直線を主張させない、青みのあるグレー */
  --jp-color-border-subtle: #d8e8f3;

  /* Text
     黒に寄せすぎず、冷たすぎないネイビーグレー */
  --jp-color-text-main: #0f172a;
  --jp-color-text-sub: #475569;
  --jp-color-text-muted: #94a3b8;

  /* Brand Colors */
  --jp-color-primary: #00a0e8;
  --jp-color-primary-hover: #008ccd;  /* 濃いめ（ホバー） */
  --jp-color-primary-active: #007bb6; /* 押下など */
  --jp-color-primary-soft: #e6f6ff;   /* 面・タグ・薄い下地 */

  /* 補助アクセント（主色と喧嘩しない深めのティール） */
  --jp-color-accent: #0b7285;

  /* エラー（深め・過度にビビッドにしない） */
  --jp-color-danger: #b91c1c;

  /* Radius */
  --jp-radius-sm: 0.25rem;  /* 4px */
  --jp-radius-md: 0.5rem;   /* 8px */
  --jp-radius-lg: 0.75rem;  /* 12px */

  /* Shadows
     影はややクール寄り（色は濃くしすぎない） */
  --jp-shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --jp-shadow-card: 0 6px 18px rgba(15, 23, 42, 0.05);
  --jp-shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.11);

  /* Focus ring */
  --jp-focus-ring: 2px solid rgba(0, 160, 232, 0.75);
  --jp-focus-ring-offset: 2px;

  /* Selection（任意：ブランドに寄せる） */
  --jp-selection-bg: rgba(0, 160, 232, 0.18);
  --jp-selection-text: var(--jp-color-text-main);
}

/* テキスト選択の視認性 */
::selection {
  background: var(--jp-selection-bg);
  color: var(--jp-selection-text);
}

/* ------------------------------
   3. Typography
------------------------------ */
:root {
  --jp-font-sans: -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI",
    Arial, "Noto Sans JP", system-ui, sans-serif;

  --jp-font-size-base: 16px;
  --jp-line-height-base: 1.7;
}

body {
  font-family: var(--jp-font-sans);
  font-size: var(--jp-font-size-base);
  line-height: var(--jp-line-height-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--jp-color-bg);
  color: var(--jp-color-text-main);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--jp-color-text-main);
}

h1 {
  font-size: clamp(1.9rem, 1.7rem + 0.5vw, 2.3rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.4rem + 0.3vw, 1.8rem);
}

h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: 0.95rem; }

h6 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jp-color-text-muted);
}

p {
  margin: 0 0 1.1rem;
  color: var(--jp-color-text-main);
  font-size: 0.98rem;
}

small {
  font-size: 0.82rem;
  color: var(--jp-color-text-muted);
}

/* ------------------------------
   4. Links
   - #00a0e8 に統一（下線色も主色で制御）
------------------------------ */
a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  text-decoration-color: transparent;
  transition:
    color 0.18s ease,
    text-decoration-color 0.18s ease,
    background-color 0.18s ease;
}

a:hover {
  color: var(--jp-color-primary);
  text-decoration: underline;
  text-decoration-color: rgba(0, 160, 232, 0.55);
}

a:focus-visible {
  outline: var(--jp-focus-ring);
  outline-offset: var(--jp-focus-ring-offset);
  border-radius: 4px;
}

/* ------------------------------
   5. Images
------------------------------ */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

/* ------------------------------
   6. Lists
------------------------------ */
ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin: 0.15rem 0;
}

/* ------------------------------
   7. Code blocks
   - 面色を #00a0e8 の薄色トーンへ寄せる
------------------------------ */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--jp-color-primary-soft);
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  color: var(--jp-color-text-main);
  border: 1px solid rgba(0, 160, 232, 0.18);
}

/* ------------------------------
   8. Utility resets
------------------------------ */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  font-family: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  background-color: transparent;
  border: none;
}

/* =================================================
   サイト名（ヘッダー/フッター）だけ underline 演出を無効化
================================================= */
.site-header .site-branding-link,
.site-header .site-branding-link:hover,
.site-header .site-branding-link:focus-visible,
.site-footer .footer-brand-link,
.site-footer .footer-brand-link:hover,
.site-footer .footer-brand-link:focus-visible {
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}
