/* =========================================================
   行政経営・政策研究所 / 海老澤 功
   デザイン草案 共通スタイル
   ---------------------------------------------------------
   方針: 王道の「行政・信頼」を軸に、書籍の読み物感を添える。
   紺(信頼) + 生成りの余白 + 朱の差し色。見出しは明朝、本文はゴシック。
   ========================================================= */

/* ---- デザイントークン ---- */
:root {
  --navy:        #1c3a5e;   /* 主色: 信頼の紺 */
  --navy-deep:   #142b46;
  --navy-soft:   #2f5580;
  --ink:         #1e2530;   /* 本文テキスト */
  --muted:       #5c6675;   /* 補足テキスト */
  --accent:      #b0462b;   /* 差し色: 朱 (CTA・強調) */
  --accent-soft: #c86b52;
  --gold:        #977a2f;   /* 受賞バッジ用の金 */
  --bg:          #f7f4ee;   /* 生成りの背景 */
  --surface:     #ffffff;
  --surface-alt: #f1ece2;
  --line:        #e2dccf;   /* 温かみのある罫線 */
  --line-strong: #cfc6b4;

  --serif: "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  --sans:  "Noto Sans JP", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", sans-serif;

  --wrap: 1080px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20,43,70,.06), 0 8px 24px rgba(20,43,70,.06);
}

/* ---- ベース ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- アクセシビリティ ---- */
/* 本文へスキップ（キーボード操作時のみ表示）*/
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--navy-deep); color: #fff; padding: 10px 18px;
  border-radius: var(--radius); font-weight: 700; font-size: 14px;
  transition: top .15s ease;
}
.skip-link:focus { top: 16px; color: #fff; outline: none; }
/* キーボードフォーカスの可視化（マウス操作時は出さない）*/
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.4; color: var(--navy-deep); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* 汎用: セクション */
.section { padding: 84px 0; }
.section--alt { background: var(--surface-alt); }
.section__kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 10px;
}
.section__title { font-size: 28px; margin: 0 0 14px; }
.section__lead { color: var(--muted); max-width: 42em; margin: 0 0 40px; }

/* プレースホルダー画像枠 */
.ph {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(-45deg, #ece5d6 0 12px, #e6ddca 12px 24px);
  color: #9b8f76; font-size: 13px; letter-spacing: .1em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
/* 実画像（枠と同じ形・サイズに収める）*/
.pic {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-alt);
}
.hero__portrait .pic { aspect-ratio: 4/5; }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 15px; line-height: 1;
  padding: 13px 26px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; transition: .18s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #97381f; color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn--onnavy { background: #fff; color: var(--navy-deep); }
.btn--onnavy:hover { background: var(--bg); color: var(--navy-deep); }

/* ---- ヘッダー / ナビ ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,244,238,.92);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--navy-deep); letter-spacing: .04em; }
.brand__sub  { font-size: 10.5px; letter-spacing: .18em; color: var(--muted); }
.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 14.5px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.nav__links a:hover { color: var(--accent); }
.nav__links a[aria-current="page"] { color: var(--navy); border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--navy-deep); margin: 5px 0; transition: .2s; }

/* ---- 受賞バッジ ---- */
.badge-award {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); background: #fbf7ec;
  border: 1px solid #e6d9b0; border-radius: 999px;
  padding: 7px 16px 7px 12px;
}
.badge-award svg { flex: none; }

/* ---- ヒーロー ---- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f7f4ee 0%, #efe9dd 100%); padding: 76px 0 84px; }
/* キャッチコピーの後ろに画像を入れる場合: .hero に hero--has-bg を付け、--hero-bg に画像を指定
   例) <section class="hero hero--has-bg" style="--hero-bg:url('assets/hero.jpg')"> */
