/* ==========================================================================
   base.css  -  全サイト共通の土台スタイル
   各サイトの css/style.css でカラー・装飾を上書きします。
   ========================================================================== */

/* --- 1. リセット ------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
input, textarea, select {
  font: inherit;
  color: inherit;
}

/* --- 2. ベースタイポグラフィ ----------------------------------------- */
:root {
  --container-width: 1200px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --header-height: 70px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
               "Meiryo", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #fff;
  min-width: 320px;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.4;
  font-weight: 700;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* --- 3. レイアウト ---------------------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section { padding: 50px 0; }
}

/* --- 4. ユーティリティ ----------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* --- 5. ボタン基本 ---------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-weight: 700;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); }

/* --- 6. ヘッダー基本構造 --------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.site-header .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.site-nav ul {
  display: flex;
  gap: 28px;
}

.site-nav a {
  position: relative;
  padding: 4px 2px;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.site-nav a:hover { opacity: 0.7; }
.site-nav a.is-active { font-weight: 700; }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: currentColor;
}

/* --- 7. ハンバーガー -------------------------------------------------- */
.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 4px;
  width: 24px; height: 2px;
  background: currentColor;
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -8px; left: 0; }
.nav-toggle span::after { top: 8px; left: 0; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }
  .site-nav.is-open { max-height: 400px; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  .site-nav li { border-bottom: 1px solid #eee; }
  .site-nav li:last-child { border-bottom: none; }
  .site-nav a {
    display: block;
    padding: 14px 24px;
  }
  .site-nav a.is-active::after { display: none; }
}

/* --- 8. フッター基本 --------------------------------------------------- */
.site-footer {
  padding: 50px 0 24px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-grid h4 {
  font-size: 1rem;
  margin-bottom: 12px;
}
.footer-grid p { margin-bottom: 0.5em; }
.footer-copy {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.85rem;
}

/* --- 9. ヒーロー基本 -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 640px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* --- 10. カードグリッド ----------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.card-img { aspect-ratio: 4/3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 8px; font-size: 1.15rem; }

/* --- 11. セクション見出し --------------------------------------------- */
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}
.section-lead {
  text-align: center;
  margin-bottom: 48px;
  color: #666;
}

/* --- 12. テーブル ----------------------------------------------------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.info-table th,
.info-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: top;
}
.info-table th {
  width: 30%;
  font-weight: 700;
  background: #fafafa;
}
@media (max-width: 600px) {
  .info-table th, .info-table td { display: block; width: 100%; border-bottom: none; padding: 8px 12px; }
  .info-table tr { border-bottom: 1px solid #e5e5e5; display: block; padding: 8px 0; }
}

/* --- 13. フォーム ---------------------------------------------------- */
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.form-row textarea { min-height: 140px; resize: vertical; }
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: 2px solid #888;
  outline-offset: 2px;
}

/* --- 14. アクセシビリティ --------------------------------------------- */
:focus-visible {
  outline: 3px solid #4d90fe;
  outline-offset: 2px;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
