/* =====================================================
   画像ツール箱 — base.css
   デザイントークン / リセット / タイポグラフィ / 共通ヘッダー・フッター
   -----------------------------------------------------
   見出し(h1〜h4)のサイズ・装飾はこのファイルで一括管理しています。
   個別ページで font-size を上書きしないでください。
   ===================================================== */

:root {
  /* ---- カラー ---------------------------------------
     ベース(ほぼ白) + テキスト + アクセント1色(ブランドのオレンジ) */
  --bg:               #FCFAF8;
  --surface:          #FFFFFF;
  --surface-muted:    #F7F3EF;

  --border:           #ECE3DA;
  --border-strong:    #DFCDBA;

  --text:             #33302E;
  --text-muted:       #6E6862;
  --text-faint:       #A39A92;

  --accent:           #EB701D;
  --accent-soft:      #FA8C31;
  --accent-bg:        #FDEDDC;
  --accent-bg-hover:  #FEF5EC;

  /* ---- 形状・影（影は1段階のみ） ---- */
  --radius-card: 16px;
  --radius-ui:   9px;
  --shadow-card: 0 8px 24px rgba(235, 112, 29, 0.07);

  /* ---- フォント ---- */
  --font-body:  "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  --font-latin: "Poppins", "Noto Sans JP", system-ui, sans-serif;

  /* ---- レイアウト ---- */
  --page-max:  1120px;
  --page-pad:  20px;
}

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

html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

img, svg, video { max-width: 100%; height: auto; display: block; }
input, button, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
ul, ol { padding-left: 1.4em; }
a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =====================================================
   タイポグラフィ（見出しはここで一括管理）
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: 0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(25px, 6vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(21px, 3.2vw, 27px);
  line-height: 1.35;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: clamp(16px, 2.2vw, 18px);
  margin-top: 32px;
  margin-bottom: 10px;
}

h4 {
  font-size: 15px;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

/* 見出し直後の余白調整 */
h2 + *, h3 + *, h4 + * { margin-top: 0; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

small { font-size: 13px; color: var(--text-muted); }

/* ラテン文字だけの見出しに使う任意クラス（サイズはh要素の指定を継承） */
.latin { font-family: var(--font-latin); font-weight: 600; letter-spacing: 0; }

/* =====================================================
   レイアウト
   ===================================================== */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.site-main { flex: 1 0 auto; padding-bottom: 72px; }

.section { margin-top: 72px; }
.section:first-child { margin-top: 0; }

/* 背景のごく淡いアクセント（単色・ぼかしのみ。グラデーションは使わない） */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor::before,
.bg-decor::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--accent-bg);
  filter: blur(90px);
}
.bg-decor::before { width: 520px; height: 520px; top: -180px; right: -140px; opacity: 0.6; }
.bg-decor::after  { width: 440px; height: 440px; bottom: -200px; left: -160px; opacity: 0.45; }

/* =====================================================
   共通ヘッダー
   ===================================================== */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(252, 250, 248, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  flex: none;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand__icon { width: 30px; height: 30px; flex: none; }
.brand__name {
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
}
.brand__tagline {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.header-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-ui);
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.header-nav a:hover { background: var(--accent-bg-hover); color: var(--text); }
.header-nav a[aria-current="page"] { color: var(--accent); font-weight: 500; }

/* =====================================================
   共通フッター
   ===================================================== */
.site-footer {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  padding: 36px 0 40px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.9;
}
.footer-meta a { color: var(--text-faint); }

/* =====================================================
   共通パーツ（ボタン・カード）
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-ui);
  padding: 10px 18px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-bg-hover); border-color: var(--border-strong); }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}
.btn--primary:hover { background: #D2600F; border-color: #D2600F; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* スクリーンリーダー専用 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   レスポンシブ
   ===================================================== */
@media (max-width: 720px) {
  :root { --page-pad: 16px; }

  body { font-size: 14.5px; line-height: 1.8; }

  /* h1 内の強制改行は狭い画面では無効にし、自然に折り返させる */
  h1 br { display: none; }

  /* ヘッダーは2段（ブランド/ナビ）にして重なりを防ぐ。
     縦幅を取るため、この幅では固定表示を解除する。 */
  .site-header { position: static; }
  .site-header__inner {
    flex-wrap: wrap;
    gap: 0;
    min-height: 0;
    padding-top: 12px;
  }
  .brand { width: 100%; }
  .brand__tagline { display: block; }
  .brand__name { font-size: 16px; }
  .brand__icon { width: 27px; height: 27px; }
  .header-nav {
    width: 100%;
    gap: 0;
    margin-left: -10px;
    padding-bottom: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav a { padding: 8px 10px; font-size: 12.5px; }

  .section { margin-top: 56px; }
  .site-main { padding-bottom: 56px; }

  .footer-nav { gap: 6px 16px; font-size: 12.5px; }
}

@media (max-width: 400px) {
  .header-nav a { padding: 8px 7px; font-size: 12px; }
}
