/* ============================================
   キタムラ自動車 — 共通スタイル
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;700;900&family=Zen+Kaku+Gothic+New:wght@300;400;500;700;900&family=Shippori+Mincho:wght@500;700;800&display=swap');

:root {
  --ink: #1a2332;
  --ink-soft: #2d3a4f;
  --paper: #f5f0e6;
  --paper-warm: #ebe3d3;
  --paper-deep: #e0d5be;
  --indigo: #1d3557;
  --indigo-deep: #0f2238;
  --vermilion: #c8442a;
  --vermilion-deep: #a8331c;
  --suzuki-blue: #003a8c;
  --gold: #b8893d;
  --line: rgba(26, 35, 50, 0.15);
  --line-strong: rgba(26, 35, 50, 0.4);
  --shadow-soft: 0 2px 20px rgba(26, 35, 50, 0.06);
  --shadow-medium: 0 8px 40px rgba(26, 35, 50, 0.12);
  --font-mincho: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-mincho-alt: 'Noto Serif JP', serif;
  --font-gothic: 'Zen Kaku Gothic New', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-gothic);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* 紙のような質感の背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(184, 137, 61, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(29, 53, 87, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

main, header, footer { position: relative; z-index: 2; }

/* ============================================
   レスポンシブ改行
   - br.sp はスマホ(600px以下)でのみ改行する
   - br.pc はPC(601px以上)でのみ改行する
   ============================================ */
br.sp { display: none; }
@media (max-width: 600px) {
  br.sp { display: initial; }
  br.pc { display: none; }
}

/* ============================================
   日本語禁則処理(グローバル)
   - line-break: strict で句読点や小書き仮名が行頭に来ないようにする
   - word-break / overflow-wrap はブラウザのデフォルト挙動に任せる
     (CJKは文字単位で改行されるのが標準。strict で禁則だけ効かせれば
      「。」だけ次行に落ちる現象は防げる)
   ============================================ */
html {
  line-break: strict;
}

/* ============================================
   ヘッダー
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 230, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 44px;
  height: 44px;
  background: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mincho);
  font-weight: 800;
  color: var(--paper);
  font-size: 1.4rem;
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--indigo);
  pointer-events: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-family: var(--font-mincho);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.nav a::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--vermilion);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav a:hover { color: var(--vermilion); }
.nav a:hover::before { width: 100%; }
.nav a.active { color: var(--vermilion); }
.nav a.active::before { width: 100%; }

.tel-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.3rem;
  text-decoration: none;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.tel-cta:hover { background: var(--vermilion); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: 0.3s;
}

/* ============================================
   セクション共通
   ============================================ */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section-head {
  margin-bottom: 3.5rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: end;
}

.section-num {
  font-family: var(--font-mincho);
  font-size: 5rem;
  line-height: 0.8;
  color: var(--vermilion);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title-block {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1.5rem;
}

.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
}

/* ============================================
   ボタン
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  text-decoration: none;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  transition: all 0.25s ease;
  position: relative;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--vermilion);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-arrow { transition: transform 0.25s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ============================================
   フッター
   ============================================ */
.site-footer {
  background: var(--indigo-deep);
  color: var(--paper);
  margin-top: 6rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--vermilion) 0%, var(--vermilion) 33%, var(--gold) 33%, var(--gold) 66%, var(--suzuki-blue) 66%, var(--suzuki-blue) 100%);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand .brand-mark {
  background: var(--paper);
  color: var(--indigo);
}
.footer-brand .brand-name { color: var(--paper); }
.footer-brand .brand-sub { color: rgba(245, 240, 230, 0.6); }

.footer-tagline {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: rgba(245, 240, 230, 0.7);
  line-height: 1.9;
}

.footer-col h4 {
  font-family: var(--font-mincho);
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  position: relative;
  padding-bottom: 0.6rem;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 1px;
  background: var(--vermilion);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  color: rgba(245, 240, 230, 0.7);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--paper); }

.footer-info { font-size: 0.85rem; color: rgba(245, 240, 230, 0.7); line-height: 1.9; }

