@charset "UTF-8";

/* ============================================================
   工務店テンプレート
   ★会社ごとに変えるのは下の :root の3行だけ。
     文言の差し替え箇所は index.html の「▼SWAP-xx」コメントを見る
   ============================================================ */

:root {
  /* ▼SWAP-MAIN 会社ごとに変える唯一の色（濃いめの色を入れる） */
  --main: #4a3b6b;

  /* --main から自動で作る派生色（ここは触らない）
     1行目は color-mix 非対応の古い端末むけの保険。消さないこと */
  --main-dark: var(--main);
  --main-tint: #f4f6f8;
  --main-line: #d8dee5;
  --main-dark: color-mix(in srgb, var(--main) 78%, #000);
  --main-tint: color-mix(in srgb, var(--main) 7%, #fff);
  --main-line: color-mix(in srgb, var(--main) 18%, #fff);

  --accent: #c8501e;      /* 電話ボタン。--main が暖色なら変える */
  --text: #23282d;
  --text-sub: #5d666e;
  --bg: #fff;

  --container: 1080px;
  --radius: 6px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, li, figure, table, th, td {
  margin: 0; padding: 0;
}
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  /* SP固定バーぶんの余白 */
  padding-bottom: 68px;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}
.container--narrow { max-width: 760px; }

.section { padding-block: 56px; }
.section--tint { background: var(--main-tint); }

/* ---------- 見出し ---------- */
.heading { text-align: center; margin-bottom: 32px; }
.heading__en {
  display: block;
  color: var(--main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.4;
}
.heading__ja {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}
.heading__ja::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--main);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 32px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  line-height: 1.4;
  box-shadow: 0 3px 0 rgb(0 0 0 / .18);
}
.btn__sub { font-size: 13px; font-weight: 500; }
.btn__num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
}
.btn__note { font-size: 12px; opacity: .9; }
.btn--lg { padding: 18px 40px; }
.btn--lg .btn__num { font-size: 32px; }

/* ============================================================
   1. ヘッダー
   ============================================================ */
.header {
  border-top: 4px solid var(--main);
  border-bottom: 1px solid var(--main-line);
  background: #fff;
}
.header__inner {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}
.header__logo-main {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--main);
}
.header__logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.4;
}
.header__tel { display: none; text-align: right; }
.header__tel-label { display: block; font-size: 11px; color: var(--text-sub); line-height: 1.4; }
.header__tel-num {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--main);
  line-height: 1.2;
  letter-spacing: .02em;
}
.header__tel-time { display: block; font-size: 11px; color: var(--text-sub); line-height: 1.4; }

/* ============================================================
   2. ファーストビュー
   ============================================================ */
.fv__photo {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--main-tint);
  overflow: hidden;
}
.fv__photo img { width: 100%; height: 100%; object-fit: cover; }

.fv__body {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
  padding-block: 32px 40px;
  text-align: center;
}
.fv__catch {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .01em;
  color: var(--main);
}
.fv__lead {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-sub);
  text-align: left;
}
.fv__body .btn { margin-top: 24px; }

/* ============================================================
   3. できること
   ============================================================ */
.cards { display: grid; gap: 20px; }
.card {
  padding: 28px 24px;
  border: 1px solid var(--main-line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
}
.card__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  color: var(--main);
}
.card__icon svg { width: 100%; height: 100%; }
.card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.card__text { font-size: 15px; text-align: left; color: var(--text-sub); }

/* ============================================================
   4. 選ばれる理由
   ============================================================ */
.reasons { display: grid; gap: 20px; }
.reason {
  padding: 24px;
  background: #fff;
  border-radius: var(--radius);
  border-left: 5px solid var(--main);
}
.reason__num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--main);
  line-height: 1.4;
}
.reason__title { font-size: 19px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.reason__text { font-size: 15px; color: var(--text-sub); }

/* ============================================================
   5. 施工の流れ
   ============================================================ */
.flow { display: grid; gap: 16px; }
.flow__item {
  position: relative;
  padding: 20px 24px;
  border: 1px solid var(--main-line);
  border-radius: var(--radius);
  background: #fff;
}
/* 縦に並ぶ時の矢印 */
.flow__item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  translate: -50% 0;
  border-style: solid;
  border-width: 10px 8px 0;
  border-color: var(--main) transparent transparent;
}
.flow__step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--main);
  line-height: 1.4;
}
.flow__title { font-size: 18px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.flow__text { font-size: 15px; color: var(--text-sub); }

/* ============================================================
   6. 会社概要
   ============================================================ */
.company { width: 100%; font-size: 15px; background: #fff; }
.company th, .company td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--main-line);
  text-align: left;
  vertical-align: top;
}
.company th {
  width: 34%;
  font-weight: 700;
  color: var(--main);
  white-space: nowrap;
}
.company td a { color: var(--main); font-weight: 700; }

