/* ==========================================================
   すみかクリーン(架空のハウスクリーニング会社・制作サンプル)
   スマホ用を基準に書き、画面が広くなるほど @media で広げています。
   ブレークポイント: 768px(タブレット)/ 1024px(PC)
   配色: 白+淡い水色+青。オレンジは「無料見積り」ボタンだけに使う。
   ========================================================== */

/* ===== 色・フォント(ここを変えるとサイト全体が変わります) ===== */
:root {
  --bg: #ffffff;              /* ページの基本の背景 */
  --bg-alt: #f0f7fa;          /* 区切り用の背景(淡い水色) */
  --bg-soft: #e3f0f7;         /* 強調用の背景(少し濃い水色) */
  --line: #d5e3ea;            /* 細い区切り線 */
  --text: #1f2933;            /* 本文 */
  --text-sub: #52606d;        /* 補足の文字 */
  --primary: #1b5e8a;         /* メインの青 */
  --primary-dark: #144a6e;    /* 濃い青(小さな文字・ホバー用) */
  --cta: #b8500a;             /* 無料見積りボタン(オレンジ系) */
  --cta-dark: #963f05;        /* 見積りボタンのホバー */
  --footer: #16384f;          /* フッターの背景 */

  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", "Meiryo", sans-serif;
}

/* ===== 基本 ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* 「動きを減らす」設定の人には、スムーズスクロールを使わない */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  word-break: auto-phrase; /* 対応ブラウザでは、文節のまとまりで折り返す */
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-weight: 800;
  text-wrap: balance;
}

/* 文の最後に「。」や1〜2文字だけが残らないようにする */
p,
dd,
li {
  text-wrap: pretty;
}

/* 文のまとまり(この中では折り返さない) */
.nb {
  display: inline-block;
}

/* 画面には出さず、読み上げだけに使う文字 */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* アイコン(HTML の先頭にまとめて定義した線画を、名前で呼び出して使う) */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* キーボード操作の人向け:Tabキーを押したときだけ現れる「本文へ移動」 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  background-color: var(--bg);
  border: 2px solid var(--primary-dark);
}

.skip-link:focus {
  top: 8px;
}

/* ===== ポートフォリオへ戻るリンク・サンプル表記(ページ最上部) ===== */
.back-bar {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* スマホで押しやすい高さ */
  color: var(--text-sub);
  font-size: 14px;
  text-decoration: none;
}

.back-link::before {
  content: "←";
  content: "←" / ""; /* 対応ブラウザでは、矢印を読み上げの対象から外す */
  margin-right: 6px;
}

.back-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sample-note {
  padding: 8px 16px;
  background-color: var(--bg-soft);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

/* ===== ボタン ===== */
.btn {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background-color: var(--bg);
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  background-color: var(--bg-soft);
}

/* 無料見積り(ページの中で、いちばん目立たせるボタン) */
.btn--cta {
  border-color: var(--cta);
  background-color: var(--cta);
  color: #ffffff;
}

.btn--cta:hover {
  border-color: var(--cta-dark);
  background-color: var(--cta-dark);
}

.btn-group {
  display: flex;
  flex-wrap: wrap; /* 幅が足りない画面では、自動で縦に折り返す */
  gap: 8px;
}

/* ===== ヘッダー ===== */
.site-header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav {
  display: none; /* スマホでは非表示。画面下の固定バーから連絡できる */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-tel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tel-num,
.header-estimate {
  display: none; /* PC幅でだけ表示 */
}

/* ===== ファーストビュー ===== */
.hero {
  padding: 24px 0 40px;
}

.hero__inner {
  display: grid;
  gap: 24px;
}

.eyebrow {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.hero h1 {
  margin-top: 4px;
}

.h1-main {
  display: block;
  font-size: 24px;
  line-height: 1.4;
}

.h1-sub {
  display: block;
  margin-top: 4px;
  color: var(--primary);
  font-size: 18px;
  line-height: 1.5;
}

.hero__lead {
  margin-top: 12px;
}

/* 料金の目安(スマホでは1行ずつ) */
.price-chips {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.price-chips li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background-color: var(--bg-alt);
}

.price-chips li + li {
  border-top: 1px solid var(--line);
}

.chip-label {
  font-weight: 700;
}

.chip-price {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hero__note {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.6;
}

.hero__meta {
  margin-top: 12px;
  color: var(--text-sub);
  font-size: 14px;
}

.hero .btn-group {
  margin-top: 16px;
}

/* ===== 写真 =====
   元の画像は 3:2(1200×800)。HTML の width / height でその比率を先に確保するので、
   読み込み中に画面がずれない。CSS では横幅だけ指定し、高さは比率どおりに自動で決まる
   (切り取りなし・歪みなし)。 */
.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background-color: var(--bg-soft); /* 読み込み中に見える色 */
  object-fit: cover;                /* 枠の比率が変わる場合も、歪ませずに切り取る */
}

/* ===== セクション共通 ===== */
.section {
  padding: 48px 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section-head {
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: 24px;
  line-height: 1.5;
}

.section-head p {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 15px;
}

/* ===== サービス一覧 ===== */
.service-grid {
  display: grid;
  gap: 12px;
}

.service-card {
  position: relative; /* カード全体を押せるようにするための基準 */
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
}

.service-card:hover {
  border-color: var(--primary);
}

.service-card__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--bg-soft);
  color: var(--primary);
}

.service-card__icon .icon {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-size: 17px;
  line-height: 1.5;
}

.service-card h3 a {
  text-decoration: none;
}

/* リンクの押せる範囲を、カード全体に広げる */
.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
}

.stretched:focus-visible {
  outline: none;
}

.stretched:focus-visible::after {
  outline: 3px solid var(--primary-dark);
  outline-offset: 2px;
}

.service-card__body p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.7;
}

