@charset "UTF-8";

/* ==========================================================================
   （有）山崎電工様 ご提案専用サンプル

   配色は、現在のホームページから実測した値をそのまま使っています。
   - 濃茶 #4D3725 / #2E1F10 … パソコン版の帯・罫線の色（そのまま）
   - ベージュ #CFBB9B / 生成り #EEEDE4 … パソコン版の面・背景の色（そのまま）
   - 臙脂 #892121 … スマホ版で使われている色（そのまま）。差し色に使う
   - 青 #299EEB … ロゴの英字「Yamazaki electrical work」の色（そのまま）
   ========================================================================== */

:root {
  color-scheme: only light;

  /* 文字サイズ（03_レビューゲートの18px仕様＝正本。数値を直接書かない） */
  --fs-body: 18px;
  --fs-lead: 20px;
  --fs-h2: 32px;
  --fs-h3: 24px;
  --fs-h4: 20px;
  --fs-label: 15px;
  --fs-note: 14px;

  /* 色（現在のホームページの実測値） */
  --cha: #4d3725; /* パソコン版の帯の濃茶 */
  --cha-dark: #2e1f10; /* 同・いちばん濃い茶 */
  --cha-pale: #f2ece2; /* 上の茶をごく薄くした面 */
  --enji: #892121; /* スマホ版で使われている臙脂。差し色 */
  --line: #cfbb9b; /* パソコン版のベージュの罫線 */
  --tint: #eeede4; /* パソコン版の背景の生成り */
  --kinari: #f7f5ef;
  --sumi: #201c18;
  --gray: #5c534b;
  --white: #ffffff;

  --gothic: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "Noto Sans JP", "Yu Gothic",
    "游ゴシック体", "MS PGothic", sans-serif;
  --mincho: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", "Yu Mincho", "游明朝体", "MS PMincho", serif;

  --wide: 1120px;
  --text: 720px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* メニューから飛んだとき、上に残るヘッダーで見出しが隠れないための余白。
     実際の高さはscript.jsが測って上書きする（ここは読み込み前の保険） */
  scroll-padding-top: 160px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--sumi);
  font-family: var(--gothic);
  font-size: var(--fs-body);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--cha-dark);
}

.inner {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: 20px;
}

/* --------------------------------------------------------------------------
   提案専用の注釈
   -------------------------------------------------------------------------- */

.proposal-note {
  background: var(--sumi);
  color: #f1efe9;
  font-size: var(--fs-note);
  line-height: 1.7;
  padding: 10px 20px;
  text-align: center;
}

.proposal-sub {
  background: var(--cha-pale);
  color: var(--sumi);
  font-size: var(--fs-note);
  line-height: 1.8;
  padding: 10px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.proposal-sub a {
  color: var(--cha-dark);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   ヘッダー
   -------------------------------------------------------------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cha);
  border-bottom: 4px solid var(--cha-dark);
}