/* ============================================================
   7. お問い合わせ
   ============================================================ */
.contact {
  padding-block: 56px;
  background: var(--main);
  color: #fff;
  text-align: center;
}
.contact__title { font-size: 24px; font-weight: 700; line-height: 1.5; }
.contact__text { margin-top: 12px; font-size: 15px; }
.contact .btn { margin-top: 24px; }

/* ---------- フッター ---------- */
.footer {
  padding: 24px 20px 28px;
  background: var(--main-dark);
  color: #fff;
  text-align: center;
  line-height: 1.7;
}
.footer__name { font-size: 17px; font-weight: 700; }
.footer__addr { font-size: 13px; opacity: .85; }
.footer__copy { margin-top: 10px; font-size: 11px; opacity: .7; }

/* ---------- SP固定の電話バー ---------- */
.fixed-tel {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 -2px 8px rgb(0 0 0 / .2);
}
.fixed-tel__icon { width: 22px; height: 22px; }
.fixed-tel__icon svg { width: 100%; height: 100%; }

/* ============================================================
   PC（768px〜）
   ============================================================ */
@media (min-width: 768px) {
  body { padding-bottom: 0; font-size: 17px; }
  .fixed-tel { display: none; }

  .section { padding-block: 80px; }
  .heading { margin-bottom: 48px; }
  .heading__ja { font-size: 30px; }

  .header__inner { padding-block: 16px; }
  .header__logo-main { font-size: 24px; }
  .header__tel { display: block; }

  /* FV：写真の上にキャッチを重ねる。
     高さは文章量にまかせる（会社ごとにキャッチとリードの行数が違うため、
     aspect-ratio で固定するとボタンがはみ出す） */
  .fv { position: relative; isolation: isolate; }
  .fv__photo {
    position: absolute;
    inset: 0;
    z-index: -1;
    aspect-ratio: auto;
    height: 100%;
  }
  .fv__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / .55) 0%, rgb(0 0 0 / .15) 60%, transparent 100%);
  }
  .fv__body {
    position: relative;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding-block: 44px;
    padding-inline: max(24px, (100vw - var(--container)) / 2);
    width: 100%;
  }
  .fv__catch {
    font-size: 40px;
    color: #fff;
    text-shadow: 0 2px 12px rgb(0 0 0 / .5);
  }
  .fv__catch, .fv__lead { align-self: stretch; }
  .fv__lead {
    color: #fff;
    max-width: 36em;
    font-size: 16px;
    text-shadow: 0 1px 8px rgb(0 0 0 / .6);
  }

  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .reasons { grid-template-columns: repeat(3, 1fr); gap: 24px; }

  .flow { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .flow__item:not(:last-child)::after {
    left: auto; bottom: auto;
    top: 50%; right: -20px;
    translate: 0 -50%;
    border-width: 8px 0 8px 12px;
    border-color: transparent transparent transparent var(--main);
  }

  .company th { width: 26%; }
  .contact__title { font-size: 30px; }
}

/* ============================================================
   印刷（封書に同封する A4 用）
   ★この設計の肝。トップページを紙に出して郵送するため
   ============================================================ */
@media print {
  :root { --main-tint: #fff; }
  body { padding: 0; font-size: 11pt; line-height: 1.7; }
  .fixed-tel { display: none; }

  .header { border-top-width: 6px; }
  .header__tel { display: block; }

  /* PC用の「写真を敷いて文字を重ねる」指定を解除して、写真の下に文字を置く。
     印刷の幅は 768px 以上と判定されるため、明示的に戻す必要がある */
  .fv__photo {
    position: static;
    z-index: auto;
    height: auto;
    aspect-ratio: 16 / 7;
  }
  .fv__photo::after { display: none; }
  .fv__body {
    position: static;
    min-height: 0;
    color: var(--text);
    /* 左右は .container と揃える */
    padding: 16px 20px 8px;
    text-align: left;
  }
  .fv__catch { font-size: 20pt; color: var(--main); text-shadow: none; }
  .fv__lead { color: var(--text); text-shadow: none; }

  .section { padding-block: 18px; }
  .heading { margin-bottom: 14px; }
  .contact { padding-block: 20px; }

  .card, .reason, .flow__item, .company, .section--tint, .contact, .footer {
    break-inside: avoid;
  }
  /* 背景色をインクで出す（ブラウザ側の「背景のグラフィック」ONが前提） */
  .contact, .footer { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
