/* ============================================================
   header.css — 全ページ共通のヘッダー（トップ・エディタ・ガイド・法務・404）
   中身は generate-site-parts.js が site-parts.js（HEADERS）から焼き込む。
   寸法は tokens.css の --header-*。ページを移ってもロゴとサイト名が動かないよう、ここ1か所で決める。
   ページ固有の右側（トップのページ内リンク＝lp.css、エディタのボタン＝style.css）は各 CSS 側。
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 0 var(--header-pad-x);
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.header-brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text); text-decoration: none; }
.header-brand:hover { color: var(--text); }
.header-logo {
  flex-shrink: 0;
  width: var(--header-logo);
  height: var(--header-logo);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--accent-dark);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--header-title);
  line-height: 1;
}
.header-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--header-title);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: var(--lh-display);
}

/* 作成ページへのボタン（トップ・ガイド・法務・404） */
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: var(--on-accent);
  font-size: var(--fs-note);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-cta:hover { background: var(--accent-hover); color: var(--on-accent); }
.header-brand:focus-visible, .header-cta:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

/* エディタが使えない幅（768px 以下）では、作成ボタンを出さずサイト名だけにする */
@media (max-width: 768px) {
  .header-cta { display: none; }
}
@media (max-width: 900px) {
  .header { padding: 0 var(--header-pad-x-sp); }
  .header-title { font-size: var(--header-title-sp); }
}
