/*
Theme Name: しずかナビ
Theme URI: https://shizuka-navi.com
Author: Shizuka Navi Team
Description: 中古マンション リアル騒音マップ「しずかナビ」専用テーマ
Version: 1.0.0
License: GNU General Public License v2
Text Domain: shizuka-navi
*/

/* ===== リセット & 基本 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f8faff;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(79,70,229,0.08);
  --shadow-lg: 0 8px 40px rgba(79,70,229,0.14);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

/* ===== ヘッダー ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.site-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.site-logo .logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
  margin-top: -2px;
}

/* 検索バー */
.header-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  font-size: 14px;
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.header-search .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== ヒーローセクション ===== */
.hero {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #fff;
  padding: 56px 20px 48px;
  text-align: center;
  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.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 14px;
  letter-spacing: -1px;
}
.hero p {
  font-size: clamp(14px, 2vw, 16px);
  opacity: 0.9;
  margin-bottom: 28px;
  line-height: 1.8;
}

/* 検索ボックス（ヒーロー内） */
.hero-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto 24px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 99px;
  padding: 6px 6px 6px 20px;
}
.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.7); }
.hero-search button {
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 99px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}
.hero-search button:hover {
  background: #f0f4ff;
  transform: translateY(-1px);
}

/* 統計 */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  font-size: 24px;
  font-weight: 900;
  display: block;
}
.hero-stat .label {
  font-size: 11px;
  opacity: 0.8;
}

/* ===== マップセクション ===== */
.map-section {
  padding: 0;
}
.map-controls {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.map-controls-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f4ff;
}
.filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

#noise-map {
  width: 100%;
  height: 70vh;
  min-height: 480px;
  z-index: 1;
}

/* ===== データカード（マップ上のポップアップ） ===== */
.noise-popup { min-width: 220px; }
.noise-popup h3 { font-size: 14px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.noise-score-ring {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.score-circle {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}
.score-circle .db { font-size: 16px; line-height: 1; }
.score-circle .unit { font-size: 9px; opacity: 0.85; }
.score-details { font-size: 11px; color: var(--text-muted); line-height: 1.8; }
.noise-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 4px;
  margin-bottom: 4px;
}

/* ===== 特徴セクション ===== */
.features-section {
  padding: 64px 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-badge {
  display: inline-block;
  background: #ede9fe;
  color: var(--primary);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 560px;
  margin: 0 auto;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.8; }

/* ===== データ層バッジ ===== */
.data-layers {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
  padding: 56px 20px;
}
.data-layers .section-badge { background: rgba(129,140,248,0.2); color: var(--primary-light); }
.data-layers .section-title { color: #fff; }
.data-layers .section-desc { color: rgba(255,255,255,0.6); }
.layers-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.layer-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.layer-num {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 15px;
  flex-shrink: 0;
}
.layer-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.layer-info p { font-size: 12px; color: rgba(255,255,255,0.6); }
.layer-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ===== 投稿CTAセクション ===== */
.cta-section {
  padding: 56px 20px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cta-inner {
  max-width: 600px;
  margin: 0 auto;
}
.cta-icon { font-size: 48px; margin-bottom: 16px; }
.cta-section h2 { font-size: 26px; font-weight: 900; margin-bottom: 12px; }
.cta-section p { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; line-height: 1.8; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-lg { padding: 14px 32px; font-size: 15px; }

/* ===== フッター ===== */
.site-footer {
  background: #0f172a;
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .site-logo { color: #fff; }
.footer-brand p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 10px;
  max-width: 300px;
  line-height: 1.8;
}
.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

/* ===== ノイズスコアカラー ===== */
.score-safe { background: #10b981; }      /* 〜45dB 静か */
.score-normal { background: #f59e0b; }    /* 46〜55dB 普通 */
.score-noisy { background: #f97316; }     /* 56〜65dB やや騒音 */
.score-loud { background: #ef4444; }      /* 66dB〜 騒音あり */

.tag-road { background: #fee2e2; color: #dc2626; }
.tag-train { background: #fef3c7; color: #d97706; }
.tag-neighbor { background: #ede9fe; color: #7c3aed; }
.tag-gov { background: #dcfce7; color: #16a34a; }
.tag-ai { background: #dbeafe; color: #2563eb; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .header-search { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; gap: 12px; }
  .hero-stats { gap: 20px; }
  #noise-map { height: 55vh; }
}
