/* ============================================================
   アモス自発学習研究所 八潮教室 — メインスタイルシート
   ============================================================ */

:root {
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --shadow-soft: 0 18px 48px rgba(12, 36, 61, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1120px;

  /* カラーパレット */
  --bg:          #efe5d6;
  --surface:     #fffdfa;
  --surface-2:   #f6ecdf;
  --surface-3:   #f1e2cf;
  --ink:         #203040;
  --muted:       #62584f;
  --line:        #dcc9b6;
  --tag:         #ebf1e4;
  --tag-ink:     #42614d;
  --accent:      #ce6b2d;
  --accent-ink:  #ffffff;
  --accent-deep: #214f73;
  --banner:      #204d72;
  --banner-ink:  #ffffff;
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── サイト外枠 ── */
.site-shell { min-height: 100vh; }
main [id]   { scroll-margin-top: 84px; }

/* ── コンテナ ── */
.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

/* ── ヘッダー ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand a { display: flex; align-items: center; gap: 12px; }
.brand img { width: auto; height: 34px; flex: 0 0 auto; }

.header-links { display: flex; gap: 10px; flex-wrap: wrap; }

.chip-link {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
}

.chip-link--member {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}

/* ── ボタン ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary  { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--surface-2); border-color: var(--line); color: var(--ink); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

/* ── タイポグラフィ ── */
h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.15;
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 13px;
  font-weight: 700;
}

.lead {
  margin: 0;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
}

/* ── セクション ── */
.section { padding: 22px 0; }

.section-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 34px);
}

.section-intro { margin: 0 0 18px; color: var(--muted); }

/* ── カラーバンド ── */
.warm-band {
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.entry-band {
  background: #fcf3eb;
  border-color: #d4b896;
}

.entry-band .course-grid .tile {
  background: var(--surface);
  border-color: #d4b896;
}

.faq-band {
  background: linear-gradient(180deg, rgba(33,79,115,0.05) 0%, rgba(33,79,115,0.01) 100%);
  border: 1px solid rgba(33,79,115,0.10);
}

.contact-band {
  background: var(--accent-deep);
  color: var(--banner-ink);
  border: none;
}

.contact-band .section-label {
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
}

.contact-band h2,
.contact-band .section-intro { color: #ffffff; }
.contact-band .section-intro  { opacity: 0.85; }

.contact-band .tile {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  color: #ffffff;
}

.contact-band .note-box {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
}

.contact-band .btn-primary { background: var(--accent); }

/* ── グリッド ── */
.feature-grid,
.course-grid,
.support-grid,
.news-grid,
.faq-grid,
.gallery-grid { display: grid; gap: 16px; }

.feature-grid,
.support-grid,
.faq-grid,
.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.course-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.news-grid   { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── タイル ── */
.tile {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(32, 48, 64, 0.10);
}

.tile strong { display: block; margin-bottom: 8px; font-size: 18px; }
.tile p      { margin: 0; }
.tile ul     { margin: 10px 0 0; padding-left: 18px; }
.tile li + li { margin-top: 6px; }

/* ── ノートボックス ── */
.note-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px dashed var(--line);
}

.mini-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ── バナー ── */
.banner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--banner);
  color: var(--banner-ink);
}

.banner h3 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.banner p  { margin: 0 0 16px; }
.banner img {
  width: 100%; height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px rgba(10,28,45,0.16);
}

/* ── フロー ── */
.flow {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.flow-step {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.flow-step span {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 12px;
  font-weight: 700;
}

/* ── フッター ── */
.footer { padding: 32px 0 48px; }

.footer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

/* ── スマホ固定CTA ── */
.mobile-sticky { display: none; }

/* ── ページコンテンツ（Gutenbergブロック用）── */
.page-content { margin-top: 16px; }
.page-content h2 { font-size: clamp(22px, 3vw, 30px); margin: 24px 0 10px; }
.page-content h3 { font-size: clamp(18px, 2.5vw, 24px); margin: 20px 0 8px; }
.page-content p  { margin: 0 0 14px; }

/* ── ブログ一覧・記事 ── */
.post-list { display: grid; gap: 16px; }

.post-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(32,48,64,0.10);
}

.post-card .post-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.post-card h2 { font-size: 20px; margin: 0 0 8px; }
.post-card p  { font-size: 15px; color: var(--muted); margin: 0; }

/* ── レスポンシブ（960px以下）── */
@media (max-width: 960px) {
  .banner,
  .course-grid { grid-template-columns: 1fr; }

  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .feature-grid,
  .support-grid,
  .news-grid,
  .faq-grid,
  .gallery-grid,
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── レスポンシブ（640px以下）── */
@media (max-width: 640px) {
  .site-shell { padding-bottom: 92px; }

  .container { width: min(calc(100% - 24px), var(--max)); }

  .site-header .container {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .header-links {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .header-links::-webkit-scrollbar { display: none; }
  .chip-link { white-space: nowrap; }

  .section-card,
  .banner,
  .footer-card { padding: 18px; }

  h1 { font-size: 34px; }
  .section h2 { font-size: 28px; }
  .lead { font-size: 16px; }

  .cta-row { flex-direction: column; }
  .btn { width: 100%; }

  .tile, .note-box { padding: 16px; }

  .banner,
  .feature-grid,
  .course-grid,
  .support-grid,
  .news-grid,
  .faq-grid,
  .gallery-grid,
  .flow { grid-template-columns: 1fr; }

  .mobile-sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: block;
    padding: 10px 16px 16px;
    background: linear-gradient(180deg, rgba(246,242,234,0) 0%, var(--bg) 28%);
  }

  .mobile-sticky-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