.header-inner {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo {
  display: block;
  line-height: 0;
}

.header-logo img {
  width: 260px;
  height: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-tel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  color: var(--white);
}

.header-tel-label {
  font-size: var(--fs-label);
  line-height: 1.4;
}

.header-tel-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.menu-button {
  display: none;
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--cha-dark);
  background: var(--white);
  border: 2px solid var(--white);
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.nav {
  background: var(--cha-dark);
}

.nav ul {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 4px;
}

.nav a {
  display: block;
  padding: 12px 14px;
  color: var(--white);
  font-size: var(--fs-body);
  text-decoration: none;
}

.nav a:hover {
  background: var(--cha);
}

/* --------------------------------------------------------------------------
   第一画面
   -------------------------------------------------------------------------- */

.hero {
  background: var(--kinari);
  padding: 36px 0 44px;
}

.hero-inner {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 20px;
  text-align: center;
}

.hero-kanban {
  width: 100%;
  max-width: 960px;
  border: 1px solid var(--line);
}

.hero-title {
  margin: 28px 0 0;
  font-family: var(--mincho);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.04em;
  color: var(--cha-dark);
}

.hero-title-line {
  display: inline-block;
}

.hero-lead {
  margin: 18px 0 0;
  font-size: var(--fs-lead);
  line-height: 1.9;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-note {
  margin: 20px auto 0;
  max-width: var(--text);
  font-size: var(--fs-label);
  color: var(--gray);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   ボタン
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: var(--fs-lead);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  flex-wrap: wrap;
  /* 「電話する」「090-…」が文字の途中で泣き別れしないように */
  white-space: nowrap;
}

.btn-main {
  background: var(--cha);
  color: var(--white);
}

.btn-main:hover {
  background: var(--cha-dark);
}

.btn-sub {
  background: var(--white);
  color: var(--cha-dark);
  border-color: var(--cha);
}

.btn-sub:hover {
  background: var(--cha-pale);
}

.btn-sub-num {
  font-size: 24px;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   あいさつ
   -------------------------------------------------------------------------- */

.greeting {
  padding: 60px 0 64px;
  border-bottom: 1px solid var(--line);
}

.greeting .inner {
  /* 原文の一番長い行（「そんな電気を…私達がいます。」）が
     1行に収まる幅。ここを狭めると行末で泣き別れする */
  max-width: 980px;
  text-align: center;
}

.greeting-heading {
  margin: 0 0 30px;
  font-family: var(--mincho);
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--cha-dark);
}

.greeting-heading::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--enji);
}

.greeting-body {
  margin: 0;
  font-size: 22px;
  line-height: 2.2;
}

.greeting-close {
  margin: 22px 0 0;
  font-family: var(--mincho);
  font-size: var(--fs-h3);
  color: var(--cha-dark);
  line-height: 1.7;
}

.greeting-sign {
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 14px;
  font-family: var(--mincho);
  line-height: 1.6;
}

.greeting-sign-company,
.greeting-sign-title {
  font-size: var(--fs-body);
  color: var(--gray);
}

.greeting-sign-name {
  font-size: var(--fs-h3);
  letter-spacing: 0.08em;
  color: var(--sumi);
}

/* --------------------------------------------------------------------------
   セクション共通
   -------------------------------------------------------------------------- */

.section {
  padding: 52px 0;
}

.section-tinted {
  background: var(--kinari);
}

.section-title {
  margin: 0 0 30px;
  padding-left: 16px;
  border-left: 8px solid var(--cha);
  line-height: 1.4;
}

.section-title-ja {
  display: block;
  font-family: var(--mincho);
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cha-dark);
}

.section-title-note {
  display: block;
  margin-top: 8px;
  font-size: var(--fs-body);
  font-weight: 400;
  color: var(--gray);
  font-family: var(--gothic);
}

.source-note {
  margin: 18px 0 0;
  font-size: var(--fs-note);
  color: var(--gray);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   お困りごとから探す
   -------------------------------------------------------------------------- */

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 18px;
}

.entry-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--cha);
  padding: 22px 20px;
}

.entry-card-title {
  margin: 0 0 12px;
  font-size: var(--fs-h3);
  line-height: 1.5;
  color: var(--cha-dark);
  /* 「店舗・事務所の電気」が「電」「気」で泣き別れしないように */
  word-break: keep-all;
  overflow-wrap: break-word;
}

.entry-card-body {
  margin: 0 0 18px;
  flex: 1 1 auto;
}

.entry-card-link {
  align-self: flex-start;
  display: inline-block;
  padding: 12px 20px;
  min-height: 52px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cha-dark);
  font-weight: 700;
  text-decoration: none;
}

.entry-card-link:hover {
  background: var(--cha);
  border-color: var(--cha);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   対応する工事
   -------------------------------------------------------------------------- */

.gyomu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 18px;
}

.gyomu-block {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px 20px;
}

.gyomu-lead {
  grid-column: 1 / -1;
}