.hero--has-bg { background-image: linear-gradient(180deg, rgba(247,244,238,.86), rgba(239,233,221,.80)), var(--hero-bg); background-size: cover; background-position: center; }
.hero .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__eyebrow { font-size: 13px; letter-spacing: .2em; color: var(--muted); font-weight: 600; margin: 0 0 18px; }
.hero__title { font-size: 44px; line-height: 1.28; margin: 0 0 20px; color: var(--navy-deep); }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__desc { font-size: 16.5px; color: #3a4250; max-width: 34em; margin: 0 0 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero__portrait { position: relative; }
.hero__portrait .ph { aspect-ratio: 4/5; }
.hero__name-plate {
  position: absolute; left: -14px; bottom: 22px;
  background: var(--navy-deep); color: #fff; padding: 14px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero__name-plate b { font-family: var(--serif); font-size: 20px; display: block; letter-spacing: .06em; }
.hero__name-plate span { font-size: 11.5px; letter-spacing: .16em; color: #c9d4e2; }

/* ---- 信頼バー (数字) ---- */
.trustbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trustbar__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trustbar__grid--1 { grid-template-columns: 1fr; }
.trustbar__grid--2 { grid-template-columns: repeat(2, 1fr); }
.trustbar__grid--3 { grid-template-columns: repeat(3, 1fr); }
.trust { padding: 28px 20px; text-align: center; border-left: 1px solid var(--line); }
.trust:first-child { border-left: 0; }
.trust b { font-family: var(--serif); font-size: 30px; color: var(--navy); display: block; }
.trust span { display: block; font-size: 12.5px; color: var(--muted); letter-spacing: .05em;
               text-wrap: balance; word-break: auto-phrase; }

/* ---- カード ---- */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: .18s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__num { font-family: var(--serif); font-size: 14px; color: var(--accent); letter-spacing: .1em; }
.card h3 { font-size: 19px; margin: 8px 0 10px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* 領域タグ */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chip { font-size: 13px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 7px 15px; }

/* ---- 書籍 ---- */
.book { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: start;
        background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.book__cover { aspect-ratio: 3/4.3; }
.book h3 { font-size: 20px; margin: 0 0 6px; }
.book__meta { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.book__meta b { color: var(--ink); font-weight: 700; }
.book p { font-size: 14.5px; color: #3a4250; margin: 0 0 14px; }

/* ---- 実績 (Works) ---- */
.work { border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
        border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 24px 26px; }
.work h3 { font-size: 18px; margin: 0 0 8px; }
.work__result { display: inline-block; font-family: var(--serif); color: var(--navy); font-size: 15px;
                background: #eef2f7; border-radius: var(--radius); padding: 4px 12px; margin-bottom: 10px; }
.work p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---- 経歴タイムライン ---- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 26px 28px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px;
                       background: var(--surface); border: 2px solid var(--accent); border-radius: 50%; }
.timeline .yr { font-family: var(--serif); font-weight: 700; color: var(--navy); margin-right: 12px; }

/* ---- FAQ ---- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 4px; font-weight: 700; color: var(--navy-deep);
               display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "－"; }
.faq p { margin: 0 4px 20px; color: var(--muted); }

/* ---- フォーム (見た目のみ) ---- */
.form { display: grid; gap: 18px; max-width: 620px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 700; color: var(--navy-deep); }
.field input, .field textarea {
  font-family: var(--sans); font-size: 15px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
/* プライバシー等の本文（管理画面のリッチ入力を反映：段落・箇条書き）*/
.policy-body { margin: 0 0 18px; }
.policy-body ul { margin: 8px 0 8px; padding-left: 1.4em; }
.policy-body li { margin: 4px 0; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28,58,94,.15); }
/* ハニーポット（人には見えない・ボット対策）*/
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 送信完了メッセージ */
.form-thanks { max-width: 620px; background: #eef4ee; border: 1px solid #bcdcc6; border-radius: var(--radius); padding: 22px 24px; color: #2e5d43; line-height: 1.9; }
.form-thanks p { margin: 0; }
/* お問い合わせ（formrun 連携）：入力エラー・同意チェック */
[data-formrun-show-if-error]:not(.formrun-system-show),
[data-formrun-show-if-success]:not(.formrun-system-show) { display: none; } /* スクリプト読込前のちらつき防止 */
.field-err { color: #8f3420; font-size: 13px; }
.field .agree { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); cursor: pointer; }
.field .agree input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 0; accent-color: var(--navy); flex: none; }
.field .agree a { text-decoration: underline; }
/* 送信エラー */
.form-error { max-width: 620px; background: #fbeeea; border: 1px solid #e7b9ab; border-radius: var(--radius); padding: 14px 18px; color: #8f3420; margin: 14px 0 0; }

/* ---- ページ見出し (下層ページ) ---- */
.pagehead { background: var(--navy-deep); color: #fff; padding: 60px 0; }
.pagehead .section__kicker { color: var(--accent-soft); }
.pagehead h1 { color: #fff; font-size: 34px; margin: 0 0 10px; }
.pagehead p { color: #c9d4e2; margin: 0; max-width: 46em; }

/* ---- CTA 帯 ---- */
.cta-band { background: var(--navy); color: #fff; padding: 64px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: 26px; margin: 0 0 12px; }
.cta-band p { color: #c9d4e2; margin: 0 0 26px; }

/* ---- お知らせリスト ---- */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { display: grid; grid-template-columns: 120px 1fr; gap: 18px; padding: 18px 4px;
                border-bottom: 1px solid var(--line); align-items: baseline; }
.news-list time { font-size: 13px; color: var(--muted); font-family: var(--serif); }
.news-list .tag { font-size: 11px; font-weight: 700; color: #fff; background: var(--navy-soft);
                  border-radius: 3px; padding: 2px 9px; margin-right: 10px; }

/* ---- お知らせ カテゴリ絞り込み ---- */
.news-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.news-filter__btn { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--navy);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: .15s; }
.news-filter__btn:hover { border-color: var(--navy); }
.news-filter__btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
/* お知らせ ページ送り */
.news-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.news-page__num, .news-page__nav {
  font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--navy);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  min-width: 40px; height: 40px; padding: 0 12px; cursor: pointer; transition: .15s;
}
.news-page__num:hover, .news-page__nav:hover { border-color: var(--navy); }
.news-page__num.is-active { background: var(--navy); color: #fff; border-color: var(--navy); cursor: default; }
.news-page__nav[disabled] { opacity: .4; cursor: default; }

/* ---- フッター ---- */
.site-footer { background: var(--navy-deep); color: #c9d4e2; padding: 56px 0 28px; margin-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer__brand .brand__name { color: #fff; }
.footer__brand p { font-size: 13.5px; margin: 12px 0 0; color: #a9b6c6; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; margin: 0 0 14px; font-family: var(--sans); }
.site-footer .footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #d7e0ec; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__sns { display: flex; gap: 12px; }
.footer__sns a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%;
                 display: flex; align-items: center; justify-content: center; }
.footer__bottom { display: flex; justify-content: center; text-align: center; padding-top: 20px; font-size: 12.5px; color: #8fa0b4; flex-wrap: wrap; gap: 8px; }
.footer__bottom a { color: #8fa0b4; }

/* ---- ユーティリティ ---- */
.center { text-align: center; }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 40px; }
.note { font-size: 12.5px; color: var(--muted); background: #fbf7ec; border: 1px dashed var(--line-strong);
        border-radius: var(--radius); padding: 12px 16px; }

/* ---- 改行の最適化（全ページ共通） ---- */
/* 見出し・短文は行の長さを均等化（balance）し、日本語は語のまとまり（文節）で折り返す。
   未対応ブラウザでは通常の折り返しに自動フォールバック。 */
h1, h2, h3, h4,
.hero__title, .hero__desc, .section__title, .section__lead,
.card h3, .card p, .book h3, .work h3, .cta-band h2, .cta-band p,
.pagehead h1, .pagehead p {
  text-wrap: balance;
}
h1, h2, h3, h4, p, li { word-break: auto-phrase; }

/* ---- レスポンシブ ---- */
/* タブレット・画面分割（〜1080px）: ナビをハンバーガーに切り替え、詰め込み折返しを防ぐ */
@media (max-width: 1080px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; background: var(--bg);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none; z-index: 60;
  }
  .nav__links.open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 13px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__links a[aria-current="page"] { border-bottom: 1px solid var(--line); color: var(--accent); }
  .nav__cta { margin: 12px 0 0; }
  .nav__cta a { display: block; width: 100%; border-bottom: 0; text-align: center; padding: 15px 18px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 36px; }
  .cards--3 { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .book { grid-template-columns: 110px 1fr; }
  .trustbar__grid { grid-template-columns: 1fr 1fr; }
  .trustbar__grid--1 { grid-template-columns: 1fr; }
  .trust:nth-child(odd) { border-left: 0; }
  .trust:nth-child(1), .trust:nth-child(2) { border-bottom: 1px solid var(--line); }
}
/* スマホ（〜720px） */
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .cards--3, .cards--2 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .news-list li { grid-template-columns: 1fr; gap: 4px; }
  .hero__title { font-size: 30px; }
}
