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

/* ROOT / THEME */
:root {
  --bg:       #0f1117;
  --bg2:      #1a1d27;
  --bg3:      #22263a;
  --card:     #1e2235;
  --border:   #2a2f4a;
  --accent:   #4f8ef7;
  --accent2:  #6ee7b7;
  --text:     #e8eaf6;
  --text2:    #9aa0c0;
  --text3:    #5e6580;
  --danger:   #f87171;
  --radius:   12px;
  --radius-s: 8px;
  --nav-h:    56px;
}
body.light {
  --bg:      #f4f6fb;
  --bg2:     #ffffff;
  --bg3:     #eef0f8;
  --card:    #ffffff;
  --border:  #dde1f0;
  --accent:  #2f6fe8;
  --accent2: #059669;
  --text:    #1a1d27;
  --text2:   #6b7194;
  --text3:   #9aa0c0;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Hiragino Sans','Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.75;
  transition: background 0.25s, color 0.25s;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAV ===== */
nav {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  transition: background 0.25s, border-color 0.25s;
}
.nav-logo {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.875rem; color: var(--text2); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text2); padding: 5px 12px; border-radius: 20px;
  cursor: pointer; font-size: 0.8rem; font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.hamburger { display: none; background: none; border: none; color: var(--text2); font-size: 1.3rem; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 3.5rem;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,142,247,0.13) 0%, transparent 65%);
}
.hero-badge {
  display: inline-block;
  background: rgba(79,142,247,0.12);
  border: 1px solid rgba(79,142,247,0.3);
  color: var(--accent); font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 1rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--text2); font-size: 1rem; max-width: 520px; margin: 0 auto 2.2rem; }

/* ===== SEARCH ===== */
.search-wrap { max-width: 580px; margin: 0 auto; display: flex; gap: 8px; }
.search-wrap input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
  color: var(--text); font-size: 1rem; font-family: inherit; outline: none;
  transition: border-color 0.2s, background 0.25s;
}
.search-wrap input::placeholder { color: var(--text3); }
.search-wrap input:focus { border-color: var(--accent); }
.search-wrap button {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius); padding: 13px 24px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: opacity 0.2s;
}
.search-wrap button:hover { opacity: 0.85; }

/* ===== CHIPS ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 1.2rem; }
.chip {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); padding: 5px 14px; border-radius: 20px;
  font-size: 0.8rem; cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex; justify-content: center; gap: 3rem;
  padding: 1.6rem 1.5rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg2); margin: 2.5rem 0;
  transition: background 0.25s, border-color 0.25s;
}
.stat { text-align: center; }
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text2); margin-top: 2px; }

/* ===== MAIN WRAPPER ===== */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 0 1.5rem 5rem; }

/* ===== CARD ===== */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 14px;
  transition: background 0.25s, border-color 0.25s;
}
.card-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent2);
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.card-label::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  background: var(--accent2); border-radius: 2px;
}
.card-body { font-size: 0.95rem; color: var(--text); line-height: 1.85; }

/* ===== RESULT ===== */
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin-bottom: 1.4rem;
}
.result-title { font-size: 1.5rem; font-weight: 700; }
.wiki-btn {
  color: var(--accent); font-size: 0.85rem;
  border: 1px solid rgba(79,142,247,0.3);
  padding: 4px 12px; border-radius: 6px; transition: background 0.15s;
}
.wiki-btn:hover { background: rgba(79,142,247,0.1); text-decoration: none; }

.trivia-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.trivia-list li {
  font-size: 0.95rem; color: var(--text); line-height: 1.75;
  padding-left: 1.4em; position: relative;
}
.trivia-list li::before {
  content: '◆'; position: absolute; left: 0; font-size: 8px;
  color: var(--accent); top: 7px;
}