.gyomu-block-title {
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--cha);
  font-size: var(--fs-h4);
  line-height: 1.5;
  color: var(--cha-dark);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.gyomu-items {
  margin: 0;
  padding-left: 1.2em;
}

.gyomu-items li + li {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   施工実績
   -------------------------------------------------------------------------- */

.works-group-title {
  margin: 44px 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-h3);
  line-height: 1.4;
  color: var(--cha-dark);
  letter-spacing: 0.04em;
}

.works-group-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.works-group-title:first-of-type {
  margin-top: 0;
}

.works-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 26px 24px;
}

.work {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(46, 31, 16, 0.08);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.work:hover {
  box-shadow: 0 8px 20px rgba(46, 31, 16, 0.16);
  transform: translateY(-3px);
}

.work-photo {
  overflow: hidden;
  background: var(--tint);
}

.work img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.work:hover img {
  transform: scale(1.05);
}

.work-caption {
  padding: 16px 18px 18px;
  border-top: 3px solid var(--enji);
}

.work-place {
  margin: 0;
  font-size: var(--fs-label);
  color: var(--gray);
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.work-name {
  margin: 4px 0 0;
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.5;
  color: var(--cha-dark);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   資格・許可
   -------------------------------------------------------------------------- */

.badge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 18px;
}

.badge {
  background: var(--white);
  border: 2px solid var(--cha);
  padding: 22px 20px;
  text-align: center;
}

.badge-label {
  margin: 0 0 10px;
  font-size: var(--fs-label);
  color: var(--gray);
  line-height: 1.5;
}

.badge-value {
  margin: 0;
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: 1.6;
  color: var(--cha-dark);
}

.badge-value span {
  display: inline-block;
}

/* --------------------------------------------------------------------------
   工事までの流れ
   -------------------------------------------------------------------------- */

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 18px;
}

.flow-step {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 20px;
}

.flow-num {
  margin: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cha);
  color: var(--white);
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 44px;
  text-align: center;
}

.flow-title {
  margin: 14px 0 8px;
  font-size: var(--fs-h4);
  line-height: 1.5;
  color: var(--cha-dark);
}

.flow-body {
  margin: 0;
}

/* --------------------------------------------------------------------------
   お問い合わせ（相談の組み立て → フォーム → 連絡先）
   -------------------------------------------------------------------------- */

.soudan-voice {
  max-width: 720px;
  margin: 0 auto 6px;
  padding: 20px 22px;
  background: var(--tint);
  border-left: 6px solid var(--line);
  font-size: var(--fs-lead);
  line-height: 1.9;
}

.source-note-voice {
  max-width: 720px;
  margin: 0 auto 28px;
}

.scene-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 12px;
}

.scene-button {
  min-height: 62px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: var(--fs-lead);
  font-weight: 700;
  color: var(--cha-dark);
  background: var(--white);
  border: 2px solid var(--cha);
  border-radius: 6px;
  cursor: pointer;
}

.scene-button:hover {
  background: var(--cha-pale);
}

.scene-button[aria-pressed="true"] {
  background: var(--cha);
  color: var(--white);
}

.topic-area {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 20px;
}

.topic-empty {
  margin: 0;
  color: var(--gray);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 20px;
}

.topic-item label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  cursor: pointer;
  line-height: 1.7;
}

.topic-item input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 4px;
  accent-color: var(--cha);
}

.form-caution {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--cha-pale);
  border: 1px solid var(--cha);
  font-size: var(--fs-note);
  line-height: 1.8;
}

.demo-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 6px solid var(--cha);
  padding: 26px 24px 30px;
  max-width: 720px;
  margin-inline: auto;
}

.field {
  margin-bottom: 24px;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.6;
}

.field-hint {
  display: block;
  font-size: var(--fs-label);
  font-weight: 400;
  color: var(--gray);
  line-height: 1.6;
}

