/* ============================================================
   八街ワークス ブログ専用CSS
   - blog.html（旧）のデザイントークンを踏襲
   - 一覧ページ（blog/index.html）と記事詳細ページ（blog/<slug>/index.html）で共通利用
============================================================ */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --text: #1a1a1a;
  --muted: #6b7280;
  --line: #eedede;
  --accent: #c0392b;
  --accent-dark: #922b21;
  --accent-mid: #d9534f;
  --accent-soft: #fdf3f3;
  --accent-pale: #fff8f8;
  --shadow-sm: 0 2px 8px rgba(192,57,43,0.06);
  --shadow: 0 8px 32px rgba(192,57,43,0.10);
  --shadow-lg: 0 20px 60px rgba(192,57,43,0.14);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --max: 1080px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   BREADCRUMB
============================================================ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 8px;
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: 0.4; }

/* ============================================================
   PAGE HERO（一覧ページ上部の説明文）
============================================================ */
.page-hero {
  padding: 136px 0 72px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.page-hero__eyebrow::before {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.page-hero h1 { margin-bottom: 24px; }
.page-hero__desc {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 600px;
}
.page-hero__desc + .page-hero__desc { margin-top: 16px; }

/* ============================================================
   ARTICLES SECTION（一覧グリッド）
============================================================ */
.articles-section { background: var(--surface-alt); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 記事カード（公式サイト内記事・note外部リンク共通） */
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.22s var(--ease), transform 0.22s var(--ease), border-color 0.22s var(--ease);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.blog-card:hover {
  box-shadow: 0 8px 28px rgba(192,57,43,0.10);
  transform: translateY(-3px);
  border-color: rgba(192,57,43,0.18);
}
.blog-card__eyecatch {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-alt);
  display: block;
}
.blog-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.blog-card__cat {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
}
.blog-card__date {
  font-size: 0.78rem;
  color: var(--muted);
}
.blog-card__title {
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  flex: 1;
}
.blog-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
}
.blog-card__read {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
  align-self: flex-end;
}
.blog-card__read svg { width: 13px; height: 13px; flex-shrink: 0; }

/* note へのリンク（移行待ち記事用） */
.note-link-bar {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.note-link-bar__text { font-size: 0.92rem; color: var(--muted); }

/* ============================================================
   記事詳細ページ
============================================================ */
.article-header {
  padding: 136px 0 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.article-meta__cat {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--accent-soft);
  color: var(--accent);
}
.article-meta__date { font-size: 0.85rem; color: var(--muted); }
.article-header h1 { margin-bottom: 20px; }
.article-header__desc {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 760px;
}

.article-eyecatch {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.article-eyecatch img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.article-body-section { padding: 56px 0 0; }
.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--text);
}
.article-body h2 {
  font-size: 1.5rem;
  margin: 48px 0 20px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.article-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.article-body h3 {
  font-size: 1.15rem;
  margin: 36px 0 14px;
}
.article-body p { margin: 0 0 22px; }
.article-body ul,
.article-body ol {
  margin: 0 0 22px;
  padding-left: 1.4em;
}
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 8px; line-height: 1.85; }
.article-body strong { font-weight: 700; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-dark); }
.article-body blockquote {
  margin: 0 0 22px;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--accent-pale);
  color: var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 8px 0 22px;
}
.article-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.article-body pre {
  background: #1a1a1a;
  color: #f5f5f5;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0 0 22px;
}
.article-body pre code { background: none; padding: 0; color: inherit; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 22px;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.article-body th {
  background: var(--surface-alt);
  font-weight: 700;
  white-space: nowrap;
}

.article-tags {
  max-width: 760px;
  margin: 0 auto;
  padding-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.article-tags__item {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

/* ============================================================
   関連記事・前後記事
============================================================ */
.related-section { background: var(--surface-alt); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.article-nav__link {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.article-nav__link:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.article-nav__link--next { text-align: right; align-items: flex-end; }
.article-nav__label { font-size: 0.75rem; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.article-nav__title { font-size: 0.92rem; font-weight: 700; line-height: 1.6; }

/* ============================================================
   記事末尾CTA
============================================================ */
.blog-cta {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
}
.blog-cta__inner { max-width: 680px; }
.blog-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.blog-cta__eyebrow::before {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: rgba(255,255,255,0.5);
  border-radius: 1px;
}
.blog-cta h2 { color: #fff; margin-bottom: 20px; }
.blog-cta p { color: rgba(255,255,255,0.84); font-size: 1rem; margin-bottom: 36px; line-height: 1.9; }
.blog-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-cta-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  background: #fff;
  color: var(--accent);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
}
.btn-cta-white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.btn-cta-white svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-ghost-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn-ghost-white:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.7); transform: translateY(-2px); }
.btn-ghost-white svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-subtle-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid rgba(107,114,128,0.35);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn-subtle-outline:hover { border-color: var(--muted); color: var(--text); transform: translateY(-2px); }
.btn-subtle-outline svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 860px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .page-hero { padding: 120px 0 56px; }
  .article-header { padding: 120px 0 32px; }
  .articles-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__link--next { text-align: left; align-items: flex-start; }
  .blog-cta__actions { flex-direction: column; }
  .blog-cta__actions a { width: 100%; }
  .note-link-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .article-body table { font-size: 0.85rem; }
}