.service-card__body .service-card__price {
  margin-top: 6px;
  color: var(--text-sub);
}

.service-card__price strong {
  color: var(--primary);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

/* ===== 料金表 ===== */
.price-groups {
  display: grid;
  gap: 16px;
}

.price-group {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
  overflow: hidden;
}

.price-group h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg-soft);
  color: var(--primary-dark);
  font-size: 17px;
  line-height: 1.5;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td {
  border-bottom: 0;
}

.price-table th[scope="row"] {
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere; /* とても狭い画面でも、表が枠からはみ出さないようにする */
}

.price-table small {
  display: block;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.price-table td {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* セット料金は、枠と見出しの色で目立たせる */
.price-group--set {
  border: 2px solid var(--primary);
}

.price-group--set h3 {
  background-color: var(--primary);
  color: #ffffff;
}

.badge {
  display: inline-block;
  padding: 0 10px;
  border-radius: 999px;
  background-color: #ffffff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
}

.price-notes {
  margin-top: 20px;
  padding-left: 1.2em;
  color: var(--text-sub);
  font-size: 14px;
  list-style: disc;
}

.price-notes li + li {
  margin-top: 4px;
}

/* ===== 無料見積りのご案内(帯) ===== */
.cta-band {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-color: var(--bg-soft);
}

.cta-band__inner {
  display: grid;
  gap: 16px;
}

.cta-band h2 {
  font-size: 20px;
  line-height: 1.5;
}

.cta-band__text p {
  margin-top: 4px;
  color: var(--text-sub);
  font-size: 15px;
}

/* ===== 対応エリア ===== */
.area-grid {
  display: grid;
  gap: 12px;
}

.area-card {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
}

.area-card h3 {
  font-size: 20px;
  line-height: 1.5;
}

.area-card p {
  font-size: 15px;
}

.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background-color: var(--bg-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.area-card .tag {
  display: table; /* 1行を使って、次の文と並ばないようにする */
}

.area-note {
  margin-top: 16px;
  color: var(--text-sub);
  font-size: 14px;
}

/* ===== 選ばれる理由 ===== */
.reason-layout {
  display: grid;
  gap: 24px;
}

.reasons {
  display: grid;
  gap: 12px;
  counter-reset: reason;
}

.reasons li {
  position: relative;
  padding: 16px 16px 16px 60px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
  counter-increment: reason;
}

.reasons li::before {
  content: counter(reason);
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}

.reasons h3 {
  font-size: 17px;
  line-height: 1.5;
}

.reasons p {
  margin-top: 4px;
  font-size: 15px;
}

/* ===== 作業の流れ ===== */
.flow {
  counter-reset: step;
}

.flow li {
  position: relative;
  padding: 0 0 24px 56px;
  counter-increment: step;
}

.flow li:last-child {
  padding-bottom: 0;
}

/* 番号の丸 */
.flow li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
}

/* 番号どうしをつなぐ縦線 */
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 4px;
  left: 17px;
  width: 2px;
  background-color: #b7cfdb;
}

.flow h3 {
  font-size: 17px;
  line-height: 36px;
}

.flow p {
  margin-top: 4px;
  font-size: 15px;
}

/* ===== よくある質問 ===== */
.faq {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
}

.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 12px 48px 12px 16px;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq details p {
  padding: 12px 16px 16px;
  font-size: 15px;
}

/* ===== 見積り・問い合わせ ===== */
.contact-layout {
  display: grid;
  gap: 24px;
}

.contact-hint {
  margin-top: 12px;
  color: var(--text-sub);
  font-size: 14px;
}

.info-box {
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--bg);
}