.footer-bottom {
  border-top: 1px solid rgba(245, 240, 230, 0.1);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(245, 240, 230, 0.5);
  letter-spacing: 0.2em;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 900px) {
  .nav, .tel-cta { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { padding: 1rem 1.25rem; }
  .section { padding: 4rem 1.25rem; }
  .section-head {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .section-num { font-size: 3.5rem; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 1.25rem 2rem;
  }
}

/* モバイルメニュー */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 99;
  padding: 6rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-family: var(--font-mincho);
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.mobile-menu .tel-cta {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1rem;
}

/* スクロール時のフェードイン */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   日本語の改行制御
   - line-break: strict だけで禁則処理(句読点・小書き仮名の追い出し)
   - word-break と overflow-wrap はブラウザデフォルトに任せる
     (CJKは文字単位の自然な折り返し + strict で「。」の行頭落ちを抑制)
   ============================================ */
.hero-title,
.page-hero-title,
.page-hero-sub,
.section-title,
.intro-title,
.cta-title,
.menu-title,
.service-title,
.car-name,
.flow-title,
.faq-q,
.strengths-title,
.strength-label,
.story-text h2,
.highlight-text h2,
.note-title,
.timeline-title,
.method-value,
.form-header h2,
.brand-name,
.hero-lead,
.intro-text,
.strength-text,
.service-desc,
.menu-desc {
  line-break: strict;
}

/* スマホでは letter-spacing を控えめにして、
   横スペースに余裕を持たせる */
@media (max-width: 600px) {
  .hero-title,
  .page-hero-title,
  .intro-title,
  .cta-title,
  .section-title,
  .story-text h2,
  .highlight-text h2,
  .note-title {
    letter-spacing: 0.01em;
  }
  /* スマホ時の見出しフォントサイズを画面幅に確実に収まるよう絞る
     ※ 既存のインラインCSS clamp() を上書き */
  .intro-title { font-size: 1.5rem !important; line-height: 1.55; }
  .cta-title { font-size: 1.35rem !important; line-height: 1.55; letter-spacing: 0 !important; }
  .highlight-text h2 { font-size: 1.45rem !important; line-height: 1.55; }
  .note-title { font-size: 1.3rem !important; line-height: 1.55; }
  .story-text h2 { font-size: 1.45rem !important; line-height: 1.55; }
  .section-title { font-size: 1.5rem !important; line-height: 1.55; }
  .page-hero-title { font-size: 1.8rem !important; line-height: 1.4; }

  .menu-title,
  .service-title,
  .strength-label,
  .timeline-title,
  .flow-title,
  .car-name,
  .faq-q {
    letter-spacing: 0.02em;
  }
  /* セクションタイトルの英語アイブロウは折返し位置を確保 */
  .page-hero-eyebrow,
  .section-eyebrow,
  .hero-eyebrow {
    word-break: normal;
    overflow-wrap: normal;
  }
  /* スマホでは本文を左寄せにして最後の行の収まりを整える */
  .intro-text {
    text-align: left;
  }
}

/* ============================================
   スマホ全体の最終調整
   - ヘッダーが小さくなって余白も詰まる
   - ボタンは縦積みフル幅に
   - タイトルの折返しを画面に収める
   ============================================ */
@media (max-width: 600px) {
  /* ヘッダーを小さく */
  .header-inner { padding: 0.7rem 1rem !important; }
  .brand-mark { width: 36px; height: 36px; font-size: 1.1rem; }
  .brand-name { font-size: 0.95rem; }
  .brand-sub { font-size: 0.65rem; letter-spacing: 0.1em; }

  /* メニューボタン位置調整 */
  .menu-toggle { width: 32px; height: 32px; }

  /* CTAタイトルをさらに引き締めて画面に収める */
  .cta-title {
    font-size: 1.35rem !important;
    letter-spacing: 0 !important;
    line-height: 1.6 !important;
    padding: 0 0.5rem;
  }
  .cta-section { padding: 3.5rem 1rem !important; }
  .cta-eyebrow { letter-spacing: 0.35em; font-size: 0.7rem; }

  /* CTAボタンをスマホでは縦積みフル幅 */
  .cta-actions {
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
  }
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 1.05rem 1rem;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
  }

  /* ヒーローのボタンも同じく縦積み */
  .hero-actions {
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* ページ全体の汎用ボタンも見やすく */
  .btn { font-size: 0.9rem; padding: 0.95rem 1.4rem; }

  /* フッターの店舗情報を詰める */
  .footer-info { font-size: 0.85rem; line-height: 1.9; }
  .footer-tagline { font-size: 0.85rem; }

  /* 画像はみ出し対策 */
  img { max-width: 100%; height: auto; }
}