.related-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.related-chip {
  background: rgba(79,142,247,0.08); border: 1px solid rgba(79,142,247,0.25);
  color: var(--accent); padding: 6px 14px; border-radius: 20px;
  font-size: 0.85rem; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.related-chip:hover { background: rgba(79,142,247,0.18); }

.sections-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sections-list li {
  font-size: 0.9rem; color: var(--text2); padding-left: 1em; position: relative;
}
.sections-list li::before { content: '›'; position: absolute; left: 0; color: var(--accent2); }

/* ===== LOADING / ERROR ===== */
.loading { display: none; text-align: center; padding: 3rem; color: var(--text2); }
.spinner {
  width: 38px; height: 38px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-box {
  display: none; background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.3);
  border-radius: var(--radius); padding: 1rem 1.4rem;
  font-size: 0.9rem; color: var(--danger); margin-bottom: 1rem;
}

/* ===== FEATURES GRID ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 1.5rem 0; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem;
  transition: background 0.25s, border-color 0.25s;
}
.feature-icon { font-size: 1.6rem; margin-bottom: 10px; }
.feature-title { font-size: 0.92rem; font-weight: 600; margin-bottom: 6px; }
.feature-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.65; }

/* ===== PAGE HEADER (inner pages) ===== */
.page-hero {
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(79,142,247,0.1) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.page-hero h1 { font-size: clamp(1.6rem,4vw,2.4rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.6rem; }
.page-hero p { color: var(--text2); font-size: 0.95rem; max-width: 480px; margin: 0 auto; }

/* ===== ABOUT PAGE ===== */
.about-section { margin-bottom: 2.5rem; }
.about-section h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.about-section p { font-size: 0.95rem; color: var(--text2); line-height: 1.85; margin-bottom: 0.8rem; }
.company-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.company-table tr { border-bottom: 1px solid var(--border); }
.company-table th { width: 30%; text-align: left; padding: 0.8rem 0.5rem; color: var(--text2); font-weight: 500; }
.company-table td { padding: 0.8rem 0.5rem; color: var(--text); }

/* ===== SITEMAP ===== */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.5rem; }
.sitemap-group h3 { font-size: 0.85rem; font-weight: 600; color: var(--accent2); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.sitemap-group ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sitemap-group ul li a { font-size: 0.9rem; color: var(--text2); transition: color 0.15s; }
.sitemap-group ul li a:hover { color: var(--accent); text-decoration: none; }

/* ===== PRIVACY ===== */
.privacy-section { margin-bottom: 2rem; }
.privacy-section h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.7rem; }
.privacy-section p, .privacy-section li { font-size: 0.9rem; color: var(--text2); line-height: 1.85; }
.privacy-section ul { padding-left: 1.2em; margin-top: 0.5rem; }
.privacy-section ul li { margin-bottom: 4px; }

/* ===== HOW-TO ===== */
.steps { display: flex; flex-direction: column; gap: 14px; margin: 1.5rem 0; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 36px; height: 36px; background: var(--accent);
  color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.step-body h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.step-body p { font-size: 0.875rem; color: var(--text2); line-height: 1.7; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem; transition: background 0.25s, border-color 0.25s;
}
.footer-inner { max-width: 820px; margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand .logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.footer-brand .logo span { color: var(--accent); }
.footer-brand p { font-size: 0.8rem; color: var(--text2); margin-top: 6px; max-width: 220px; line-height: 1.6; }
.footer-nav h4 { font-size: 0.75rem; font-weight: 600; color: var(--text2); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-nav ul li a { font-size: 0.85rem; color: var(--text2); transition: color 0.15s; }
.footer-nav ul li a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.2rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text3); }

/* ===== RELATED SITES ===== */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 14px; margin: 1.5rem 0; }
.site-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem;
  transition: border-color 0.2s, background 0.25s;
}
.site-card:hover { border-color: var(--accent); }
.site-card .site-icon { font-size: 1.5rem; margin-bottom: 8px; }
.site-card .site-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.site-card .site-desc { font-size: 0.8rem; color: var(--text2); line-height: 1.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg2); border-bottom: 1px solid var(--border); padding: 1rem 1.5rem; gap: 1rem; }
  .hamburger { display: block; }
  .stats-bar { gap: 1.5rem; }
  .stat-num { font-size: 1.2rem; }
  .footer-top { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
}
