/* =========================================================
   base.css … リセット＋要素の基本＋タイポグラフィ
   素の見出し（h2〜h4）にも、サイトのトーンに合った装飾が最初から当たる
   ========================================================= */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  * {
    margin: 0;
    padding: 0;
  }
  img,
  video {
    display: block;
    max-width: 100%;
    height: auto;
  }
  ul,
  ol {
    list-style: none;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  button {
    font: inherit;
    color: inherit;
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + var(--sp-6));
  }

  body {
    word-wrap: break-word;
    font-family: var(--ff-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    letter-spacing: var(--tr-body);
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
  }

  /* ---------- 見出し ---------- */
  :where(h1, h2, h3, h4, h5, h6) {
    font-family: var(--ff-head);
    font-weight: var(--fw-bold);
    line-height: var(--lh-heading);
    letter-spacing: var(--tr-heading);
    text-wrap: balance;
    word-break: auto-phrase;
    text-spacing-trim: trim-start; /* 行頭の「（」の半角分の空きを詰める */
  }
  :where(p, li, dd, figcaption) {
    text-wrap: pretty;
  }

  h1 {
    font-size: var(--fs-display);
    margin: 0 0 var(--sp-5);
  }

  /* h2：左の縦線（デフォルト） */
  h2 {
    position: relative;
    font-size: var(--fs-h2);
    margin: var(--sp-7) 0 var(--sp-5);
    padding-left: 0.9em;
  }
  h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background: var(--c-action-primary);
    border-radius: 2px;
  }

  /* h3：左の小さな四角（デフォルト） */
  h3 {
    display: flex;
    align-items: center;
    gap: 0.55em;
    font-size: var(--fs-h3);
    margin: var(--sp-6) 0 var(--sp-4);
  }
  h3::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 0.55em;
    height: 0.55em;
    background: var(--c-action-primary);
  }

  /* h4：細い左罫（デフォルト） */
  h4 {
    font-size: var(--fs-h4);
    margin: var(--sp-5) 0 var(--sp-3);
    padding-left: 0.7em;
    border-left: 2px solid var(--c-action-primary);
  }

  :where(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
  }

  p + p {
    margin-top: 1em;
  }

  /* ---------- 文字の役割 ---------- */
  /* 英字の小ラベル（見出しの上に置く） */
  .t-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--ff-num);
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tr-eyebrow);
    text-transform: uppercase;
    color: var(--c-action-primary);
  }
  .t-eyebrow::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c-metal);
    box-shadow: inset 0 0 0 1px var(--c-metal-edge);
  }

  /* リード文 */
  .t-lead {
    max-width: 42em;
    font-family: var(--ff-head);
    font-size: var(--fs-lead);
    font-weight: var(--fw-medium);
    line-height: 1.8;
  }

  /* 補足的な本文 */
  .t-muted {
    max-width: 42em; /* 1行が長くなりすぎないように */
    color: var(--c-text-muted);
    line-height: var(--lh-loose);
  }
}