.req {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--cha);
  color: var(--white);
  font-size: var(--fs-label);
  font-weight: 700;
  border-radius: 3px;
  vertical-align: 2px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  /* 18px以上にするとiPhoneでタップしたときに勝手に拡大しない */
  font-size: var(--fs-body);
  line-height: 1.7;
  padding: 12px 14px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  background: var(--white);
  color: var(--sumi);
}

.field textarea {
  resize: vertical;
}

.demo-send {
  width: 100%;
  opacity: 0.75;
  cursor: default;
}

.contact-line {
  list-style: none;
  margin: 26px auto 0;
  padding: 0;
  max-width: 720px;
}

.contact-line li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}

.contact-line-label {
  flex: 0 0 5.5em;
  font-weight: 700;
  color: var(--cha-dark);
}

.contact-line-note {
  font-size: var(--fs-label);
  color: var(--gray);
}

/* --------------------------------------------------------------------------
   会社概要
   -------------------------------------------------------------------------- */

.company {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.company dt {
  padding: 16px 18px;
  background: var(--tint);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  line-height: 1.7;
}

.company dd {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  line-height: 1.8;
}

.map-frame {
  background: var(--tint);
  border: 1px solid var(--line);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

.blog-links {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.blog-links a {
  display: inline-block;
  padding: 12px 20px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  text-decoration: none;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   フッター
   -------------------------------------------------------------------------- */

.footer {
  background: var(--cha-dark);
  color: #f4ecec;
  padding: 36px 0 100px;
}

.footer-name {
  margin: 0 0 10px;
  font-family: var(--mincho);
  font-size: var(--fs-h3);
  line-height: 1.5;
}

.footer-line {
  margin: 0;
  line-height: 1.9;
}

.footer-copy {
  margin: 18px 0 0;
  font-size: var(--fs-label);
}

.footer-note {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: var(--fs-note);
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   スマホ用の固定バー
   -------------------------------------------------------------------------- */

.callbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--cha-dark);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  gap: 10px;
}

.callbar a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 6px;
  font-size: var(--fs-lead);
  font-weight: 700;
  text-decoration: none;
}

.callbar-tel {
  background: var(--white);
  color: var(--cha-dark);
}

.callbar-form {
  background: var(--cha);
  color: var(--white);
  border: 2px solid var(--white);
}

/* --------------------------------------------------------------------------
   画面幅ごとの調整
   -------------------------------------------------------------------------- */

@media (min-width: 861px) {
  .entry-list,
  .flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gyomu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .badge-list,
  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scene-buttons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .entry-list,
  .gyomu-grid,
  .flow,
  .badge-list,
  .contact-list,
  .scene-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  html {
    scroll-padding-top: 100px;
  }

  .header-logo img {
    width: 200px;
  }

  .header-tel {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 4px solid var(--cha);
  }

  .nav.is-open {
    display: block;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
  }

  .nav a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* メニューを開いている間は下の固定バーを隠す */
  body.is-menu-open .callbar {
    display: none;
  }

  .header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }

  .callbar {
    display: flex;
  }
}

@media (max-width: 640px) {
  :root {
    --fs-h2: 26px;
    --fs-h3: 22px;
  }

  .entry-list,
  .gyomu-grid,
  .flow,
  .badge-list,
  .contact-list,
  .scene-buttons {
    grid-template-columns: minmax(0, 1fr);
  }

  .works-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px 12px;
  }

  /* 注釈は必要だが、第一画面を押し下げすぎないように詰める */
  .proposal-note,
  .proposal-sub {
    padding: 8px 14px;
    line-height: 1.6;
    text-align: left;
  }

  .section {
    padding: 40px 0;
  }

  .btn {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .company {
    grid-template-columns: minmax(0, 1fr);
  }

  .company dt {
    border-bottom: 0;
    padding-bottom: 10px;
  }

  .company dd {
    padding-top: 10px;
  }

  .topic-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo-form {
    padding: 20px 16px 24px;
  }
}
