/* 街のテーマ（2026-11-03 リニューアル3案「街のイラスト」寄せ）
   対象はトップとヘッダーメニュー直下の5ページだけ（build/inject_town_theme.py が付与）。
   body.town-theme の中だけに効かせ、他ページの見た目には影響させない。
   色は共通CSSのトークン（--accent #18aee2 など）をそのまま使う。 */

body.town-theme {
  background: #fff;
}

.town-theme .site-header {
  background: rgba(242, 251, 255, 0.9);
}

/* 見出しは行間を広げ、やわらかい印象に */
.town-theme h1,
.town-theme h2 {
  line-height: 1.5;
  font-weight: 800;
  text-wrap: balance;
}

.town-theme h3 {
  font-weight: 800;
}

/* 日本語の見出しを文節で折り返す（「暮ら/し」のような泣き別れを防ぐ。非対応ブラウザは従来どおり） */
.town-theme h1,
.town-theme h2,
.town-theme .hero-panel__top strong {
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

.town-theme .eyebrow {
  letter-spacing: 0.14em;
  font-size: 12px;
}

.town-theme .section {
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.town-theme .section--compact {
  padding-top: 0;
  padding-bottom: 24px;
}

.town-theme .section--muted {
  background: #f2fafc;
}

/* ===== ヒーロー：街のイラストの空に文字を置く ===== */
.town-theme .home-hero {
  position: relative;
  display: block;
  min-height: clamp(640px, 56vw, 820px);
  padding: clamp(40px, 5vw, 64px) clamp(20px, 6vw, 96px) 0;
  background: #e8f7fb;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.town-theme .home-hero__art {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.town-theme .home-hero__content {
  max-width: 820px;
  margin: 0 auto;
}

.town-theme .home-hero__catch {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.town-theme .home-hero h1 {
  max-width: none;
  margin: 0 auto 14px;
  color: #08354b;
  font-size: clamp(34px, 5.2vw, 64px);
  line-height: 1.4;
}

.town-theme .home-hero .eyebrow {
  margin-bottom: 14px;
  color: #08354b;
  text-transform: none;
  letter-spacing: 0.06em;
}

.town-theme .home-hero .lead {
  max-width: 640px;
  margin: 0 auto;
  color: #24506a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.9;
}

.town-theme .home-hero .actions {
  justify-content: center;
  margin-top: 24px;
}

.town-theme .home-hero .button--secondary {
  background: rgba(255, 255, 255, 0.85);
}

.town-theme .hero-points {
  justify-content: center;
  margin-top: 18px;
}

.town-theme .hero-points span {
  background: rgba(255, 255, 255, 0.85);
}

/* ===== 3つの入口（イラスト付きカード） ===== */
.town-theme .town-paths__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 36px;
}

.town-theme .town-paths__head h2 {
  margin: 0;
  flex-shrink: 0;
}

.town-theme .town-paths__head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.town-theme .town-paths__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.town-theme .town-paths__grid a {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.town-theme .town-paths__grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1100 / 709;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 16px;
  transition: transform 0.2s ease;
}

.town-theme .town-paths__grid a:hover img {
  transform: translateY(-3px);
}

.town-theme .town-paths__grid h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.town-theme .town-paths__grid p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.town-theme .town-paths__grid span {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* 相談例は横長の帯にして入口の下に置く */
.town-theme .hero-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) 2.4fr;
  gap: 20px;
  align-items: center;
  margin-top: clamp(40px, 5vw, 64px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #eef9fc;
  box-shadow: none;
}

.town-theme .hero-panel::before {
  display: none;
}

.town-theme .hero-panel__top {
  border-radius: 14px;
}

.town-theme .hero-panel__top strong {
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.5;
}

.town-theme .task-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
}

.town-theme .task-list div {
  align-items: flex-start;
  height: 100%;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
  line-height: 1.6;
}

.town-theme .task-list span {
  flex-shrink: 0;
  margin-top: 7px;
}

/* ===== 既存ブロックを3案の調子に寄せる ===== */
.town-theme .pain-grid p,
.town-theme .komari-card,
.town-theme .case-grid article,
.town-theme .news-grid .news-card {
  border-radius: 16px;
  box-shadow: none;
}

.town-theme .komari-card:hover,
.town-theme .news-card:hover {
  box-shadow: 0 14px 34px rgba(16, 63, 92, 0.1);
}

.town-theme .button {
  box-shadow: none;
}

/* FAQ前の区切りイラスト */
.town-theme .town-river {
  display: block;
  width: 100%;
  height: clamp(150px, 18vw, 260px);
  object-fit: cover;
}

@media (max-width: 980px) {
  .town-theme .town-paths__head {
    display: block;
  }

  .town-theme .town-paths__head h2 {
    margin-bottom: 14px;
  }

  .town-theme .hero-panel {
    grid-template-columns: 1fr;
  }

  .town-theme .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .town-theme .home-hero {
    min-height: 680px;
    padding-top: 32px;
  }

  .town-theme .home-hero__art {
    object-position: 30% bottom;
  }

  .town-theme .home-hero h1 {
    font-size: 30px;
  }

  .town-theme .home-hero .lead {
    font-size: 13px;
  }

  .town-theme .home-hero .actions {
    flex-direction: column;
    align-items: center;
  }

  .town-theme .home-hero .actions .button {
    width: min(100%, 300px);
  }

  .town-theme .hero-points span {
    font-size: 11px;
    padding: 6px 10px;
  }

  .town-theme .town-paths__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* スマホは画像を左・文字を右の横並びにして縦に長くしない */
  .town-theme .town-paths__grid a {
    display: grid;
    grid-template-columns: 42% 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 14px;
    align-items: start;
  }

  .town-theme .town-paths__grid img {
    grid-row: 1 / 4;
    margin: 0;
    border-radius: 12px;
  }

  .town-theme .town-paths__grid h3 {
    font-size: 16px;
    line-height: 1.45;
  }

  .town-theme .town-paths__grid p {
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.6;
  }

  .town-theme .town-paths__grid span {
    font-size: 12px;
  }

  .town-theme .task-list {
    grid-template-columns: 1fr;
  }
}

/* ===== 下層ページ（AIコンサル・個人・AI研修・活用事例）の見出し帯 ===== */
.town-theme .hero--sub {
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  gap: clamp(28px, 4vw, 56px);
  min-height: 0;
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
  background: #eef9fc;
}

.town-theme .hero--sub h1 {
  font-size: clamp(28px, 3.4vw, 42px);
}

.town-theme .hero--sub .lead {
  color: #24506a;
  font-weight: 600;
}

.town-theme .town-sub__art {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* ブログ一覧: 見出しの上に細い街並みの帯 */
.town-theme .town-strip {
  display: block;
  width: 100%;
  height: clamp(110px, 12vw, 180px);
  object-fit: cover;
  object-position: center 70%;
}

/* 一覧系のカードも角丸・影なしで揃える */
.town-theme .card,
.town-theme .case-link,
.town-theme .service-card {
  border-radius: 16px;
  box-shadow: none;
}

@media (max-width: 860px) {
  .town-theme .hero--sub {
    grid-template-columns: 1fr;
  }

  /* スマホでは本文を先に読めるよう、イラストは上に細い帯で出す */
  .town-theme .town-sub__art {
    order: -1;
    height: 140px;
    object-fit: cover;
  }
}
