/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo,
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================
   共通サイトヘッダー
   ※ data 属性でカスタマイズ可能：
     data-header-bg     : ナビ背景色
     data-header-color  : ナビ文字色
     data-nav-style     : "transparent" で背景を透明化
   ========================================================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

/* ===== Topbar（赤帯） ===== */
.s-topbar {
  background: #cc0000;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.s-topbar-brand {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}
.s-topbar-tagline {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.1em;
}

/* ===== Main nav（黒帯） ===== */
.s-mainnav {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 24px;
  transition: background 0.3s;
}
.s-mainnav-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
}
.s-mainnav-logo {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #f0f0f0;
  text-decoration: none;
  flex-shrink: 0;
}
.s-mainnav-logo em {
  font-style: normal;
  color: #cc0000;
}

/* ===== Nav links ===== */
.s-nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 0;
}
.s-nav-link {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 240, 240, 0.6);
  text-decoration: none;
  padding: 8px 14px;
  transition: color 0.2s;
  position: relative;
}
.s-nav-link:hover { color: #f0f0f0; }
.s-nav-link.is-active { color: #c9a227; }
.s-nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: #c9a227;
}

/* ===== ハンバーガーボタン ===== */
.s-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 7px;
  margin-left: auto;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  flex-shrink: 0;
}
.s-hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: #f0f0f0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}
.s-hamburger[aria-expanded="true"] .s-hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.s-hamburger[aria-expanded="true"] .s-hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.s-hamburger[aria-expanded="true"] .s-hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   レスポンシブ（768px 以下）
   ========================================================== */
@media (max-width: 768px) {
  /* ハンバーガー表示 */
  .s-hamburger { display: flex; }

  /* ナビリンクを縦ドロップダウンに */
  .s-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #0f0f0f;
    border-top: 2px solid #cc0000;
    padding: 4px 0 12px;
    gap: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    margin: 0;
  }
  .s-nav-links.is-open { display: flex; }

  /* mainnav を relative に（ドロップダウンの基準） */
  .s-mainnav { position: relative; }

  .s-nav-link {
    padding: 14px 24px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .s-nav-link.is-active::after { display: none; }
  .s-nav-link.is-active { border-left: 3px solid #c9a227; padding-left: 21px; }

  /* topbar のタグラインはスマホでは非表示 */
  .s-topbar { padding: 6px 16px; }
  .s-topbar-tagline { display: none; }

  /* コンテナの余白をスマホ最適化 */
  .container { padding: 0 16px; }
}
