/* Splash of Color - 鮮やかなカラーパレット */

:root {
  /* 基調色（セプテーニ風：白〜薄グレー） */
  --color-bg-base: #f5f5f5; /* 薄グレー - コーポレートなベース */
  --color-bg-card: #ffffff;
  --color-border: #e5e7eb; /* グレー - 控えめなボーダー */
  --color-border-accent: #f19f4d; /* タンジェリン - 必要時のアクセント */
  
  /* アクセント色 - 鮮やかなスプラッシュ */
  --color-cerulean: #4484ce; /* セリアン - メインアクション・ヘッダー */
  --color-tangerine: #f19f4d; /* タンジェリン - 暖かいアクセント */
  --color-yellow: #f9cf00; /* イエロー - エネルギッシュなアクセント */
  --color-grey: #d9d9d9; /* グレー - ベース */
  
  /* テキスト色 */
  --color-text-primary: #1e293b; /* slate-800 */
  --color-text-secondary: #475569; /* slate-600 */
  --color-text-muted: #64748b; /* slate-500 */
  
  /* リンク色 - セリアンで信頼感 */
  --color-link: #4484ce;
  --color-link-hover: #3570b8;
  
  /* ボタン色 */
  --color-btn-primary: #4484ce; /* セリアン - メインCTA */
  --color-btn-primary-hover: #3570b8;
  --color-btn-secondary: #f9cf00; /* イエロー */
  --color-btn-secondary-hover: #e6bc00;
  --color-btn-outline: #f19f4d; /* タンジェリン */
  --color-btn-outline-hover: #f8d4a8;
  
  /* 後方互換用エイリアス */
  --color-accent-yellow: #f9cf00;
  --color-accent-orange: #f19f4d;
  --color-accent-orange-light: #f8d4a8;
  --color-accent-orange-dark: #e08a2d;
}

/* ベースフォント設定 */
html {
  font-size: 100%;
}

html.font-size-large {
  font-size: 118.75%; /* 大きく: 16px → 19px 相当 */
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Yu Gothic Medium", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
}

/* スキップリンクの基準用 */
#include-header {
  position: relative;
}

/* ヘッダー：下スクロールで隠す・上スクロールで表示（共通） */
#include-header {
  transition: transform 0.25s ease;
}
#include-header.header-hidden {
  transform: translateY(-100%);
}

/* ヘッダー周り：余白＋角丸で浮かせる */
.header-wrapper {
  box-sizing: border-box;
}

/* スマホ表示：ヘッダー固定・余白はページ背景色で表示 */
@media (max-width: 1023px) {
  :root {
    --header-mobile-height: 7.5rem;
  }
  #include-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-bg-base);
  }
  body {
    padding-top: 7.5rem;
  }
  aside[aria-label="サイト内メニュー"],
  #include-right {
    display: none !important;
  }
}

/* PC表示：ヘッダー固定（上スクロール時のみ表示するため） */
@media (min-width: 1024px) {
  :root {
    --header-height: 5.5rem;
  }
  #include-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-bg-base);
  }
  body {
    padding-top: var(--header-height);
  }
}


/* ハンバーガーメニュー（768px未満で表示） */
#mobile-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.2s, opacity 0.2s;
}
#mobile-menu.mobile-menu-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.hamburger-btn .hamburger-line {
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger-btn.is-open .hamburger-line:nth-child(1) {
  transform: translateY(0.5rem) rotate(45deg);
}
.hamburger-btn.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-0.5rem) rotate(-45deg);
}

/* 左右メニューをスクロール時に固定 */
@media (min-width: 1024px) {
  aside[aria-label="サイト内メニュー"] {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  #include-right {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
}

/* カードスタイル */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 0.125rem; /* rounded-sm */
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* リンクスタイル */
a.link-primary {
  color: var(--color-link);
  text-decoration: underline;
}

a.link-primary:hover {
  color: var(--color-link-hover);
}

/* ボタンスタイル */
.btn-primary {
  background-color: var(--color-btn-primary);
  color: var(--color-text-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--color-btn-primary-hover);
}

.btn-secondary {
  background-color: var(--color-btn-secondary);
  color: var(--color-text-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-secondary:hover {
  background-color: var(--color-btn-secondary-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-link);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--color-accent-orange-light);
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-outline:hover {
  background-color: var(--color-btn-outline-hover);
}

/* アクセシビリティ: スクリーンリーダー専用 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* スキップリンク: 通常は非表示、フォーカス時に表示 */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-text-primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 0.25rem 0;
  box-shadow: none;
  transform: translateY(-100%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--color-cerulean);
  outline-offset: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* フォーカス可視性の強化（キーボード操作時） */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-cerulean);
  outline-offset: 2px;
}

/* 動きに敏感なユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .skip-link {
    transition: none;
  }
}

/* 文字サイズ切替ボタン */
.font-size-btn {
  border-color: var(--color-border);
  background: #fff;
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
}

.font-size-btn:hover {
  background: #f8d4a8;
  border-color: var(--color-accent-orange-light);
}

.font-size-btn[aria-pressed="true"] {
  border-color: var(--color-cerulean);
  background: #e8f0fa;
  color: var(--color-cerulean);
}

/* TOPページ：Bento Grid */
.bento-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.bento-cell {
  min-height: 0;
}

@media (min-width: 768px) {
  .bento-grid {
    gap: 1.25rem;
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-hero { grid-column: 1 / -1; }
  .bento-news { grid-column: 1 / -1; }
  .bento-line { grid-column: 1 / -1; }
  .bento-contact { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .bento-grid {
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(140px, auto);
  }
  .bento-hero {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  .bento-news {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
  }
  .bento-pickup:nth-of-type(1) {
    grid-column: 3;
    grid-row: 2;
  }
  .bento-pickup:nth-of-type(2) {
    grid-column: 4;
    grid-row: 2;
  }
  .bento-line {
    grid-column: 3 / -1;
    grid-row: 3;
  }
  .bento-nav:nth-of-type(1) { grid-column: 1; grid-row: 4; }
  .bento-nav:nth-of-type(2) { grid-column: 2; grid-row: 4; }
  .bento-nav:nth-of-type(3) { grid-column: 3; grid-row: 4; }
  .bento-nav:nth-of-type(4) { grid-column: 4; grid-row: 4; }
  .bento-contact {
    grid-column: 1 / -1;
    grid-row: 5;
  }
}

/* 会則ページ：リストの複数行インデント（継続行を字下げして見やすく） */
.regulation-list {
  list-style-position: outside !important;
  padding-inline-start: 3em;
}
.regulation-list.list-none {
  padding-inline-start: 0;
}
/* 番号付き（15. 15-1. 等）のlist-none用：継続行を字下げ */
.regulation-list.list-none.regulation-list-hanging li {
  padding-left: 3em;
  text-indent: -3em;
}
/* 番号なしlist-none用：項目全体を字下げ（複数行時も継続行が揃う） */
.regulation-list.list-none:not(.regulation-list-hanging) li {
  padding-left: 2em;
}

/* モバイルメニュー：サブメニュー開閉時の▼回転 */
.mobile-menu-wrap.mobile-submenu-open .mobile-submenu-icon {
  transform: rotate(180deg);
}

/* 会則ページ：dl（数字と内容を分離） */
.regulation-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25em 1em;
  align-items: start;
}
.regulation-dl dt {
  font-weight: 600;
  color: var(--color-text-primary);
}
.regulation-dl dd {
  margin: 0;
}
