/* ============================================================
   日刊AIエージェント — AI専門誌・テックメディア風スタイルシート
   ============================================================ */

/* ---------- 変数定義 --------------------------------------- */
:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sub: #f1f5f9;
  
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  
  --accent: #4f46e5;       /* Indigo */
  --accent-light: #e0e7ff;
  --accent-dark: #3730a3;
  
  --border: #e2e8f0;
  --border-dark: #0f172a;

  --font-serif: "Noto Serif JP", serif;
  --font-sans: "Inter", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ---------- リセット & ベース -------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; border-radius: 8px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  margin-top: 0;
  line-height: 1.25;
}

/* ---------- レイアウト -------------------------------------- */
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- ヘッダー (専門誌風) ----------------------------- */
.site-header {
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 1rem;
}

.site-header .site-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.site-title a { color: inherit; text-decoration: none; }
.site-title .badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  background: var(--text-main);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: super;
  margin-left: 0.25rem;
  font-weight: 700;
}

.header-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 4px solid var(--text-main);
  border-bottom: 1px solid var(--text-main);
  padding: 0.5rem 0;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-nav a {
  color: var(--text-sub);
  margin: 0 1rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.site-nav a:hover, .site-nav a.active { color: var(--text-main); text-decoration: none; }

/* ---------- ヒーローセクション (今号の顔) -------------------- */
.mag-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin: 4rem 0 6rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.hero-main {
  border-right: 1px solid var(--border);
  padding-right: 3rem;
}

.label-kicker {
  display: inline-block;
  background: var(--text-main);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 1.25rem;
  color: var(--text-sub);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.stat-item {
  background: var(--bg-sub);
  padding: 1rem;
  border-radius: var(--radius);
}
.stat-item span { display: block; font-size: 0.7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.stat-item strong { display: block; font-size: 1.1rem; margin-top: 0.25rem; }

/* ---------- セクションタイトル ----------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--text-main);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0;
}

/* ---------- 記事カード (雑誌風グリッド) ---------------------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 3rem 2rem;
  margin-bottom: 6rem;
}

.story-card {
  display: flex;
  flex-direction: column;
}

.story-card .card-category {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.story-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.story-card h3 a { color: inherit; text-decoration: none; }
.story-card h3 a:hover { color: var(--accent); }

.story-summary {
  font-size: 0.95rem;
  color: var(--text-sub);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- 記事詳細ページ (日刊号構成) --------------------- */
.post-header-mag {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 5rem;
}

.post-issue-num {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.post-title-mag {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.post-lead-mag {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--text-sub);
}

/* 本文内のトピックカード */
.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.topic-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.topic-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.meta-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.meta-value { font-size: 0.9rem; font-weight: 600; }

.topic-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-main);
}

.topic-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--border);
}

.editorial-comment {
  font-size: 0.95rem;
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  color: #78350f;
}
.comment-label { display: block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; margin-bottom: 0.25rem; color: #b45309; }

/* ---------- バッジ・ステータス ------------------------------ */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pill-indigo { background: var(--accent-light); color: var(--accent-dark); }
.pill-green { background: #dcfce7; color: #166534; }
.pill-yellow { background: #fef3c7; color: #92400e; }
.pill-red { background: #fee2e2; color: #991b1b; }

.confidence-dots { display: flex; gap: 4px; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.dot.fill { background: var(--accent); }

/* ---------- フッター --------------------------------------- */
.site-footer {
  background: var(--text-main);
  color: var(--text-muted);
  padding: 5rem 0;
  margin-top: 8rem;
}
.site-footer .site-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.footer-info h4 { font-family: var(--font-serif); color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid #334155;
  padding-top: 2rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
}

/* ---------- レスポンシブ ----------------------------------- */
@media (max-width: 900px) {
  .mag-hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-main { border-right: none; padding-right: 0; }
  .topic-grid { grid-template-columns: 1fr; }
  .site-footer .site-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .post-title-mag { font-size: 2.5rem; }
}

@media (max-width: 600px) {
  .site-title { font-size: 1.75rem; }
  .header-meta { font-size: 0.7rem; }
  .hero-title { font-size: 2rem; }
  .topic-card { padding: 1.5rem; }
}
