/* =============================================================================
   tokens.css — 色・書体・余白の変数（トークン）と基本のリセット
   -----------------------------------------------------------------------------
   ・部品の見た目は site.css に書く。このファイルは「全ページ共通の土台」だけ
   ・色の根拠: 公式サイト実測（オレンジ #ff4a00 / サーモン #ff976c / 生成り #fff9ee / 青 #1359a5）
     参考サイトの赤 1 色 → 日金のオレンジに置き換え。青・生成りは補助
   ・コントラスト（WCAG AA＝文字 4.5:1、大きい文字 3:1）は build 時に計算済み。
     check.py が --c-accent-text の値を毎回確かめる
   ============================================================================= */

:root {
  /* ---- 色 ------------------------------------------------------------------ */
  --c-ink:          #1a1a1a;  /* 本文（白地 17.4:1） */
  --c-ink-soft:     #555555;  /* 補足の文字（白地 7.46:1） */
  --c-ink-mute:     #666666;  /* いちばん薄い文字（白地 5.74:1・生成り 5.48:1） */
  --c-paper:        #ffffff;  /* 地 */
  --c-cream:        #fff9ee;  /* 公式サイトの区画の背景（生成り） */
  --c-line:         #e6e1d8;  /* 罫線 */
  --c-accent:       #ff4a00;  /* 公式のオレンジ。白地では 3.37:1 しかないので
                                 「24px 以上、または 19px 以上の太字」と飾りの英字にだけ使う */
  --c-accent-text:  #c43800;  /* 小さい文字用の濃いオレンジ。白地 5.37:1・生成り 5.12:1（AA 4.5:1 を満たす） */
  --c-accent-soft:  #ff976c;  /* 公式のサーモン。帯・下線・ホバーの背景に。文字には使わない（2.12:1） */
  --c-blue:         #1359a5;  /* 公式ロゴの青。補助の見出し・本文中のリンク（白地 7.00:1） */
  --c-dark:         #1c1c1c;  /* フッターの暗い背景 */
  --c-on-dark:      #f5f1ea;  /* 暗い背景の上の文字 */
  --c-tag-bg:       #1a1a1a;  /* 黒い小さなタグの地 */
  --c-tag-fg:       #ffffff;
  --c-focus:        #1359a5;  /* キーボード操作の枠線 */

  /* ---- 書体 ---------------------------------------------------------------- */
  --font-ja:    "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-en:    "Libre Baskerville", "Times New Roman", Georgia, serif;     /* 英字の見出し（飾り） */
  --font-label: "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;  /* 小さな英字ラベル */
  --font-gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", "Noto Sans JP", sans-serif;  /* ゴシック（窓の見出し・電話番号） */

  /* ---- 文字の大きさ（スマホ→パソコンで滑らかに変わる） ---------------------- */
  --fs-xs:   0.75rem;    /* 12px ラベル */
  --fs-sm:   0.875rem;   /* 14px 補足 */
  --fs-md:   1rem;       /* 16px 本文（参考サイトは 14px だが日本語の読みやすさを優先） */
  --fs-lg:   1.125rem;   /* 18px リード */
  --fs-h3:   clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --fs-h2:   clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --fs-h1:   clamp(1.375rem, 1rem + 1.8vw, 2.25rem);
  --fs-deco: clamp(2.5rem, 1.5rem + 7vw, 7rem);        /* 英字の大見出し（飾り） */
  --fs-deco-sm: clamp(1.75rem, 1rem + 3vw, 3rem);       /* 区画の英字見出し（飾り） */
  --lh-body:  1.9;
  --lh-tight: 1.35;
  --ls-wide:  0.12em;   /* ロゴ・見出しの字間 */
  --ls-label: 0.08em;   /* 英字ラベルの字間 */

  /* ---- 余白 ---------------------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --gutter:       clamp(20px, 5vw, 40px);          /* 画面の左右の余白（スマホ 20px。参考サイトのスマホ版に合わせて少し広く） */
  --section-gap:  clamp(64px, 10vw, 128px);        /* 区画と区画の間 */
  --measure:      36em;                            /* 本文 1 行の長さの上限（日本語 36 字） */
  --container:    1200px;
  --container-narrow: 760px;
  --header-h:     72px;

  /* ---- 形・動き ------------------------------------------------------------ */
  --radius:      4px;
  --radius-pill: 999px;
  --dur:  0.4s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ---- 実装で足したトークン（2026-10-15 実装担当）------------------------------ */
  --c-on-dark-soft:  rgba(245, 241, 234, 0.74);   /* 暗い背景の上の補足の文字（#1c1c1c 上で約 8:1） */
  --c-line-on-dark:  rgba(255, 255, 255, 0.16);   /* 暗い背景の罫線 */
  /* 下の帯・薄いオレンジ・記事ページの地は、2026-10-21 から site.css の .page-article で珊瑚の色に差し替えている（記事ページの配色の正本はそちら） */
  --c-band-from:     #b53400;   /* 記事の頭の帯（左＝濃いオレンジ。白い文字 6:1） */
  --c-band-to:       #ec6420;   /* 帯の右（明るいオレンジ。大きい文字だけ置く） */
  --c-orange-tint:   #fff1e8;   /* 表の見出しの列などの薄いオレンジ */
  --c-blue-tint:     #eef4fb;   /* 「日金の現場から」の囲み（ロゴの青の薄い色） */
  --c-page-warm:     #f7f5f1;   /* 記事ページの地（本文の白い紙を浮かせる） */
  --c-mark-bg:       #fff1b8;   /* 記事の大切なところの黄色いマーカー（==文字==・2026-10-21 太田さん決定で本番でも使う） */
  --c-todo-line:     #c23b22;   /* 記事の【要確認】の赤い波線（見本・確認中だけに出る印。公開前に全部消す。黄色はマーカーに譲った） */
  --c-ghost:         #f1ede6;   /* 背面に薄く透ける大きな英字（飾り・白地 1.15:1。読ませる文字には使わない） */
  --c-shade:         rgba(0, 0, 0, 0.28);         /* 写真の上の暗幕（薄い） */
  --c-shade-strong:  rgba(0, 0, 0, 0.58);         /* 写真の上の暗幕（濃い） */
  --shadow-soft:     0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lift:     0 8px 26px rgba(0, 0, 0, 0.12);
  --shadow-up:       0 -6px 20px rgba(0, 0, 0, 0.06);   /* 画面下に固定する帯の上向きの影 */

  /* ---- 押したくなるボタン（電話・公式LINE）2026-10-15 太田さん指示 ---- */
  --c-linegreen:     #06c755;   /* LINE の緑（公式の色）。白い文字は 2.3:1 と低いので、太字・影・大きめの文字で読みやすくする */
  --c-linegreen-hi:  #2bdb72;   /* ボタンの上側の明るい緑 */
  --c-linegreen-lip: #04913f;   /* ボタンの厚み（下側の濃い緑） */
  --c-linegreen-text: #04773a;   /* 白地の小さい文字に使う濃い緑（白地 5.6:1） */
  --c-tel-hi:        #f0520f;   /* 電話のボタンの上側の明るいオレンジ */
  --c-tel-lip:       #8f2900;   /* 電話のボタンの厚み */
  --shadow-btn:      0 10px 22px -6px rgba(0, 0, 0, 0.35);
  --shadow-btn-hover: 0 16px 28px -8px rgba(0, 0, 0, 0.42);
  --shadow-float:     0 22px 34px -14px rgba(0, 0, 0, 0.42), 0 8px 14px -8px rgba(0, 0, 0, 0.22);   /* 品目の写真が台から浮いて見える影 */
  --shadow-float-hover: 0 30px 44px -16px rgba(0, 0, 0, 0.46), 0 10px 18px -8px rgba(0, 0, 0, 0.24);
  --shadow-tag:       0 14px 22px -12px rgba(0, 0, 0, 0.32), 0 3px 8px -4px rgba(0, 0, 0, 0.14);   /* 品目名の白い札も写真と同じく浮かせる影 */
  --gloss:           linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 55%);
  --shine:           linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  --fs-hero-deco:    clamp(1.75rem, 0.6rem + 6.2vw, 6.25rem);    /* ヒーローの英字 3 行（飾り） */
  --fs-hero-title:   clamp(1.0625rem, 0.92rem + 0.9vw, 1.625rem); /* ヒーローの h1 */
  --fs-scatter:      clamp(2.25rem, 0.8rem + 6.4vw, 6.5rem);  /* HOW IT WORKS（飾り） */
  --fs-num:          clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);  /* #1・01 などの大きな番号（飾り） */
}

