/* ====================================================
   Responsive Typography – Global Override (v2)
   ----------------------------------------------------
   ▸ 目的: 既存レイアウトを触らず「ブロックごとに違う vw 指定」を
     吸収して統一感を出す。すべて “後読み” にしているので、
     既存 CSS の最後にこのファイルを追加するだけで OK。
   ▸ 方法: html の font‑size を fluid‑scale 化し、各テキスト要素は
     rem ベースにリセット。必要最低限の heading / UI クラスのみ
     スケールから派生させたサイズを再定義。
   ▸ 幅 360 px → 1440 px の間でサイズを自然に変化させる。
==================================================== */

/*************************
 * 1. Fluid root size
 *************************/
html {
  /* 14 px (360 px) 〜 18 px (≥1440 px) に滑らかに変化 */
  font-size: clamp(0.875rem, 0.85vw + 0.2rem, 1.125rem);
}

/*************************
 * 2. Base text reset
 *************************/
body,
h1, h2, h3, h4, h5, h6,
p, li, dt, dd,
button, input, textarea, select {
  font-size: 1rem;   /* ←すべて基準値からスタート */
  line-height: 1.6;
}

/*************************
 * 3. Typographic scale
 *************************/
/* 8‑step modular scale (1.250)  */
:root {
  --fs-xs: 0.64rem;   /* ~10 px – キャプション等 */
  --fs-sm: 0.8rem;    /* ~13 px – 補足 */
  --fs-md: 1rem;      /* ~16 px – 本文 */
  --fs-lg: 1.25rem;   /* ~20 px – サブ見出し */
  --fs-ll: 1.45rem;   /* ~20 px – サブ見出し */
  --fs-xl: 1.563rem;  /* ~25 px – 見出し */
  --fs-xxl: 1.953rem; /* ~31 px – セクション大見出し */
  --fs-hero: 2.441rem;/* ~39 px – ヒーロー */
}

h1 { font-size: var(--fs-hero); font-weight: 700; line-height: 1.3; }
h2 { font-size: var(--fs-xxl); font-weight: 700; line-height: 1.35; }
h3 { font-size: var(--fs-xl);  font-weight: 700; line-height: 1.4; }
h4 { font-size: var(--fs-ll);  font-weight: 600; line-height: 1.45; }
h5 { font-size: var(--fs-md);  font-weight: 600; }
h6 { font-size: var(--fs-sm);  font-weight: 600; }

/*************************
 * 4. Utility classes
 *************************/
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-ll { font-size: var(--fs-ll); }
.text-xl { font-size: var(--fs-xl); }
.text-xxl{ font-size: var(--fs-xxl); }

/*************************
 * 5. Button / Nav
 *************************/
.btn,.text,header.header .menu li {
  font-size: var(--fs-md);
/*   line-height: 1.4;
 */}
.btn{
   line-height: 1.4;
}
.bold {
  font-weight: 700;
  font-size: var(--fs-lg);
}

@media (max-width: 900px) {
  header.header .menu li {
    font-size: .9rem;
  }
}

/* 大ボタンだけ一段階上げる */
.btn--lg { font-size: var(--fs-md); }

/*************************
 * 6. Media queries (fine‑tune)
 *************************/
@media (min-width: 2000px) {
:root {
  --fs-xs: 12px;   /* ~10 px – キャプション等 */
  --fs-sm: 13px;    /* ~13 px – 補足 */
  --fs-md: 16px;      /* ~16 px – 本文 */
  --fs-lg: 22px;   /* ~20 px – サブ見出し */
  --fs-ll: 25px;   /* ~20 px – サブ見出し */
  --fs-xl: 30px;  /* ~25 px – 見出し */
  --fs-xxl: 35px; /* ~31 px – セクション大見出し */
  --fs-hero: 45px;/* ~39 px – ヒーロー */
}
}
@media (max-width: 780px) {
  :root {
    --fs-lg: 1.1rem;
    --fs-ll: 1.25rem;
    --fs-xl: 1.4rem;
    --fs-xxl: 1.75rem;
    --fs-hero: 2rem;
  }
  /* ミドル幅でボタンを大きめに */
  .btn,
  header.header .menu li { font-size: var(--fs-md); }
}

@media (max-width: 450px) {
  :root {
    --fs-lg: 1.05rem;
    --fs-ll: 1.15rem;
    --fs-xl: 1.3rem;
    --fs-xxl: 1.6rem;
    --fs-hero: 1.9rem;
  }
  h1, h2, h3 { letter-spacing: 0.01em; }
}

/* =======================  END  ======================= */
