/* ============================================
   注文住宅選びの教科書【東京】 - style.css
   Design: design-home SKILL（木目×コンクリートグレー）
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* ベースカラー */
  --bg-page: #f7f5f2;
  --bg-warm: #f0ece7;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f5f2ed;
  --bg-hover: #ebe7e1;

  /* テキスト */
  --text-primary: #2c2c2c;
  --text-secondary: #5a5652;
  --text-muted: #9b9590;

  /* アクセント */
  --accent: #6b7b3a;
  --accent-light: #7d8e4a;
  --accent-dim: rgba(107,123,58,0.08);
  --wood: #8b6f47;
  --wood-dim: rgba(139,111,71,0.10);
  --concrete: #7a7d82;
  --concrete-dim: rgba(122,125,130,0.10);
  --positive: #3d8b6e;
  --positive-dim: rgba(61,139,110,0.10);
  --caution: #c4873a;

  /* ボーダー・シャドウ */
  --border: #ddd8d2;
  --border-light: #e8e4de;
  --shadow-sm: 0 1px 4px rgba(44,44,44,0.06);
  --shadow: 0 4px 20px rgba(44,44,44,0.08);
  --shadow-lg: 0 8px 30px rgba(44,44,44,0.10);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 2.0;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247,245,242,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: 60px;
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.site-logo span { color: var(--accent); }
.site-logo:hover { color: var(--text-primary); }

.header-nav { display: flex; gap: 20px; }
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.header-nav a:hover { color: var(--accent); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(247,245,242,0.98);
  backdrop-filter: blur(12px);
  z-index: 99;
  padding: 30px 20px;
  overflow-y: auto;
}
.mobile-nav.active { display: block; }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}
.mobile-nav a:hover { color: var(--accent); }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--bg-warm) 0%, var(--bg-page) 100%);
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.hero-label {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 16px;
}
.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.hero-lead {
  font-size: 16px;
  line-height: 2.0;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* --- Section --- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-warm); }

.section-label {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section h2 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
}
.section-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 2.0;
  margin-bottom: 30px;
}

/* --- Cards --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 24px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(107,123,58,0.3);
}

/* Company Card */
.company-card { position: relative; }
.company-card .company-number {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 4px;
}
.company-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  padding-top: 8px;
}
.company-card h3 a { color: var(--text-primary); }
.company-card h3 a:hover { color: var(--accent); }
.company-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.type-hm {
  background: var(--concrete-dim);
  color: var(--concrete);
}
.type-km {
  background: var(--wood-dim);
  color: var(--wood);
}
.company-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}

.company-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.spec-item {
  background: var(--bg-surface-alt);
  border-radius: 8px;
  padding: 12px 14px;
}
.spec-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.spec-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.company-reviews { margin-top: 16px; }
.review-row {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}
.review-good, .review-bad {
  flex: 1;
  font-size: 14px;
  line-height: 1.8;
  padding: 12px 14px;
  border-radius: 8px;
}
.review-good {
  background: var(--positive-dim);
  border-left: 3px solid var(--positive);
}
.review-bad {
  background: var(--concrete-dim);
  border-left: 3px solid var(--concrete);
}
.review-good .review-label { color: var(--positive); font-weight: 600; font-size: 12px; }
.review-bad .review-label { color: var(--concrete); font-weight: 600; font-size: 12px; }

.company-capture {
  margin-top: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.company-capture img { width: 100%; }

/* --- Comparison Table --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 30px 0;
}
.comparison-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  font-size: 14px;
}
.comparison-table thead th {
  background: var(--bg-warm);
  font-weight: 700;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.comparison-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.comparison-table tbody tr:hover { background: var(--bg-hover); }

.item-cell {
  font-weight: 700;
  font-size: 15px;
  min-width: 140px;
}
.item-cell a { color: var(--text-primary); }
.item-cell a:hover { color: var(--accent); }

.price-cell { font-weight: 700; color: var(--wood); white-space: nowrap; }

/* --- Section Image --- */
.section-image {
  margin: 40px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.section-image img { width: 100%; }

/* --- Tags --- */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  margin: 2px 4px 2px 0;
}
.tag-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(107,123,58,0.2);
}

/* --- Feature Box --- */
.feature-box {
  background: linear-gradient(135deg, var(--accent-dim), var(--wood-dim));
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 30px 0;
}

/* --- FAQ --- */
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.faq-question {
  font-size: 18px;
  font-weight: 700;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question::after {
  content: '+';
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.3s;
}
.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  display: none;
  padding: 0 24px 20px;
  font-size: 16px;
  line-height: 2.0;
  color: var(--text-secondary);
}
.faq-item.active .faq-answer { display: block; }

/* --- Related Articles --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.article-card .article-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wood);
  margin-bottom: 8px;
}
.article-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 8px;
}
.article-card h3 a { color: var(--text-primary); }
.article-card h3 a:hover { color: var(--accent); }
.article-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* --- Footer --- */
.site-footer {
  background: #3a3835;
  padding: 40px 0;
  color: #b0aba5;
  font-size: 14px;
}
.site-footer a { color: #b0aba5; }
.site-footer a:hover { color: #fff; }
.footer-nav {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 12px;
  color: #807a74;
}

/* --- Scroll Hint --- */
.scroll-hint {
  display: none;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* --- Article: TOC Box --- */
.toc-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.toc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.toc-list {
  padding-left: 20px;
  margin: 0;
}
.toc-list li {
  font-size: 15px;
  line-height: 2.2;
  color: var(--text-secondary);
}
.toc-list li a { color: var(--text-secondary); }
.toc-list li a:hover { color: var(--accent); }

/* --- Article: Regret Case --- */
.regret-case {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--caution);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.regret-case-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--caution);
  margin-bottom: 10px;
}
.regret-case ul {
  list-style: none;
  padding: 0;
}
.regret-case li {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.regret-case li:last-child { border-bottom: none; }
.regret-case li strong { color: var(--text-primary); }

/* --- Article: Checklist --- */
.checklist-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.checklist-group h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}
.checklist {
  list-style: none;
  padding: 0;
}
.checklist li {
  font-size: 15px;
  line-height: 2.0;
  color: var(--text-secondary);
  padding-left: 28px;
  position: relative;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--bg-surface);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .hero h1 { font-size: 24px; }
  .section h2 { font-size: 21px; }
  .company-card h3 { font-size: 18px; }
  .faq-question { font-size: 16px; }

  .header-nav { display: none; }
  .hamburger { display: flex; }

  .review-row { flex-direction: column; gap: 10px; }

  .company-specs {
    grid-template-columns: 1fr 1fr;
  }

  .scroll-hint { display: block; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero { padding: 40px 0 35px; }
  .hero h1 { font-size: 21px; }
  .section h2 { font-size: 19px; }
  .section { padding: 40px 0; }
  .company-card h3 { font-size: 17px; }
  .card { padding: 20px; }
  .spec-value { font-size: 14px; }

  /* Table → Card */
  .comparison-table { min-width: auto; }
  .comparison-table thead { display: none; }
  .comparison-table tbody tr {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
  }
  .comparison-table tbody td {
    display: block;
    border: none;
    padding: 4px 0;
    font-size: 14px;
  }
  .comparison-table tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
  }
  .item-cell::before { display: none !important; }
  .item-cell {
    font-size: 17px;
    color: var(--accent);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
  }

  .article-grid { grid-template-columns: 1fr; }

  .company-specs {
    grid-template-columns: 1fr;
  }
}
