/* =============================================
   cocokaji — style.css
   株式会社ヒューマニティドットジャパン
   ============================================= */

:root {
  --bg: #0f1117;
  --bg2: #181c27;
  --bg3: #1e2336;
  --card: #1e2336;
  --border: #2a3050;
  --text: #e8eaf0;
  --text2: #9ba3bf;
  --text3: #6b7494;
  --accent: #ff4b2b;
  --accent2: #ff8c42;
  --accent-glow: rgba(255,75,43,0.25);
  --link: #ff8c42;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

body.light {
  --bg: #f5f5f7;
  --bg2: #ffffff;
  --bg3: #ebebef;
  --card: #ffffff;
  --border: #d8dae6;
  --text: #1a1a2e;
  --text2: #4a4f6a;
  --text3: #8a8faa;
  --accent: #e63f1f;
  --accent2: #e07830;
  --accent-glow: rgba(230,63,31,0.15);
  --link: #c96a20;
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--link); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav a {
  color: var(--text2);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--accent); }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: auto;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 20px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.theme-toggle:hover { border-color: var(--accent); }

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}

.nav-mobile a {
  color: var(--text);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.nav-mobile.open { display: flex; }

/* ---- Hero ---- */
.hero {
  padding: 80px 20px 60px;
  text-align: center;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg3) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text2);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
  display: inline-block;
}

.btn:hover { transform: translateY(-2px); opacity: 0.9; }

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent2);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text3);
}

/* ---- Section ---- */
.section {
  padding: 60px 20px;
}

.section-dark {
  background: var(--bg2);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
}

/* ---- Live Panel ---- */
.live-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  min-height: 120px;
}

.loading-spinner {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text3);
  padding: 40px;
  font-size: 1rem;
}

.fire-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.fire-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.fire-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.fire-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s infinite;
  flex-shrink: 0;
}

.fire-card-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.fire-card-detail {
  color: var(--text2);
  font-size: 0.82rem;
  line-height: 1.6;
}

.fire-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 6px;
}

.badge-high { background: rgba(255,75,43,0.2); color: #ff4b2b; }
.badge-medium { background: rgba(255,140,66,0.2); color: #ff8c42; }
.badge-low { background: rgba(100,120,200,0.2); color: #8899cc; }

.data-note {
  text-align: center;
  color: var(--text3);
  font-size: 0.8rem;
  margin-top: 20px;
}

/* ---- Mini Map ---- */
.mini-map {
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-note {
  text-align: center;
  color: var(--text3);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* ---- Features Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text2);
  font-size: 0.87rem;
}

/* ---- Content Grid ---- */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.content-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: block;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}

.content-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  color: var(--text);
}

.content-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.content-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.content-card p {
  color: var(--text2);
  font-size: 0.87rem;
  margin-bottom: 12px;
}

.content-link {
  color: var(--accent2);
  font-size: 0.87rem;
  font-weight: 600;
}

/* ---- AdSense ---- */
.adsense-area {
  padding: 20px;
  background: var(--bg);
}

.adsense-placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text3);
  font-size: 0.8rem;
}

/* ---- Footer ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 20px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.footer-desc {
  color: var(--text3);
  font-size: 0.85rem;
}

.footer-links h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

.footer-links a {
  display: block;
  color: var(--text3);
  font-size: 0.85rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text3);
  font-size: 0.82rem;
  line-height: 1.8;
}

.footer-bottom a { color: var(--text3); }
.footer-bottom a:hover { color: var(--accent); }

/* ---- Map page ---- */
.full-map {
  height: calc(100vh - 60px);
  width: 100%;
}

.map-sidebar {
  position: fixed;
  top: 60px;
  right: 0;
  width: 320px;
  height: calc(100vh - 60px);
  background: var(--bg2);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 20px;
  z-index: 900;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sidebar-item:hover { border-color: var(--accent); }

.sidebar-item .si-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.sidebar-item .si-detail {
  color: var(--text3);
  line-height: 1.5;
}

/* ---- Popup ---- */
.leaflet-popup-content-wrapper {
  background: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-popup-tip {
  background: var(--card) !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav { display: none; }
  .hamburger { display: block; }

  .hero { padding: 60px 20px 40px; }

  .hero-stats { gap: 24px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .map-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
