@charset "UTF-8";
/* ============================================================
   base.css  リセットと基本スタイル
   ------------------------------------------------------------
   読み込み順: tokens → base → common → components → pages
   本ファイルではタグセレクタのみを扱い、部品のスタイルは
   components.css に置く。
   ============================================================ */

/* ============================================================
   1. リセット
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* ブラウザの文字サイズ設定に追随させるため、px 固定にしない */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd,
ul, ol, li {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   2. html / body
   ============================================================ */

body {
  min-height: 100vh;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--fs-body);
  font-weight: var(--fw-normal);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Sticky CTA が表示される画面では、バーの高さ分だけ下部に余白を確保する。
   フッターがバーに隠れないようにするため。 */
body.has-sticky-cta {
  padding-bottom: calc(var(--sticky-cta-height) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  body.has-sticky-cta {
    padding-bottom: 0;
  }
}

/* モーダル表示中は背面のスクロールを固定する */
body.is-modal-open {
  overflow: hidden;
}

/* ============================================================
   3. 見出し
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-accent);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-heading);
  /* 和文の禁則処理。単語の途中で不自然に折り返さないようにする */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-heading);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
}

h4, h5, h6 {
  font-size: var(--fs-body);
  line-height: var(--lh-h3);
}

/* ============================================================
   4. テキスト
   ============================================================ */

p {
  overflow-wrap: anywhere;
}

small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

strong, b {
  font-weight: var(--fw-bold);
}

address {
  font-style: normal;
}

hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin-block: var(--space-5);
}

/* ============================================================
   5. リンク
   ============================================================ */

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--easing);
}

a:hover {
  color: var(--color-primary-hover);
}

/* ============================================================
   6. フォーカス表示
   outline: none の単独指定は禁止。フォーカスリングを必ず残す。
   ============================================================ */

:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: var(--focus-offset);
}

/* マウス操作時のみリングを抑制する（キーボード操作では表示される） */
:focus:not(:focus-visible) {
  outline: none;
  /* 理由: :focus-visible により、キーボード操作時のリングは維持される */
}

/* ============================================================
   7. 画像・メディア
   ============================================================ */

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 内容画像は必ず <img> を使う。CSS の background-image は使用しない。 */

/* ============================================================
   8. フォーム要素の初期化
   ============================================================ */

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

textarea {
  resize: vertical;
}

/* ============================================================
   9. テーブル
   ============================================================ */

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border-strong);
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--color-surface-alt);
  font-weight: var(--fw-bold);
}

caption {
  caption-side: top;
  padding-bottom: var(--space-2);
  color: var(--color-text-sub);
  font-size: var(--fs-small);
  text-align: left;
}

/* ============================================================
   10. レイアウト用ユーティリティ
   ============================================================ */

/* 標準のコンテンツ幅 */
.l-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* 記事・固定ページ用の狭いコンテンツ幅 */
.l-container--narrow {
  max-width: var(--container-narrow);
}

/* セクション間の余白 */
.l-section {
  padding-block: var(--space-8);
}

@media (min-width: 1024px) {
  .l-section {
    padding-block: var(--space-10);
  }
}

/* 主要コンテンツ領域。ヘッダー固定分の調整はここで行わない */
.l-main {
  display: block;
}

/* ============================================================
   11. アクセシビリティ用ユーティリティ
   ============================================================ */

/* 画面には表示せず、スクリーンリーダーにのみ読ませる */
.u-visually-hidden {
  position: absolute;
  width: var(--hidden-size);
  height: var(--hidden-size);
  margin: calc(var(--hidden-size) * -1);
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 本文へスキップ。フォーカスされたときだけ画面に現れる */
.u-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: var(--fw-bold);
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform var(--duration-fast) var(--easing);
}

.u-skip-link:focus {
  color: var(--color-text-inverse);
  transform: translateY(0);
}

/* PC でのみ / SP でのみ 表示する */
.u-pc-only {
  display: none;
}

@media (min-width: 1024px) {
  .u-pc-only {
    display: block;
  }

  .u-sp-only {
    display: none;
  }
}

/* ============================================================
   12. モーションの抑制
   OS側で「視差効果を減らす」が有効な場合、動きをすべて止める。
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}

/* ============================================================
   13. 印刷
   ============================================================ */

@media print {
  body {
    background-color: var(--color-surface);
  }

  .u-skip-link,
  .c-sticky-cta {
    display: none;
  }
}
