/* =========================================================
   0. 前提
   - Bootstrap 非依存。上書き用の !important は置かない
   - 素の指定 = 1200px未満（スマホ＋タブレット）
   - PC は必ず対の @media (min-width: 1200px)
   - ヘッダは PC で position: fixed
     重なり回避は body の padding-top のみ
   ========================================================= */

/* =========================================================
   1. トークン
   色・フォント・ヘッダ高さを一箇所に集める。
   PC の body 上余白は --header-height-pc を参照する。
   ========================================================= */
:root {
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-heading: sans-serif;
  --font-nav: "Quicksand", sans-serif;
  --font-logo: "vdl-logomaru", sans-serif;

  --color-bg: #fff;
  --color-text: #444;
  --color-heading: #3b434a;
  --color-accent: #ffbb27;
  --color-header: rgba(177, 36, 38, 1);
  --color-header-text: #fff;
  --color-nav: #fff;
  --color-nav-hover: var(--color-accent);
  --color-nav-mobile-bg: #f7f1ea;
  --color-nav-mobile-text: #444;

  --header-height-mobile: 52px;
  --header-height-pc: 62px; /* logo 56px + padding 3px * 2 */

  --container-side: 1.5rem;
  --page-max: 1320px;

  --brand: rgb(168, 67, 31);
  --line: rgb(168, 67, 31);
}

/* アンカー位置。固定ヘッダ分だけ下げる。レイアウト本体ではない */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height-pc);
}

/* =========================================================
   2. ページ骨格
   ========================================================= */
body {
  margin: 0;
  color: var(--color-text);
  background-color: var(--color-bg);
  font-family: var(--font-body);
}

/* ヘッダ直下の本文箱。左右余白だけ。上余白はヘッダ側で確保する */
.container {
  box-sizing: border-box;
  margin: 0 var(--container-side);
  max-width: none;
}

main,
article,
.content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

section,
.section {
  box-sizing: border-box;
  padding: 5px;
}

a {
  color: inherit;
}

a:hover {
  color: color-mix(in srgb, var(--color-accent), transparent 25%);
}

/* =========================================================
   3. ヘッダ骨格（素 = モバイル）
   通常配置。ロゴ中央、右にハンバーガー。
   メニューは閉じておき、.mobile-nav-active で開く。
   ========================================================= */
.header {
  position: relative;
  z-index: 997;
  width: 100%;
  min-height: var(--header-height-mobile);
  padding: 0;
  color: var(--color-header-text);
  background-color: var(--color-header);
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--header-height-mobile);
}

.header .logo {
  display: block;
  max-width: calc(100% - 72px);
  margin: 0;
  padding: 0;
  color: var(--color-header-text);
  font-family: var(--font-logo);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: var(--header-height-mobile);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.header .logo img {
  max-height: 36px;
  margin-right: 8px;
}

/* ハンバーガー。中身の ☰ は CSS で出す */
.header .mobile-nav-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-header-text);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.header .mobile-nav-toggle::before {
  content: "☰";
  display: block;
  line-height: 1;
  transform: translateY(-2px);
}

/* モバイルメニュー。ヘッダ直下にドロップ */
.navmenu {
  z-index: 9997;
}

.navmenu ul {
  display: none;
  position: absolute;
  top: var(--header-height-mobile);
  right: 8px;
  left: auto;
  width: min(240px, calc(100% - 16px));
  margin: 0;
  padding: 8px 0;
  list-style: none;
  text-align: center;
  background-color: var(--color-nav-mobile-bg);
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-nav-active .navmenu > ul {
  display: block;
}

.navmenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  color: var(--color-nav-mobile-text);
  font-family: var(--font-nav);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.navmenu a:hover,
.navmenu .active {
  color: var(--color-nav-hover);
}

/* =========================================================
   4. ヘッダ骨格（PC）
   固定ヘッダ + 横並びナビ。
   本文の隠れは body の padding-top だけで相殺する。
   ========================================================= */
@media (min-width: 1200px) {
  body {
    padding-top: var(--header-height-pc);
  }

  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 3px 0;
  }

  .header__inner {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 110px;
    min-height: calc(var(--header-height-pc) - 6px);
    overflow: hidden;
  }

  .header .logo {
    max-width: none;
    font-size: 1.5rem;
    line-height: 56px;
    text-align: left;
  }

  .header .mobile-nav-toggle {
    display: none;
  }

  .navmenu {
    justify-self: center;
  }

  .navmenu ul {
    position: static;
    display: flex;
    align-items: center;
    width: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }

  .navmenu a {
    padding: 18px 15px;
    color: var(--color-nav);
    font-weight: 400;
    text-transform: uppercase;
  }

  .navmenu li:last-child a {
    padding-right: 0;
  }
}

.footer {
  margin-top: 2rem;
  padding: 0.9rem 0 1rem;
  color: #f3e8e2;
  background:var(--brand);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.4;
}

.footer .container {
  margin-top: 0;
}

.footer h3,
.footer p,
.footer .footer-name,
.footer .copyright,
.footer .credits {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.footer-name {
  margin-bottom: 0.25rem;
  color: #fff;
  font-family: var(--font-logo);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.footer .copyright {
  color: color-mix(in srgb, #f3e8e2 80%, #6b2418);
  font-size: 0.75rem;
}

.footer h3:empty,
.footer p:empty {
  display: none;
}


/* =========================================================
   6. 本文リズム（見出しと段落）
   ページ全体の縦リズム。個別部品の見出し装飾は後回し。
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-family: var(--font-heading);
  font-weight: 650;
  line-height: 1.35;
  text-wrap: pretty;
}

h1 {
  margin: 0 0 1.25rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

h2 {
  width: fit-content;
  max-width: 100%;
  margin: 1.6rem 0 1.4rem 0.8rem;
  padding: 0.65rem 0 0;
  border: none;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

h2::before {
  content: "";
  display: block;
  width: 2.2em;
  height: 2px;
  margin-bottom: 0.8rem;
  background: var(--brand);
}

h3 {
  width: fit-content;
  max-width: 100%;
  margin: 1.8rem 0 0.85rem 1rem;
  padding: 0;
  color: color-mix(in srgb, var(--color-heading) 72%, white);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

h3::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 2px;
  margin-right: 0.45em;
  vertical-align: middle;
  background: var(--brand);
  transform: translateY(-0.18em);
}

h4 {
  margin: 1.4rem 0 0.45rem 1.2rem;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 600;
}

h5,
h6 {
  margin: 1.2rem 0 0.35rem 1.2rem;
  font-size: 1rem;
  color: color-mix(in srgb, var(--color-heading) 78%, gray);
}

p {
  margin: 0 0 1em 1.2rem;
  padding-left: 1.25rem;
  color: #222;
  line-height: 1.85;
}

h1 + p,
h2 + p,
h3 + p,
h4 + p {
  margin-top: 0.2rem;
}

/* =========================================================
   7. 次にやらないこと（このファイルの外）
   img / figure / toc / card / blogcard / gallery / slider
   breadcrumb の細部 / mobile-bar / site-dock
   ========================================================= */