/* =============================================================================
   基本のリセット
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;           /* 独自のスクロール制御は入れない（軽さ優先） */
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font-ja);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-paper);
  font-feature-settings: "palt";      /* 日本語の詰め */
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, p, figure, dl, dd, ol, ul, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; line-height: var(--lh-tight); }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }   /* :where で強さを 0 にし、部品の余白の指定が必ず勝つようにする */

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
small { font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--c-line); }

/* =============================================================================
   全ページ共通の小さな部品（utility）
   ============================================================================= */
/* 画面には出さず、読み上げと検索エンジンにだけ伝える */
.u-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* 縦書き（文字のまま。画像にしない） */
.u-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: var(--ls-wide);
}

/* 飾りの英字（aria-hidden="true" を必ず付けて使う）。色や大きさは site.css で */
.deco-en {
  font-family: var(--font-en);
  font-feature-settings: normal;
}

/* 「本文へ移動」リンク（キーボード操作のとき最初に出る） */
.skip-link {
  position: absolute; left: var(--space-3); top: -100px;
  padding: var(--space-2) var(--space-3);
  background: var(--c-paper); color: var(--c-ink); z-index: 1000;
}
.skip-link:focus { top: var(--space-3); }

/* 動きを減らす設定の人には、切り替えやスクロールの動きを止める */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