.info-box h3 {
  font-size: 17px;
  line-height: 1.5;
}

.check-list {
  margin-top: 8px;
}

.check-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.8em;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background-color: var(--primary);
}

.info-box__note {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

.contact-info {
  margin-top: 20px;
}

.contact-info > div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.contact-info dt {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

/* 文章の中にある電話番号のリンク(押しやすい高さにする) */
.tap-link {
  display: inline-block;
  padding: 10px 0;
  color: var(--primary-dark);
  font-weight: 700;
}

/* ===== フッター ===== */
.site-footer {
  padding: 40px 0 calc(40px + 72px + env(safe-area-inset-bottom)); /* 下の固定バーに隠れない余白 */
  background-color: var(--footer);
  color: #e6f0f5;
}

.site-footer__name {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.site-footer__info {
  margin-top: 12px;
}

.site-footer__info > div {
  padding: 4px 0;
}

.site-footer__info dt {
  color: #b9d0dc;
  font-size: 13px;
}

.site-footer .tap-link {
  padding: 8px 0;
  color: #ffffff;
}

.site-footer__note {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.7;
}

.site-footer__copy {
  margin-top: 16px;
  font-size: 13px;
}

/* <small> タグは自動で文字が小さくなるので、13px のままにする */
.site-footer__copy small {
  font-size: inherit;
}

/* ===== 画面下の固定バー(スマホ・タブレット) ===== */
.quick-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background-color: var(--bg);
}

.quick-bar .btn {
  padding: 8px 12px;
}

/* ==========================================================
   とても狭いスマホ(360px以下):ヘッダーが収まるように、少し詰める
   ========================================================== */
@media (max-width: 360px) {
  .site-header__inner {
    gap: 8px;
  }

  .logo {
    font-size: 18px;
  }

  .header-tel {
    padding: 0 10px;
  }
}

/* ==========================================================
   タブレット(768px以上)
   ========================================================== */
@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .hero {
    padding: 40px 0 56px;
  }

  .h1-main {
    font-size: 30px;
  }

  .h1-sub {
    font-size: 20px;
  }

  /* 料金の目安を、3つ横に並べる */
  .price-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .price-chips li {
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
  }

  .price-chips li + li {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cta-band {
    padding: 40px 0;
  }

  .cta-band__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
  }

  .cta-band .btn-group {
    flex-wrap: nowrap;
  }

  .cta-band .btn {
    flex: none;
  }

  .area-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .contact-info > div {
    display: grid;
    grid-template-columns: 6em 1fr;
    gap: 16px;
    align-items: center;
  }

  .contact-info dd {
    margin-top: 0;
  }

  .contact-main .btn {
    flex: none;
  }
}

/* ==========================================================
   PC(1024px以上)
   ========================================================== */
@media (min-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .site-header__inner {
    min-height: 72px;
    gap: 16px;
  }

  .global-nav {
    display: block;
  }

  .global-nav ul {
    display: flex;
  }

  .global-nav a {
    display: block;
    padding: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
  }

  .global-nav a:hover {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .tel-label {
    display: none;
  }

  .tel-num {
    display: inline;
  }

  .header-tel {
    padding: 0 12px;
    border-color: transparent;
    font-size: 18px;
  }

  .header-estimate {
    display: inline-flex;
    flex: none;
    min-height: 44px;
    padding: 8px 20px;
  }

  .hero {
    padding: 56px 0 72px;
  }

  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
  }

  .h1-main {
    font-size: 36px;
  }

  .h1-sub {
    margin-top: 6px;
    font-size: 22px;
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero .btn {
    flex: none;
  }

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

  .price-groups {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start; /* 枠の高さを、内容にあわせる(行数が違っても空白ができない) */
  }

  .reason-layout {
    grid-template-columns: 5fr 7fr;
    gap: 40px;
    align-items: start;
  }

  /* 作業の流れ:縦から、横5列のカードに切り替える */
  .flow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }

  .flow li,
  .flow li:last-child {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background-color: var(--bg);
  }

  .flow li::before {
    position: static;
    margin-bottom: 8px;
  }

  .flow li:not(:last-child)::after {
    display: none;
  }

  .flow h3 {
    line-height: 1.5;
  }

  .contact-layout {
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: start;
  }

  .site-footer {
    padding: 48px 0;
  }

  /* PCでは固定バーを出さない(ヘッダーに電話番号と見積りボタンがあるため) */
  .quick-bar {
    display: none;
  }
}
