/* ============================================================
   型15 塗装・建物改修の専門店 ／ 方向B「顔が見える安心型」
   2026-08-20 新規作成。型3（暮らしの情景型）からの流用は無し。
   見た目の言語をはっきり分けている:
     型3  … 明朝見出し／角2px／影なし／罫線で仕切る／写真が主役
     型15 … 太ゴシック見出し／角10px／やわらかい影／丸い顔写真／文章が主役
   既知バグの回避:
     KB-001 ヒーローの文字は絶対配置にしない
     KB-002 モバイルの右寄せは .header-actions 側に持たせる
     KB-010 最小フォントは 12px（0.75rem）
     KB-011 メニューを開いている間は body を固定
     KB-013 表は .table-wrap で横スクロール。内側に overflow:hidden を置かない
     KB-014 380px 以下で電話を畳み、ハンバーガーを画面内に収める
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-warm: #fbf7f2;
  --ink: #1c2430;
  --ink-soft: #5b6675;
  --line: #dfe4ea;
  --accent: #1d6b4f;
  --accent-dark: #134a36;
  --accent-tint: #e8f2ee;
  --warn: #c1521c;
  --sans: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --shadow: 0 2px 4px rgba(28,36,48,.05), 0 8px 24px rgba(28,36,48,.07);
  --radius: 10px;
  --wrap: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.95;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.5; margin: 0; font-weight: 800; letter-spacing: .01em; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: .45em; }
strong { color: var(--accent-dark); }

.inner { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }

/* ---------- デモである旨の帯 ---------- */
.demo-bar {
  background: #1c2430; color: #dde3ea;
  font-size: 0.8125rem; line-height: 1.7; padding: .55rem 0;
}
.demo-bar .inner { display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.demo-bar a { color: #8fc3f0; }

/* ---------- ヘッダー ---------- */
.header { position: sticky; top: 0; z-index: 40; background: #fff; box-shadow: 0 1px 0 var(--line); }
.header-inner {
  width: min(100% - 1.6rem, 1260px); margin-inline: auto;
  display: flex; align-items: center; gap: 1rem; min-height: 60px;
}
.brand { display: block; text-decoration: none; color: inherit; padding: .5rem 0; min-width: 0; flex-shrink: 1; }
.brand .name { display: block; font-weight: 800; font-size: 1.05rem; }
.brand small { display: block; font-size: 0.75rem; color: var(--ink-soft); line-height: 1.5; font-weight: 500; }

.gnav ul { display: flex; gap: 1.3rem; list-style: none; margin: 0; padding: 0; }
.gnav a {
  display: block; text-decoration: none; color: var(--ink);
  font-size: 0.9375rem; font-weight: 700; padding: .55rem 0; position: relative;
}
.gnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--accent); border-radius: 2px; transform: scaleX(0); transition: transform .18s;
}
.gnav a:hover::after, .gnav a[aria-current="page"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: .7rem; margin-left: auto; }
.tel-link { text-decoration: none; color: var(--ink); text-align: right; line-height: 1.25; }
.tel-link b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--accent-dark); }
.tel-link small { display: block; font-size: 0.75rem; color: var(--ink-soft); }
.btn-head {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-size: 0.875rem; font-weight: 800; padding: .7rem 1.15rem; border-radius: 999px; white-space: nowrap;
  box-shadow: var(--shadow);
}
.btn-head:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none; width: 44px; height: 44px; flex: 0 0 44px; padding: 0;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; position: relative;
}
.nav-toggle::before, .nav-toggle::after, .nav-toggle span {
  content: ""; position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s;
}
.nav-toggle::before { top: 15px; }
.nav-toggle span { top: 21px; }
.nav-toggle::after { top: 27px; }
.nav-toggle[aria-expanded="true"]::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- ヒーロー（KB-001: 絶対配置なし） ---------- */
.hero { background: var(--accent-dark); color: #fff; }
.hero-grid {
  width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.6rem; align-items: center;
  padding: 3.6rem 0;
}
.hero h1 { font-size: clamp(1.6rem, 4.6vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: #ffd28a; }
.hero p.sub { font-size: 1.0625rem; margin-bottom: 1.7rem; color: #dce6f0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-media img, .hero-media .ph { border-radius: var(--radius); }
.hero-media .ph {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(255,255,255,.12); color: #dce6f0; font-size: 0.8125rem; padding: 1rem;
}

.btn {
  display: inline-block; text-decoration: none; font-weight: 800; font-size: 1rem;
  padding: .95rem 1.8rem; border-radius: 999px; border: 2px solid transparent; line-height: 1.4;
}
.btn-primary { background: #fff; color: var(--accent-dark); border-color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-tint); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-line { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow); }
.btn-line:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ---------- 数字の帯 ---------- */
.stats { background: var(--bg-warm); }
.stats .inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.4rem; padding: 2rem 0; }
.stat { text-align: center; }
.stat dt { font-size: 0.8125rem; color: var(--ink-soft); font-weight: 700; letter-spacing: .06em; }
.stat dd { margin: .2rem 0 0; font-size: 1.5rem; font-weight: 800; color: var(--accent-dark); line-height: 1.4; }
.stat dd small { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--ink-soft); }

/* ---------- セクション ---------- */
.section { padding: 4.4rem 0; }
.section.soft { background: var(--bg-soft); }
.section.warm { background: var(--bg-warm); }
.section.dark { background: var(--accent-dark); color: #fff; }
.section.dark .section-head h2, .section.dark h3 { color: #fff; }
.section.dark .section-head p, .section.dark p { color: #dce6f0; }

.section-head { margin-bottom: 2.4rem; }
.section-head .eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: .14em;
  color: var(--accent); background: var(--accent-tint); padding: .3rem .8rem; border-radius: 999px; margin-bottom: .8rem;
}
.section-head h2 { font-size: clamp(1.35rem, 3.6vw, 1.95rem); border-left: 6px solid var(--accent); padding-left: .9rem; }
.section-head p { margin: 1rem 0 0; color: var(--ink-soft); max-width: 48em; }

/* ---------- 顔（方向Bの核） ---------- */
.person { display: grid; grid-template-columns: 220px 1fr; gap: 2.2rem; align-items: start; }
.person + .person { margin-top: 3rem; }
.person-photo { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow); }
.person-photo .ph, .person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 0.75rem; color: var(--ink-soft); padding: 1.2rem; line-height: 1.7;
}
.person-name { font-size: 1.2rem; margin-bottom: .2rem; }
.person-role { font-size: 0.8125rem; color: var(--ink-soft); font-weight: 700; margin-bottom: 1rem; display: block; }

/* ---------- 症状カード ---------- */
.symptoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.symptom { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.symptom .pic, .symptom img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.symptom .pic {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #eceff3, #e2e7ee); color: var(--ink-soft); font-size: 0.8125rem; padding: 1rem;
}
.symptom-body { padding: 1.1rem 1.25rem 1.4rem; }
.symptom-body h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.symptom-body p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0 0 .7rem; }
.verdict { display: inline-block; font-size: 0.8125rem; font-weight: 800; padding: .25rem .75rem; border-radius: 999px; }
.verdict.now { background: #fdecdf; color: var(--warn); }
.verdict.soon { background: #fdf6dd; color: #8a6a12; }
.verdict.ok { background: var(--accent-tint); color: var(--accent-dark); }

/* ---------- カード ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.7rem 1.6rem; }
.card h3 { font-size: 1.1rem; margin-bottom: .7rem; color: var(--accent-dark); }
.card p:last-child { margin-bottom: 0; }
.card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 0.875rem; font-weight: 800; margin-bottom: .8rem;
}

/* ---------- 交互の説明 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: center; }
.split + .split { margin-top: 3.4rem; }
.split.rev .split-text { order: 2; }
.split-media img, .split-media .ph { border-radius: var(--radius); width: 100%; }
.split-media .ph {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(135deg, #eceff3, #e2e7ee); color: var(--ink-soft); font-size: 0.8125rem; padding: 1rem;
}
.split-text h3 { font-size: 1.35rem; margin-bottom: .8rem; }

/* ---------- 一覧 ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.tiles li { margin: 0; }
.tiles span {
  display: block; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.1rem; font-weight: 700;
}
.tiles small { display: block; font-weight: 500; font-size: 0.8125rem; color: var(--ink-soft); }

/* ---------- 流れ ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 1rem; }
.steps li {
  counter-increment: st; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem 1.3rem 4.2rem; position: relative;
}
.steps li::before {
  content: "STEP " counter(st); position: absolute; left: 1.4rem; top: 1.45rem;
  writing-mode: vertical-rl; font-size: 0.6875rem; font-weight: 800; color: var(--accent); letter-spacing: .12em;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }

/* ---------- 表（KB-013） ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 0.9375rem; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid var(--line); padding: .85rem 1.1rem; text-align: left; vertical-align: top; }
.table-wrap th { background: var(--bg-soft); font-weight: 800; white-space: nowrap; width: 12em; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.table-note { font-size: 0.8125rem; color: var(--ink-soft); margin: .7rem 0 0; }

/* ---------- 声 ---------- */
.voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.voice { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; }
.voice p { font-size: 0.9375rem; }
.voice .who { font-size: 0.8125rem; color: var(--ink-soft); font-weight: 700; margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 800; padding: 1.15rem 1.4rem; list-style: none; font-size: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q."; color: var(--accent); margin-right: .6rem; }
.faq .a { padding: 0 1.4rem 1.3rem; color: var(--ink-soft); font-size: 0.9375rem; }

/* ---------- 注記 ---------- */
.note {
  background: #fffbf3; border: 1px solid #eddcbb; border-radius: var(--radius);
  padding: 1.2rem 1.4rem; font-size: 0.9375rem;
}
.note h3 { font-size: 1rem; margin-bottom: .5rem; color: var(--warn); }
.note p:last-child, .note ul:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: #fff; text-align: center; }
.cta .inner { padding: 3.8rem 0; }
.cta h2 { font-size: clamp(1.35rem, 4vw, 1.95rem); margin-bottom: .9rem; }
.cta p { max-width: 42em; margin-inline: auto; color: #e4eef7; }
.cta .hero-cta { justify-content: center; margin-top: 1.7rem; }

/* ---------- フォーム ---------- */
.form { display: grid; gap: 1.2rem; max-width: 660px; }
.field label { display: block; font-weight: 800; font-size: 0.9375rem; margin-bottom: .35rem; }
.field .req { font-size: 0.75rem; background: var(--warn); color: #fff; padding: .1rem .5rem; border-radius: 999px; margin-left: .5rem; vertical-align: 2px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .8rem .9rem;
  border: 1px solid #c3cbd5; border-radius: 8px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 8.5em; }
.form-note { font-size: 0.8125rem; color: var(--ink-soft); }

/* ---------- フッター ---------- */
.footer { background: #1c2430; color: #ccd5e0; padding: 3rem 0 1.6rem; font-size: 0.9375rem; }
.footer a { color: #ccd5e0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.footer h3 { font-size: 1.05rem; margin-bottom: .6rem; color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer-bottom { border-top: 1px solid #313b49; margin-top: 2.4rem; padding-top: 1.2rem; font-size: 0.75rem; color: #93a0b0; }

.sp-bar { display: none; }

/* ============================================================ */
@media (max-width: 1040px) {
  .gnav {
    position: fixed; inset: 60px 0 auto 0; height: calc(100dvh - 60px);
    background: #fff; padding: 1.2rem 1.2rem 6rem; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
    box-shadow: 0 8px 24px rgba(28,36,48,.12);
  }
  .gnav.open { opacity: 1; visibility: visible; }
  .gnav ul { flex-direction: column; gap: 0; }
  .gnav a { padding: .95rem .2rem; border-bottom: 1px solid var(--line); font-size: 1.0625rem; }
  .gnav a::after { display: none; }
  /* KB-002: .gnav が fixed になり margin-left:auto が効かないため、右寄せはここに持たせる */
  .header-actions { margin-left: auto; }
  .nav-toggle { display: block; }
  .btn-head { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.8rem; padding: 2.8rem 0; }
  .split { grid-template-columns: 1fr; gap: 1.4rem; }
  .split.rev .split-text { order: 0; }
  .person { grid-template-columns: 150px 1fr; gap: 1.4rem; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.9; }
  .inner, .hero-grid { width: calc(100% - 2rem); }
  .section { padding: 3rem 0; }
  .brand .name { font-size: 0.9375rem; }
  .brand small { display: none; }
  .tel-link b { font-size: 1.1rem; }
  .tel-link small { display: none; }
  .person { grid-template-columns: 1fr; }
  .person-photo { width: 150px; }
  .sp-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; box-shadow: 0 -1px 0 var(--line); }
  .sp-bar a { flex: 1; text-align: center; text-decoration: none; font-weight: 800; font-size: 0.9375rem; padding: .95rem .4rem; color: var(--accent-dark); }
  .sp-bar a + a { background: var(--accent); color: #fff; }
  body { padding-bottom: 3.6rem; }
  .footer { padding-bottom: 4.6rem; }
}

/* KB-014: 380px でハンバーガーが画面外へ出ないよう、電話を畳む */
@media (max-width: 380px) {
  .header-inner { gap: .5rem; }
  .tel-link { display: none; }
  .brand .name { font-size: 0.875rem; }
}

body.nav-open { overflow: hidden; }

/* grid / flex の子は既定が min-width:auto なので、中に置いた表（.table-wrap の
   min-width:480px）が親を押し広げ、ページ全体が横にはみ出す。
   表を横スクロールにする改修の巻き添えで起きるやつ（layout-check の「ページ横はみ出し」）。 */
.feature, .feature-text, .feature-media,
.split, .split-text, .split-media,
.cards, .card, .works, .work-card, .goods, .good,
.symptoms, .symptom, .cases, .case, .ba-set, .ba,
.reasons, .reason, .shops, .shop, .voices, .voice,
.menu-list, .tiles, .steps, .flow, .form, .field { min-width: 0; }
