/* ================================================================
   style.css — 令和６年度 福祉行政報告例 分析レポート
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --navy:       #0D2137;
  --blue:       #1B5E93;
  --blue-mid:   #2980B9;
  --teal:       #16A085;
  --teal-light: #1ABC9C;
  --red:        #C0392B;
  --amber:      #E67E22;
  --green:      #27AE60;
  --purple:     #7D3C98;
  --brown:      #6D4C41;
  --gray:       #757575;

  --bg:         #F0F4F8;
  --bg-alt:     #FAFCFF;
  --surface:    #FFFFFF;
  --border:     #DDE3EC;
  --text:       #1A2533;
  --text-muted: #64748B;

  /* Disability type colors */
  --c-body:     #2471A3;
  --c-severe:   #D35400;
  --c-intel:    #1E8449;
  --c-mental:   #C0392B;
  --c-develop:  #7D3C98;
  --c-brain:    #5D4037;
  --c-other:    #757575;

  --radius:     14px;
  --shadow:     0 2px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.14);
  --transition: .35s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans JP', 'BIZ UDPGothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Navigation ─────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(13,33,55,.96);
  backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 58px;
}
.nav-brand { display: flex; flex-direction: column; gap: 1px; }
.nav-brand-title {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,.95); letter-spacing: .04em;
}
.nav-brand-sub { font-size: 10px; color: rgba(255,255,255,.45); }
.nav-links {
  display: flex; gap: 4px; list-style: none;
}
.nav-links a {
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,.7);
  padding: 6px 10px; border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0E3460 55%, #104E8B 100%);
  padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px; padding: 6px 16px; margin-bottom: 28px;
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-light);
  box-shadow: 0 0 8px var(--teal-light);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.85); }
}
.hero-badge-text { font-size: 11px; color: rgba(255,255,255,.7); letter-spacing: .08em; text-transform: uppercase; }
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900; color: #fff;
  line-height: 1.35; margin-bottom: 16px;
}
.hero-title span { color: var(--teal-light); }
.hero-subtitle {
  font-size: 14px; color: rgba(255,255,255,.7);
  max-width: 700px; line-height: 1.8; margin-bottom: 48px;
}
.hero-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 40px;
}
.kpi-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 24px 20px;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.kpi-card:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }
.kpi-card.accent-teal { border-color: rgba(26,188,156,.3); background: rgba(26,188,156,.08); }
.kpi-card.accent-red  { border-color: rgba(231,76,60,.3);  background: rgba(231,76,60,.08); }
.kpi-card.accent-amber{ border-color: rgba(230,126,34,.3); background: rgba(230,126,34,.08); }
.kpi-label { font-size: 11px; color: rgba(255,255,255,.55); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.kpi-value {
  font-family: 'BIZ UDPGothic', monospace;
  font-size: clamp(24px, 3vw, 34px); font-weight: 700;
  color: #fff; line-height: 1.1; margin-bottom: 6px;
}
.kpi-unit { font-size: .55em; color: rgba(255,255,255,.7); font-family: inherit; }
.kpi-desc { font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.5; }

/* ── Section Divider ────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── Sections ───────────────────────────────────────────────── */
.section { padding: 80px 24px; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: linear-gradient(135deg, #0D2137, #142942);
  color: #fff;
}
.container { max-width: 1200px; margin: 0 auto; }

/* ── Section Header ─────────────────────────────────────────── */
.section-header { margin-bottom: 48px; }
.section-num {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.section-num-badge {
  width: 36px; height: 36px;
  background: var(--blue); color: #fff;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.section-num-text { font-size: 11px; color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase; }
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700; line-height: 1.3; margin-bottom: 12px;
}
.section-dark .section-title { color: #fff; }
.section-dark .section-num-badge { background: #E74C3C; }
.section-dark .section-num-text { color: rgba(255,255,255,.5); }
.section-desc { font-size: 14px; color: var(--text-muted); max-width: 760px; line-height: 1.8; }
.section-dark .section-desc { color: rgba(255,255,255,.6); }

/* ── Grid ───────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.card-subtitle { font-size: 11px; color: var(--text-muted); }
.card-body { padding: 24px; }

/* ── Chart Wrap ─────────────────────────────────────────────── */
.chart-wrap { position: relative; width: 100%; }

/* ── Insight Box ────────────────────────────────────────────── */
.insight-box {
  background: linear-gradient(135deg, #F0F6FF, #F8FAFF);
  border: 1px solid #C8DAF5;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius); padding: 24px;
}
.insight-box.teal  { background: linear-gradient(135deg, #F0FBF8, #F8FDFB); border-color: #A8DDD3; border-left-color: var(--teal); }
.insight-box.red   { background: linear-gradient(135deg, #FFF0EE, #FFFAF8); border-color: #F5B8B2; border-left-color: var(--red); }
.insight-box.amber { background: linear-gradient(135deg, #FFF8F0, #FFFCF8); border-color: #F5D5A8; border-left-color: var(--amber); }
.insight-box.purple{ background: linear-gradient(135deg, #F5F0FF, #FAF8FF); border-color: #C8B8E8; border-left-color: var(--purple); }
.insight-box.dark  { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); border-left-color: var(--teal-light); color: #fff; }
.insight-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.insight-box.teal  .insight-label { color: var(--teal); }
.insight-box.red   .insight-label { color: var(--red); }
.insight-box.amber .insight-label { color: var(--amber); }
.insight-box.purple .insight-label { color: var(--purple); }
.insight-box.dark  .insight-label { color: var(--teal-light); }
.insight-text { font-size: 13.5px; line-height: 1.75; color: var(--text); }
.insight-box.dark .insight-text { color: rgba(255,255,255,.8); }

/* ── Finding Card ───────────────────────────────────────────── */
.finding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.finding-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.finding-card.teal  { border-top-color: var(--teal); }
.finding-card.red   { border-top-color: var(--red); }
.finding-card.amber { border-top-color: var(--amber); }
.finding-card.purple{ border-top-color: var(--purple); }
.finding-num {
  font-family: 'BIZ UDPGothic', monospace;
  font-size: 36px; font-weight: 700; color: var(--blue);
  line-height: 1; margin-bottom: 8px;
}
.finding-card.teal  .finding-num { color: var(--teal); }
.finding-card.red   .finding-num { color: var(--red); }
.finding-card.purple .finding-num { color: var(--purple); }
.finding-num-unit { font-size: .45em; }
.finding-icon { font-size: 28px; margin-bottom: 8px; display: block; }
.finding-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.finding-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }

/* ── Stat Row ────────────────────────────────────────────────── */
.stat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.stat-row:last-child { border-bottom: none; }
.stat-rank {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.stat-rank.gold   { background: #FFF3CD; color: #856404; }
.stat-rank.silver { background: #F0F0F0; color: #555; }
.stat-rank.bronze { background: #FDE8D8; color: #7B3D10; }
.stat-name { font-size: 12px; color: var(--text); flex: 1; min-width: 0; }
.stat-bar-wrap { width: 140px; height: 8px; background: #EFF3F8; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.stat-bar-fill { height: 100%; background: var(--blue); border-radius: 4px; width: 0; transition: width 1.2s ease; }
.stat-bar-fill.red { background: var(--red); }
.stat-bar-fill.teal { background: var(--teal); }
.stat-pct { font-family: 'BIZ UDPGothic', monospace; font-size: 12px; font-weight: 700; color: var(--text); width: 60px; text-align: right; flex-shrink: 0; }

/* ── Callout Box ─────────────────────────────────────────────── */
.callout-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: #FAFBFF; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-top: 16px;
}
.callout-icon { font-size: 24px; flex-shrink: 0; }
.callout-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.callout-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }

/* ── Disability Type Legend Tags ──────────────────────────────── */
.dis-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 10px; border-radius: 100px;
  font-weight: 600; white-space: nowrap;
}
.dis-tag .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Summary Table ───────────────────────────────────────────── */
.summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.summary-table th {
  background: #F0F4F8; text-align: left;
  padding: 12px 16px; font-weight: 700; font-size: 12px;
  color: var(--text-muted); letter-spacing: .05em; border-bottom: 2px solid var(--border);
}
.summary-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.summary-table tr:last-child td { border-bottom: none; }
.summary-table tr:hover td { background: #F8FAFF; }
.summary-table td:first-child { font-weight: 600; color: var(--blue); white-space: nowrap; }

/* ── Policy Pillar ───────────────────────────────────────────── */
.pillar-card {
  display: flex; gap: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow);
}
.pillar-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 28px; font-weight: 900;
  color: var(--blue); flex-shrink: 0; width: 40px;
}
.pillar-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.pillar-body { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.pillar-body ul { padding-left: 18px; }
.pillar-body li { margin-bottom: 4px; }

/* ── Data Source ─────────────────────────────────────────────── */
.data-source {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  background: #F0F4F8; padding: 4px 10px; border-radius: 6px;
}
.data-source-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }

/* ── Comparison Block ───────────────────────────────────────── */
.compare-wrap {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-side {
  flex: 1; padding: 32px 28px; text-align: center;
}
.compare-side.adult { border-right: 1px solid var(--border); }
.compare-divider {
  width: 56px; background: #F0F4F8;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  flex-direction: column; gap: 6px;
}
.compare-big {
  font-family: 'BIZ UDPGothic', monospace;
  font-size: 48px; font-weight: 700; line-height: 1;
}
.compare-big.blue { color: var(--blue); }
.compare-big.amber { color: var(--amber); }
.compare-label { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.compare-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Note Warning Box ────────────────────────────────────────── */
.note-box {
  display: flex; gap: 14px;
  background: #FFFCEE; border: 1px solid #F0E0A0;
  border-left: 4px solid #F1C40F;
  border-radius: var(--radius); padding: 16px 20px;
}
.note-icon { font-size: 20px; flex-shrink: 0; }
.note-text { font-size: 12.5px; color: #5D4E10; line-height: 1.7; }

/* ── Footer ──────────────────────────────────────────────────── */
#footer {
  background: var(--navy); color: rgba(255,255,255,.7);
  padding: 40px 24px 28px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 40px; justify-content: space-between;
  flex-wrap: wrap; padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-info h3 { font-size: 14px; color: #fff; margin-bottom: 10px; font-family: 'Noto Serif JP', serif; }
.footer-info p, .footer-meta p { font-size: 12px; line-height: 1.9; }
.footer-credit {
  text-align: center; padding-top: 20px;
  font-size: 12px; color: rgba(255,255,255,.4);
}

/* ── Scroll Reveal ───────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── Legend Row ──────────────────────────────────────────────── */
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

/* ── Section Dark Override ───────────────────────────────────── */
.section-dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.section-dark .card-title { color: #fff; }
.section-dark .card-subtitle { color: rgba(255,255,255,.5); }
.section-dark .card-header { border-color: rgba(255,255,255,.1); }
.section-dark .callout-box { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
.section-dark .callout-title { color: #fff; }
.section-dark .callout-body { color: rgba(255,255,255,.6); }
.section-dark .summary-table th { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); border-color: rgba(255,255,255,.1); }
.section-dark .summary-table td { border-color: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.section-dark .summary-table tr:hover td { background: rgba(255,255,255,.04); }
.section-dark .summary-table td:first-child { color: var(--teal-light); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-kpis { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .compare-wrap { flex-direction: column; }
  .compare-side.adult { border-right: none; border-bottom: 1px solid var(--border); }
  .compare-divider { width: 100%; height: 40px; flex-direction: row; }
  .hero-title { font-size: 22px; }
}
@media (max-width: 480px) {
  .hero-kpis { grid-template-columns: 1fr; }
}
