/* ==========================================================================
   ITO 2026
   色: 現行サイトのブランドカラーを継承（濃紺 #003d7b / 橙 #d06b1d）
   ========================================================================== */

:root {
  --navy: #003d7b;
  --navy-deep: #002a57;
  --navy-tint: #e6edf6;
  --blue-bright: #1068c4; /* 見出しの日本語。明るい青だが、淡い背景の上でも読める濃さ(コントラスト比4.5以上) */
  --on-dark-accent: #8fc3ff; /* 暗い背景(Company・フッター)の上で使う、明るい青 */
  --on-dark-hover: #1a9fe1; /* 暗い背景の上で、ホバー時に使う明るい青(フッターの電話・メールの丸) */
  --ink: #333333;
  --ink-soft: #5b6270;
  --paper: #eff2f7;
  --wood: #e5e3df;
  --line: #d9dee6;
  --orange: #d06b1d;
  --orange-deep: #b25511; /* 白文字を載せても読めるコントラストの橙 */

  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-en: "Outfit", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;

  --pill-h: 56px;
  --circle: 40px;
  --header-gap: 20px;
  --header-offset: calc(var(--pill-h) + var(--header-gap) * 2);
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: #e1edf7;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  display: block;
  flex: none;
}

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed; /* ロゴも右のピルも、スクロールしてもついてくる */
  top: var(--header-gap);
  left: var(--header-gap);
  right: var(--header-gap);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none; /* 余白は下の要素を操作できるようにする */
}

.site-header > * {
  pointer-events: auto;
}

/* ロゴ側は背景なし。画像 + 黒字の社名 */
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--pill-h);
  padding: 0 4px;
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header__mark {
  display: block;
  height: 40px;
  width: auto;
  transition: filter 0.2s ease;
}

/* 濃紺の帯（お問い合わせ帯・フッター）に重なっている間は白抜きにする */
.site-header.is-on-dark .site-header__logo {
  color: #fff;
}

.site-header.is-on-dark .site-header__name {
  text-shadow: none;
}

.site-header.is-on-dark .site-header__mark {
  filter: brightness(0) invert(1);
}

.site-header__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: nowrap;
  /* 写真の暗い部分に重なっても読めるよう、ごく薄い白いにじみを付ける */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 3px rgba(255, 255, 255, 0.9);
}

/* 右側のピル（半透明の白＋ぼかし） */
.site-header__actions {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(0, 30, 60, 0.08);
  transition: background-color 0.2s ease;
}

.site-header.is-scrolled .site-header__actions {
  background: rgba(255, 255, 255, 0.94);
}

/* 右側はすべて1つのピルに収める（ナビ・電話・お問い合わせ） */
.site-header__actions {
  display: flex;
  align-items: center;
  height: var(--pill-h);
  padding: 0 8px 0 10px;
  border-radius: 9999px;
}

.gnav {
  display: flex;
  align-items: center;
}

.gnav__list {
  display: flex;
  gap: 2px;
  margin: 0 8px 0 0;
  padding: 0 10px 0 0;
  list-style: none;
  border-right: 1px solid var(--line);
}

.gnav__link {
  display: block;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.gnav__link:hover,
.gnav__link:focus-visible {
  background: var(--navy-tint);
}

.gnav__link[aria-current="page"] {
  background: var(--navy-tint);
  color: var(--navy);
  font-weight: 700;
}

/* 青い丸の中に白いアイコン（電話・メール・メニュー共通） */
.circle {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--circle);
  height: var(--circle);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

/* ホバー・キーボードフォーカスで、アイコンだけが動く（電話は揺れる／メールは弾む） */
@keyframes icon-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-8deg); }
  80% { transform: rotate(5deg); }
}

@keyframes icon-lift {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-3px); }
  70% { transform: translateY(1px); }
}

.gnav__tel:hover .icon,
.gnav__tel:focus-visible .icon,
a.circle:hover .icon--phone,
a.circle:focus-visible .icon--phone {
  animation: icon-ring 0.6s ease-in-out;
}

.gnav__contact:hover .icon,
.gnav__contact:focus-visible .icon {
  animation: icon-lift 0.5s ease-out;
}

.gnav__cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 4px 4px;
  border-radius: 9999px;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
}

.gnav__tel-text {
  display: grid;
}

.gnav__tel-num {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gnav__tel-hours {
  font-size: 11px;
  color: var(--ink-soft);
}

.gnav__cta-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* タブレット以下で右側に出る、電話とメニューだけの小さなピル */
.site-header__mobile {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (max-width: 1179px) {
  .gnav {
    display: none;
  }

  .site-header__mobile {
    display: flex;
  }

  .site-header__actions {
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  :root {
    --pill-h: 48px;
    --circle: 34px;
    --header-gap: 12px;
  }

  .site-header__logo {
    gap: 8px;
    padding: 0;
  }

  .site-header__mark {
    height: 32px;
  }

  .site-header__name {
    font-size: 16px;
    letter-spacing: 0.04em;
  }
}

/* ページ内で使う、濃紺の塗りボタン（採用のメール問い合わせなど） */
.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--pill-h);
  padding: 0 24px;
  border-radius: 9999px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-contact:hover,
.btn-contact:focus-visible {
  background: var(--navy-deep);
}

.btn-contact--lg {
  padding: 0 32px;
  font-size: 16px;
}

/* ---------- Drawer ---------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  background: var(--navy-deep);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

.drawer__inner {
  width: min(560px, 100% - 40px);
  margin-inline: auto;
  padding: var(--header-gap) 0 48px;
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.drawer__list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.drawer__list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.drawer__link {
  display: block;
  padding: 18px 4px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fff;
  text-decoration: none;
}

.drawer__link[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.drawer__tel {
  display: grid;
  gap: 2px;
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: 20px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  text-align: center;
}

.drawer__tel-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.drawer__tel-num {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.drawer__tel-hours {
  font-size: 13px;
  color: var(--ink-soft);
}

.drawer__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  margin-top: 12px;
  border-radius: 9999px;
  background: var(--orange-deep);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
}

/* ---------- ページ全体の固定背景 ----------
   画像は header.php が --bg-pc / --bg-sp として渡す(assets/img/bg.* と bg-sp.*)。
   調整はここの2つの変数だけでできる:
     --bg-wash: 白いぼかしの濃さ(0〜1)。大きいほど写真が薄くなり、文字が読みやすくなる
     --bg-pos : 画像の位置。縦横の比率が合わないとき、どこを残すか(例: center / 30% 50%)
   ------------------------------------------------------------------ */

.site-bg {
  --bg-wash: 0.62;
  --bg-pos: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  z-index: -1;
  background-color: #eff0f0;
  background-image: var(--bg-pc);
  background-size: cover;
  background-position: var(--bg-pos);
  background-repeat: no-repeat;
}

/* スマホ(767px以下)は、縦長の bg-sp を使う。無ければ PC 用と同じ画像 */
@media (max-width: 767px) {
  .site-bg:not(.site-bg--empty) {
    background-image: var(--bg-sp, var(--bg-pc));
  }
}

/* 写真を敷いたときは、白く明るくぼかして文字を読みやすくする */
.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, var(--bg-wash));
}

/* 画像が無いときは、桃色・水色・グレーをぼかした淡いグラデーション */
.site-bg--empty {
  background-image:
    radial-gradient(45% 40% at 48% 0%, rgba(255, 226, 208, 0.85) 0%, rgba(255, 226, 208, 0) 100%),
    radial-gradient(40% 45% at 0% 100%, rgba(214, 236, 250, 0.9) 0%, rgba(214, 236, 250, 0) 100%),
    radial-gradient(35% 45% at 100% 50%, rgba(222, 224, 227, 0.9) 0%, rgba(222, 224, 227, 0) 100%),
    radial-gradient(35% 45% at 0% 20%, rgba(222, 224, 227, 0.8) 0%, rgba(222, 224, 227, 0) 100%),
    radial-gradient(40% 40% at 95% 100%, rgba(250, 228, 222, 0.8) 0%, rgba(250, 228, 222, 0) 100%),
    radial-gradient(50% 45% at 55% 70%, #fff 0%, rgba(255, 255, 255, 0) 100%);
}

.site-bg--empty::after {
  display: none;
}

/* ---------- MV（ファーストビュー） ----------
   参考サイト(holon-inc.jp)と同じ考え方:
   - 768px以上: 写真の枠も文字も vw で比例して縮む(英語の大見出しだけ100pxが下限)
   - 767px以下: 1か所だけ切り替え。写真が大きくなり、3枚の行が画面より広がって中央の1枚が見える
   ------------------------------------------------------------------ */

.mv {
  position: relative;
  overflow: hidden;
}

.mv__inner {
  position: relative;
  padding-top: 25.7vw;
  padding-bottom: 4vw;
}

/* テキスト: 写真の上に重ねる。縦は写真の上寄りの位置を中心にする */
.mv__text {
  position: absolute;
  z-index: 10;
  top: 35.4vw;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
}

.mv__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--navy-deep);
}

.mv__lead {
  margin-bottom: max(0.8vw, 8px);
  font-size: max(2.1vw, 18px);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--navy);
  animation: mv-fade 0.9s ease backwards;
}

.mv__display {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: max(10.71vw, 100px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.mv__en {
  position: relative;
  display: block;
  white-space: nowrap;
}

/* 2行を中心からずらして、行ごとに動きを出す */
.mv__en--1 { left: 3.28vw; }
.mv__en--2 { left: -4.5vw; }

.mv__and {
  display: inline-block;
  margin-left: 0.1em;
  font-size: 0.87em;
  color: var(--orange-deep);
}

.mv__space {
  display: inline-block;
  width: 0.2em;
}

.mv__char {
  display: inline-block;
  animation: mv-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}

/* 3枚の写真: 同じ大きさの枠を横に並べ、上端の高さだけをずらす */
.mv__frames {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  margin-top: 11.43vw;
  padding-inline: 1.5vw 1.85vw;
}

.mv__frame {
  position: relative;
  flex: none;
  width: 30.8vw;
  aspect-ratio: 3 / 4;
  overflow: hidden; /* 枠からはみ出した写真は隠す */
  background: var(--wood);
  animation: mv-wipe 1.4s cubic-bezier(0.65, 0, 0.35, 1) backwards;
  animation-delay: calc(var(--n) * 0.18s + 0.3s);
}

.mv__frame--0 { margin-top: 0; }
.mv__frame--1 { margin-top: 6.28vw; }
.mv__frame--2 { margin-top: 1.5vw; }

/* 枠より横に広い写真を、枠の中でゆっくり左右に流す */
.mv__pan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -14%;
  width: 114%;
  animation: mv-pan 28s ease-in-out infinite alternate;
  will-change: transform;
}

.mv__frame--1 .mv__pan { animation-duration: 34s; animation-delay: -8s; }
.mv__frame--2 .mv__pan { animation-duration: 30s; animation-delay: -15s; }

.mv__pan img,
.mv__pan .ph {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
}

@keyframes mv-pan {
  to { transform: translateX(12.28%); } /* 写真の幅に対する割合。枠が隙間なく埋まる最大の移動量 */
}

@keyframes mv-wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes mv-rise {
  from { opacity: 0; transform: translateY(0.35em); }
}

@keyframes mv-fade {
  from { opacity: 0; }
}

/* 767px以下: 写真を大きくして、3枚の行を画面より広げる。中央の1枚が全部、左右は端だけ見える */
@media (max-width: 767px) {
  .mv__inner {
    padding-top: 71.46vw;
    padding-bottom: 11.46vw;
    margin-bottom: 48px;
  }

  .mv__text {
    top: 44.4%;
  }

  .mv__lead {
    font-size: max(3.8vw, 13px);
  }

  .mv__display {
    font-size: 16vw;
  }

  .mv__and {
    font-size: 0.87em;
    margin-left: 0.08em;
  }

  .mv__en--1 { left: 5.33vw; }
  .mv__en--2 { left: -2.13vw; }

  .mv__frames {
    width: 166.3vw;
    margin-top: 0;
    margin-left: -33vw;
  }

  .mv__frame {
    width: 51.4vw;
    aspect-ratio: 2 / 3;
  }

  .mv__frame--1 { margin-top: 11.46vw; }
  .mv__frame--2 { margin-top: 2.93vw; }
}

/* ---------- Sections ---------- */

.section {
  /* 本文(.container)の左右の余白と同じ値。見出しの位置の基準にする */
  --inset-x: max(24px, calc((100% - 1120px) / 2));
  /* 見出しとリード文を、本文より左へ張り出す量 */
  --out-x: clamp(0px, 4vw, 72px);
  padding: clamp(64px, 10vw, 120px) 0;
  scroll-margin-top: var(--header-offset);
}

.section--paper {
  background: rgba(255, 255, 255, 0.55); /* 固定背景が透けて見える帯 */
}

/* 見出し・リード文は .container の外に置き、本文より少し左へ張り出す。
   右側(一覧リンクなど)は、本文の右端にそろえる */
.section__intro,
.section__head {
  margin-left: max(16px, calc(var(--inset-x) - var(--out-x)));
  margin-right: var(--inset-x);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 32px;
}

/* セクション見出し: 英語を大きく、日本語を小さく、2行 */
.section__title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 clamp(20px, 3vw, 32px);
  color: var(--navy);
}

.section__title-en {
  font-family: var(--font-en);
  font-size: clamp(60px, 4.6vw + 42px, 120px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  text-wrap: balance; /* 狭い幅で2行になるとき、行の長さをそろえる */
}

.section__title-ja {
  font-size: clamp(14px, 1.3vw, 16px);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--blue-bright);
}

.section__head .section__title {
  margin: 0;
}

.section__lead {
  max-width: 40em;
  margin: 0 0 32px;
}

/* 事業紹介のリード文 */
.section__lead--service {
  max-width: 42em;
  margin-bottom: clamp(28px, 4vw, 48px);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 2.1;
  text-wrap: pretty; /* 折り返しで1〜2文字だけの行が残らないようにする(対応ブラウザのみ) */
}

.section__lead--service strong {
  font-weight: 700;
  color: var(--navy);
}

/* リンクボタン: ピル型。ホバー・フォーカスで濃紺に塗りつぶす */
.link-more,
.service__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  border: 1.5px solid var(--navy);
  border-radius: 9999px;
  background: transparent;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.link-more:hover,
.link-more:focus-visible,
.service:hover .service__more,
.service:focus-visible .service__more {
  background: var(--navy);
  color: #fff;
}

/* ---------- Service ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

/* 事業ごとに、白い角丸のカード */
.service {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.8vw, 24px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.ph {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  background: var(--wood);
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

.service .ph {
  border-radius: clamp(12px, 1.6vw, 24px);
}

/* トップのService: 写真(assets/img/service-house.* / service-material.*)は、枠いっぱいに敷く。無い間は「写真（仮）」 */
.service__photo {
  position: relative;
  overflow: hidden;
}

.service__photo picture,
.service__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service__title {
  margin: 20px 0 4px;
  padding-inline: clamp(4px, 0.8vw, 12px);
  font-size: 24px;
  color: var(--navy);
}

.service__text {
  margin: 0 0 20px;
  padding-inline: clamp(4px, 0.8vw, 12px);
}

.service__more {
  align-self: flex-start;
  margin: auto 0 4px clamp(4px, 0.8vw, 12px);
}

/* ---------- Works（施工事例）: 境目のティッカーと、スライドする1列 ---------- */

.works {
  /* 全部見えるカードの数(その次の1枚は半分だけ見える)・カードの間隔・左のあき */
  --show: 4;
  --gap: 24px;
  --rail-left: 14vw;
  position: relative;
  overflow-x: clip; /* 英字などが横にはみ出しても、ページに横スクロールを出さない */
}

/* Service と Works の境目(この帯の上端)をまたぐ、細字の英語。動かさず固定。左端から20px */
.works__en {
  position: absolute;
  top: 0;
  left: 20px;
  z-index: 5;
  margin: 0;
  transform: translateY(-50%); /* 境目の線が、文字の縦の真ん中を通る */
  font-family: var(--font-en);
  font-size: clamp(20px, 7.2vw, 144px); /* 1行で画面の幅に収まる大きさ */
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  /* 薄いグレー。透かしているので、背景が白でも灰色でも、ほどよく見える */
  color: rgba(110, 120, 135, 0.3);
  pointer-events: none;
}

/* 見出しは右寄せ。画面の右端から20pxあける */
.works__head {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-right: 20px;
  margin-bottom: clamp(32px, 4vw, 56px);
  text-align: right;
}

.works__head .section__title {
  align-items: flex-end;
  margin: 0;
}

/* 事例の行: 左を空けて右寄せ。右端は画面の外へ続く */
.works__rail {
  margin-left: var(--rail-left);
  overflow: hidden;
  container-type: inline-size;
}

.works__track {
  display: flex;
  width: max-content;
  will-change: transform; /* 3秒ごとの1枚ぶんの動きは、works.js が transform で行う */
}

.works__set {
  display: flex;
  flex: none;
  gap: var(--gap);
  margin: 0;
  padding: 0 var(--gap) 0 0; /* 2セットがぴったり半分ずつになるようにする */
  list-style: none;
}

/* 幅 = (行の幅 − 間隔×全部見える数) ÷ (全部見える数 + 0.5) → 全部見える数のカードと、次の1枚の半分が見える */
.works__item {
  flex: none;
  width: calc((100vw - var(--rail-left) - var(--show) * var(--gap)) / (var(--show) + 0.5));
}

@supports (width: 1cqw) {
  .works__item {
    width: calc((100cqw - var(--show) * var(--gap)) / (var(--show) + 0.5));
  }
}

/* 手で動かす矢印: 丸い枠線ボタン。事例の下、右端から20px */
.works__controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: clamp(20px, 2.4vw, 32px);
  padding-right: 20px;
}

.works__controls[hidden] {
  display: none;
}

.works__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.works__btn:hover,
.works__btn:focus-visible {
  background: var(--navy);
  color: #fff;
}

.works__empty {
  margin: 0 0 0 var(--rail-left);
}

/* タブレット: 3つ + 4つ目が半分 */
@media (max-width: 1179px) {
  .works {
    --show: 3;
    --gap: 20px;
    --rail-left: 10vw;
  }
}

/* スマホ: 1つ + 2つ目が半分 */
@media (max-width: 767px) {
  .works {
    --show: 1;
    --gap: 14px;
    --rail-left: 8vw;
  }

  .works__en {
    font-weight: 300; /* 文字が小さくなる分、少しだけ太く */
  }
}

/* ---------- Cards (施工事例) ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 36px 24px;
}

.card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--wood);
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 14px 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.card__link:hover .card__title,
.card__link:focus-visible .card__title {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card__date {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Company / Recruit ---------- */

.profile {
  display: grid;
  grid-template-columns: 8em 1fr;
  margin: 0 0 48px;
  max-width: 760px;
  border-top: 1px solid var(--line);
}

.profile dt,
.profile dd {
  margin: 0;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
}

.profile dt {
  font-weight: 700;
  color: var(--navy);
}

.note {
  font-size: 14px;
  color: var(--ink-soft);
}

.jobs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jobs li + li {
  margin-top: 12px;
}

.jobs strong {
  display: block;
}

.recruit__cta {
  margin: 0;
}

@media (max-width: 720px) {
  .profile {
    grid-template-columns: 1fr;
  }

  .profile dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .profile dd {
    padding-top: 4px;
  }

}

/* ---------- Company: 背景に画像 + 濃いオーバーレイ ----------
   画像は front-page.php が --img-pc / --img-sp として渡す(assets/img/company.* と company-sp.*)。
   調整は --company-overlay(オーバーレイの濃さ 0〜1)と --company-pos(画像の位置)だけ
   ---------------------------------------------------------------- */

.company {
  --company-overlay: 0.78;
  --company-pos: center;
  position: relative;
  isolation: isolate;
  color: #fff;
  background-color: var(--navy-deep);
  background-image: var(--img-pc);
  background-size: cover;
  background-position: var(--company-pos);
  background-repeat: no-repeat;
}

/* 濃いオーバーレイ(紺)。写真が明るくても、白い文字が読める濃さ */
.company::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 28, 58, var(--company-overlay));
}

/* 画像が無いときは、濃紺のグラデーション */
.company--empty {
  background-image: linear-gradient(135deg, #0a4a8c 0%, var(--navy-deep) 70%);
}

.company--empty::before {
  display: none;
}

/* スマホ(767px以下)は、縦長の company-sp を使う。無ければPC用と同じ画像 */
@media (max-width: 767px) {
  .company:not(.company--empty) {
    background-image: var(--img-sp, var(--img-pc));
  }
}

/* 暗い背景に合わせて、文字・線を白系に */
/* 暗い背景の上: 見出し・日本語・線をすべて白系に */
.company .section__title,
.company .section__title-ja {
  color: #fff;
}

/* 左: 縦書きの見出し(左端から10%、スクロール中は画面に追従)  右: 本文(代表挨拶 → 概要)
   タブレット以下: 見出しの右側の中で、本文を左右中央に置く */
.company__layout {
  /* 見出しが左に占める幅(左の10% + 縦書きの見出し + 余白) */
  --company-side: calc(10vw + clamp(44px, 6.4vw, 104px) + clamp(14px, 1.3vw, 17px) + 72px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 5vw, 80px);
  padding-left: 10%;
  padding-right: clamp(20px, 5vw, 80px);
}

/* PC(1180px以上): 本文の左右に、同じ幅の余白を取る → 本文が画面の左右中央に来る。
   画面が狭いときは、見出しと重ならないよう、本文の幅のほうを縮める */
@media (min-width: 1180px) {
  .company__layout {
    grid-template-columns:
      minmax(var(--company-side), 1fr)
      minmax(0, 880px)
      minmax(var(--company-side), 1fr);
    gap: 0;
    padding-inline: 0;
  }

  /* 後ろにある .company__title の「margin: 0」に打ち消されないよう、セレクターを強くしている */
  .company__layout .company__title {
    grid-column: 1;
    margin-left: 10vw;
  }

  .company__layout .company__body {
    grid-column: 2;
  }
}

.company__title {
  position: sticky;
  top: calc(var(--header-offset) + 16px);
  flex-direction: column-reverse; /* 縦書きでは、英語が左・日本語が右(本文側)になる */
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  writing-mode: vertical-rl;
}

.company__title .section__title-en {
  font-size: clamp(44px, 6.4vw, 104px);
}

.company__title .section__title-ja {
  font-size: clamp(14px, 1.3vw, 17px);
  letter-spacing: 0.3em;
}

.company__body {
  --block-gap: clamp(56px, 7vw, 104px);
  width: 100%;
  max-width: 880px;
  margin-inline: auto; /* 左右中央 */
}

/* ブロックの間は、線なし。余白だけ */
.company__block + .company__block {
  margin-top: var(--block-gap);
}

/* 本文の見出しの共通ルール(英語・日本語を並べる入れ物と、下の余白) */
.company__sub {
  display: flex;
  margin: 0 0 clamp(20px, 2.4vw, 32px);
}

/* 見出し「Outline / 概要」: 英語と日本語を縦に積み、すべて #8fc3ff。線なし */
.company__sub--outline {
  flex-direction: column;
  gap: 4px;
  color: var(--on-dark-accent);
}

.company__sub--outline .company__sub-en {
  font-family: var(--font-en);
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--on-dark-accent);
}

.company__sub--outline .company__sub-ja {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--on-dark-accent);
}

/* 代表挨拶の本文と氏名: 概要の表と同じ横幅(最大幅は指定しない) */
.company__text {
  max-width: none;
}

.company__text p {
  margin: 0 0 1.3em;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 2.1;
  color: rgba(255, 255, 255, 0.94);
}

.company__sign {
  display: flex;
  align-items: baseline;
  justify-content: flex-end; /* 氏名は右端 */
  gap: 0.9em;
  margin: 0;
}

.company__sign small {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
}

.company__sign strong {
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: 0.14em;
}

/* 概要の表: 背景なし。細い罫線 */
.company__table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.company__table th,
.company__table td {
  padding: clamp(14px, 1.6vw, 20px) 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.8;
}

.company__table th {
  width: 9em;
  font-weight: 700;
  color: var(--on-dark-accent);
  white-space: nowrap;
}

.profile__map {
  display: block;
  margin-top: 12px;
}

/* 暗い背景用のピル型リンク(白枠 → ホバーで白く塗りつぶす) */
.link-more--sm {
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  font-size: 13px;
}

.link-more--light {
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.link-more--light:hover,
.link-more--light:focus-visible {
  background: #fff;
  color: var(--navy);
}

@media (max-width: 767px) {
  .company__table,
  .company__table tbody,
  .company__table tr,
  .company__table th,
  .company__table td {
    display: block;
    width: 100%;
  }

  .company__table th {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .company__table td {
    padding-top: 4px;
  }

  .company__layout {
    padding-left: 16px;
    padding-right: 20px;
    gap: 16px;
  }

  .company__title {
    gap: 10px;
  }

  .company__title .section__title-en {
    font-size: clamp(40px, 11vw, 56px);
  }

  .company__title .section__title-ja {
    font-size: 13px;
    letter-spacing: 0.24em;
  }
}

/* ---------- Recruit: 左にコンテンツ・右に写真(高さは左に合わせる)・背景は固定 ---------- */

.recruit {
  --recruit-wash: 0.72; /* 固定背景(画像)の上に重ねる白の濃さ(0〜1)。大きいほど背景が薄くなり、文字が読みやすい */
  position: relative;
  isolation: isolate;
}

/* このセクションだけの固定背景。無いときは、ページ全体の固定背景がそのまま見える */
.recruit--has-bg {
  clip-path: inset(0); /* 固定した背景を、このセクションの中だけに見せる */
}

.recruit__bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  z-index: -1;
  background-image: var(--img-pc);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.recruit__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, var(--recruit-wash));
}

/* 左右2列。写真の列は、左のコンテンツと同じ高さに引き伸ばされる。右端は画面の端まで */
.recruit__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(32px, 5vw, 80px);
  padding-left: max(16px, calc(var(--inset-x) - var(--out-x))); /* 他のセクションの見出しと左端をそろえる */
}

.recruit__content .section__lead {
  max-width: 40em;
}

.recruit__content .profile {
  margin-bottom: 40px;
}

/* 写真: 画像そのものは高さを決めず(absolute)、列の高さいっぱいに敷く = 左のコンテンツと同じ高さ */
.recruit__photo {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: clamp(20px, 2.4vw, 36px) 0 0 clamp(20px, 2.4vw, 36px);
  background: var(--wood);
}

.recruit__photo picture,
.recruit__photo img,
.recruit__photo .ph {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: cover;
}

/* スマホ(767px以下): 上にコンテンツ、下に写真(4:3) */
@media (max-width: 767px) {
  /* 「採用についてメールで問い合わせる」が2行に折り返さないよう、文字と余白を少し小さくする */
  .recruit__content .btn-contact--lg {
    padding: 0 22px;
    font-size: 15px;
    white-space: nowrap;
  }

  .recruit__layout {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-inline: 24px;
  }

  .recruit__photo {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }
}

/* ---------- News ---------- */

.news-item {
  border-bottom: 1px solid var(--line);
}

.news-item:last-child {
  border-bottom: 0;
}

/* 一覧は、白い角丸の箱。行の間の線は箱の端から端まで */
.news-list {
  overflow: hidden;
  border-radius: clamp(16px, 2vw, 28px);
  background: #fff;
}

/* トップ: 一覧を、見出しの左端から、本文の右端まで伸ばす */
.news .news-list,
.news .news__empty {
  margin-left: max(16px, calc(var(--inset-x) - var(--out-x)));
  margin-right: var(--inset-x);
}

.news-item__link {
  display: grid;
  grid-template-columns: 7em 6em 1fr auto; /* 日付 / 分類 / タイトル / 右端の矢印。分類の列は、中身が無くても幅を取る */
  align-items: baseline;
  gap: 4px 16px;
  /* 上下を広く。右: ＞の絵の右の空きが約6pxあるので、14pxで、＞の右に残る余りが約20pxになる */
  padding: clamp(22px, 2.4vw, 30px) 14px clamp(22px, 2.4vw, 30px) 24px;
  color: inherit;
  text-decoration: none;
}

.news-item__date {
  grid-column: 1;
  font-size: 16px;
  color: var(--ink-soft);
}

.news-item__label {
  grid-column: 2; /* 分類が無い投稿でも、タイトルや矢印の列がずれないよう、列を指定する */
  justify-self: start; /* グリッドの列いっぱいに伸びず、文字の幅に合わせる */
  display: inline-block;
  padding: 1px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
  background: var(--navy-tint);
  color: var(--navy);
}

.news-item__label--chat {
  background: var(--wood);
  color: var(--ink);
}

.news-item__title {
  grid-column: 3;
  font-weight: 500;
}

.news-item__link:focus-visible {
  outline-offset: -3px; /* 一覧の箱(overflow: hidden)で、枠が切れないように内側へ */
}

.news-item__link:hover .news-item__title,
.news-item__link:focus-visible .news-item__title {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 右端の ＞ : ホバー・フォーカスで、右へ動く */
.news-item__arrow {
  grid-column: 4; /* どの投稿でも、枠の右端の同じ位置 */
  display: grid;
  place-items: center;
  align-self: center;
  color: var(--navy);
  transition: transform 0.25s ease;
}

.news-item__link:hover .news-item__arrow,
.news-item__link:focus-visible .news-item__arrow {
  transform: translateX(8px);
}

@media (max-width: 640px) {
  /* 1行目: 日付と分類 / 2行目: タイトル / 矢印は右端で、2行の真ん中 */
  .news-item__link {
    grid-template-columns: auto 1fr auto;
  }

  .news-item__date {
    grid-column: 1;
    grid-row: 1;
  }

  .news-item__label {
    grid-column: 2;
    grid-row: 1;
  }

  .news-item__title {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .news-item__arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

/* ---------- Footer ----------
   参考: eiwa01.co.jp
   1. 写真のバナー(写真だけ)  2. 暗い背景(本社 / CONTACT / サイトマップ)  3. 白い帯(ロゴ・コピーライト)
   ---------------------------------------------------------------- */

/* 1. 写真だけのバナー。写真は画面に固定され、スクロールすると、バナーの窓の中で動いて見える */
.footer-photo {
  position: relative;
  isolation: isolate;
  clip-path: inset(0);
  height: clamp(220px, 33vw, 480px);
  background: var(--navy-deep);
}

.footer-photo__bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  z-index: -1;
  background-image: var(--img-pc);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 写真が無いときは、濃紺のグラデーション */
.footer-photo--empty .footer-photo__bg {
  background-image: linear-gradient(135deg, #0a4a8c 0%, var(--navy-deep) 70%);
}

@media (max-width: 767px) {
  .footer-photo__bg {
    background-image: var(--img-sp, var(--img-pc));
  }

  .footer-photo--empty .footer-photo__bg {
    background-image: linear-gradient(135deg, #0a4a8c 0%, var(--navy-deep) 70%);
  }
}

/* 2. 暗い背景 */
.footer-main {
  padding: clamp(48px, 6vw, 88px) 0 clamp(48px, 6vw, 96px);
  background: var(--navy-deep);
  color: #fff;
}

.footer-main a {
  color: #fff;
}

.footer-main__inner {
  display: grid;
  gap: clamp(44px, 6vw, 80px);
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

/* 本社: 左に写真、右に住所 */
.footer-office {
  display: grid;
  grid-template-columns: clamp(110px, 18vw, 248px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  max-width: 640px;
}

.footer-office__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.footer-office__photo picture,
.footer-office__photo img,
.footer-office__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-office__ph {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-office__name {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.footer-office__address {
  font-size: 14px;
  font-style: normal;
  line-height: 1.9;
}

.footer-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-map .icon {
  width: 16px;
  height: 16px;
}

.footer-map:hover,
.footer-map:focus-visible {
  opacity: 0.75;
}

/* 左: CONTACT  /  縦の線  /  右: サイトマップ */
.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: start;
}

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

.footer-contact {
  padding-right: clamp(24px, 4vw, 64px);
}

.footer-contact__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 12px;
}

.footer-contact__en {
  font-family: var(--font-en);
  font-size: clamp(48px, 5vw, 70px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.footer-contact__ja {
  font-size: 16px;
  font-weight: 700;
}

.footer-contact__lead {
  margin: 0 0 32px;
  font-size: 15px;
  font-weight: 700;
}

.footer-contact__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  text-decoration: none;
}

.footer-contact__row + .footer-contact__row {
  margin-top: 18px;
}

.footer-contact__circle {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy-deep);
  transition: background-color 0.2s ease;
}

.footer-contact__row:hover .footer-contact__circle,
.footer-contact__row:focus-visible .footer-contact__circle {
  background: var(--on-dark-hover);
}

.footer-contact__tel {
  font-family: var(--font-en);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.footer-contact__hours {
  font-size: 14px;
}

.footer-contact__form {
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
}

.footer-contact__arrow {
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
}

.footer-contact__row--form:hover .footer-contact__arrow,
.footer-contact__row--form:focus-visible .footer-contact__arrow {
  transform: translateX(6px);
}

/* サイトマップ(左に縦の線) */
.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: 36px 32px;
  padding-left: clamp(24px, 4vw, 64px);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-cols--single .footer-sitemap {
  padding-left: 0;
  border-left: 0;
}

.footer-sitemap__head {
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.footer-sitemap__sub {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-sitemap__sub a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer-sitemap__sub a::before {
  content: "— ";
}

.footer-sitemap a:hover,
.footer-sitemap a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 3. 白い帯: ロゴとコピーライト */
.footer-bottom {
  padding: 36px 24px 30px;
  background: #fff;
  text-align: center;
}

.footer-bottom__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111;
  text-decoration: none;
}

.footer-bottom__mark {
  display: block;
  height: 36px;
  width: auto;
}

.footer-bottom__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-bottom__copy {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* タブレット以下: CONTACT とサイトマップを縦に並べる(縦線は横線に) */
@media (max-width: 1023px) {
  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .footer-contact {
    padding-right: 0;
  }

  .footer-sitemap {
    padding-top: 40px;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 0;
  }

  .footer-cols--single .footer-sitemap {
    padding-top: 0;
    border-top: 0;
  }
}

@media (max-width: 767px) {
  .footer-sitemap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
}

/* ---------- 下層ページのMV(ページタイトル)とパンくず ----------
   参考: mutsu-s.co.jp/about/
   大きな英語のタイトル(頭文字だけ橙)+ 日本語(短い線つき)+ 右奥に、淡い巨大な英字(右へはみ出す)
   ---------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow-x: clip; /* 右へはみ出す巨大な英字で、横スクロールが出ないように */
  padding: calc(var(--header-offset) + clamp(24px, 4vw, 56px)) 0 clamp(40px, 6vw, 80px);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  color: var(--navy);
}

.page-hero__en {
  font-family: var(--font-en);
  font-size: clamp(56px, 3.2vw + 28px, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.page-hero__accent {
  color: var(--orange);
}

.page-hero__ja {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(16px, 1.4vw, 20px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-hero__ja::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--orange);
}

/* 右奥の淡い巨大な英字: 固定背景の上で、白く浮かぶ */
.page-hero__ghost {
  position: absolute;
  top: calc(var(--header-offset) - 8px);
  left: 52%;
  z-index: 0;
  font-family: var(--font-en);
  font-size: clamp(120px, 14vw, 300px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  user-select: none;
}

/* 長い英語(News & Chat など)は、小さめにして、ほぼ全体が見えるように */
.page-hero__ghost--long {
  font-size: clamp(80px, 9vw, 190px);
}

/* 表示したとき: パンくず → 英語 → 日本語の順にふわっと上がり、巨大な英字は右から入る */
@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-ghost {
  from {
    opacity: 0;
    transform: translateX(48px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.page-hero .breadcrumb,
.page-hero__en,
.page-hero__ja {
  animation: hero-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.page-hero__en {
  animation-delay: 0.1s;
}

.page-hero__ja {
  animation-delay: 0.25s;
}

.page-hero__ghost {
  animation: hero-ghost 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}

@media (prefers-reduced-motion: reduce) {
  .page-hero .breadcrumb,
  .page-hero__en,
  .page-hero__ja,
  .page-hero__ghost {
    animation: none;
  }
}

/* パンくず: 半透明の白いピル(ヘッダーと同じ雰囲気)。長いときは横にスクロール */
.breadcrumb {
  margin: 0 0 clamp(24px, 3vw, 40px);
  max-width: 100%;
}

.breadcrumb__list {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  padding: 10px 20px;
  overflow-x: auto;
  list-style: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumb__list::-webkit-scrollbar {
  display: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
}

/* 区切りは、小さな「›」 */
.breadcrumb__item + .breadcrumb__item::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 14px 0 10px;
  border-top: 1.5px solid var(--ink-soft);
  border-right: 1.5px solid var(--ink-soft);
  opacity: 0.55;
  transform: rotate(45deg);
}

.breadcrumb__link,
.breadcrumb__current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb__link {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb__link:hover,
.breadcrumb__link:focus-visible {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.breadcrumb__current {
  font-weight: 700;
  color: var(--navy);
}

.breadcrumb .icon {
  width: 16px;
  height: 16px;
}

/* ---------- 事業紹介ページ ---------- */

/* MVの直後の導入文のセクションは、上の余白を詰める */
.svc-intro.section {
  padding-top: 0;
}

/* 2事業の導入文: 行の長さをそろえる。折り返しは、意味のまとまり(.phrase)の境目だけ */
.svc .section__lead {
  text-wrap: balance;
}

.phrase {
  display: inline-block;
}

/* ページのタイトルより、セクションの見出しが大きくならないよう、小さめ */
.section__title--sub .section__title-en {
  font-size: clamp(36px, 2.6vw + 20px, 60px);
}

/* 2事業へのジャンプ: 白い角丸のカード + 下向きの矢印 */
.svc-jump {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.svc-jump__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 32px) clamp(22px, 2.8vw, 40px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.svc-jump__body {
  display: grid;
  gap: 2px;
}

.svc-jump__en {
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--blue-bright);
}

.svc-jump__ja {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
}

.svc-jump__text {
  font-size: 14px;
  color: var(--ink-soft);
  text-wrap: balance; /* 狭い幅で「ム」だけの行が残らないように */
}

.svc-jump__arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

.svc-jump__arrow .icon {
  transform: rotate(90deg); /* 右向きの ＞ を、下向きにする */
}

.svc-jump__item:hover .svc-jump__arrow,
.svc-jump__item:focus-visible .svc-jump__arrow {
  background: var(--navy);
  color: #fff;
  transform: translateY(4px);
}

/* 事業ごとのカード(トップのService・お知らせと同じ、白い角丸) */
.svc-cards,
.svc-products {
  display: grid;
  gap: clamp(16px, 2.4vw, 32px);
}

.svc-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.svc-products {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.svc-card {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.8vw, 24px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
}

/* 写真: 画像は枠いっぱいに敷く。無い間は「写真（仮）」 */
.svc-card__photo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: var(--ratio, 11 / 8);
  border-radius: clamp(12px, 1.6vw, 24px);
  background: var(--wood);
  color: var(--ink-soft);
  font-size: 14px;
}

.svc-card__photo picture,
.svc-card__photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.svc-card__en {
  margin: 20px 0 0;
  padding-inline: clamp(4px, 0.8vw, 12px);
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
}

.svc-card__title {
  margin: 2px 0 12px;
  padding-inline: clamp(4px, 0.8vw, 12px);
  font-size: clamp(22px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--navy);
}

.svc-card__title--product {
  margin-top: 20px;
  font-size: clamp(18px, 1.5vw, 22px);
}

.svc-card__text {
  margin: 0 0 8px;
  padding-inline: clamp(4px, 0.8vw, 12px);
}

/* 取扱商品の見出しと、品目のタグ */
.svc-subtitle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 20px;
  color: var(--navy);
}

.svc-subtitle__en {
  font-family: var(--font-en);
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 500;
}

.svc-subtitle__ja {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue-bright);
}

.svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0 clamp(4px, 0.8vw, 12px) 8px;
  list-style: none;
}

.svc-chip {
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--navy-tint);
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.svc-chip--etc {
  padding-inline: 4px;
  background: none;
  color: var(--ink-soft);
}

/* カード・小見出し・ボタンは、セクションの見出し(.section__intro)と同じ左端・右端にそろえる */
.svc-cards,
.svc-more,
.svc-subtitle,
.svc-products {
  margin-left: max(16px, calc(var(--inset-x) - var(--out-x)));
  margin-right: var(--inset-x);
}

/* 施工事例へのボタン: 2つのカードの下に1つ。カードの幅の中央 */
.svc-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, 3vw, 40px);
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .svc-jump,
  .svc-cards {
    grid-template-columns: 1fr;
  }

  /* スマホ: 巨大な英字は小さめに。右へはみ出す */
  .page-hero__ghost {
    left: 40%;
    font-size: 30vw;
  }

  .page-hero__ghost--long {
    left: 36%;
    font-size: 17vw;
  }
}

/* ---------- お問い合わせ ----------
   電話のセクション → ステップバー(入力・確認・完了)→ 白い角丸のカードの中に、フォーム
   ---------------------------------------------------------------- */

/* MV の直後。上の余白は詰める */
.contact-tel.section {
  padding-top: 0;
  padding-bottom: clamp(24px, 3vw, 40px);
}

.contact.section {
  padding-top: clamp(40px, 6vw, 80px); /* 電話のセクションとの間を、あける */
}

/* 電話のセクション: トップ・事業紹介と同じ、白い角丸のカード */
.contact-tel__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 48px;
  padding: clamp(24px, 3vw, 40px) clamp(24px, 4vw, 56px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
}

.contact-tel__en {
  margin: 0;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--blue-bright);
}

.contact-tel__title {
  margin: 2px 0 6px;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--navy);
}

.contact-tel__text {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.contact-tel__call {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--navy);
  text-decoration: none;
}

.contact-tel__circle {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  transition: background-color 0.2s ease;
}

.contact-tel__circle .icon {
  width: 26px;
  height: 26px;
}

.contact-tel__call:hover .contact-tel__circle,
.contact-tel__call:focus-visible .contact-tel__circle {
  background: var(--on-dark-hover);
}

.contact-tel__body {
  display: grid;
  gap: 4px;
}

.contact-tel__num {
  font-family: var(--font-en);
  font-size: clamp(32px, 3.4vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.contact-tel__hours {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ステップバー: 入力 → 確認 → 完了。済んだ段階は紺で塗り、線も紺でつなぐ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  padding: 0;
  list-style: none;
}

.steps__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: var(--ink-soft);
}

/* 前の段階から、この段階へ伸びる線 */
.steps__item:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.steps__item.is-done::before,
.steps__item.is-current::before {
  background: var(--navy);
}

.steps__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 600;
}

.steps__num .icon {
  width: 22px;
  height: 22px;
}

.steps__item.is-done .steps__num,
.steps__item.is-current .steps__num {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.steps__label {
  font-size: 15px;
  font-weight: 700;
}

.steps__item.is-current .steps__label,
.steps__item.is-done .steps__label {
  color: var(--navy);
}

.steps__en {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* タイトル・リード文(ステップバーの上)。フォーム本体は、背景色なし */
.contact-head {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.contact-head .section__title {
  gap: 6px;
  margin-bottom: clamp(16px, 2vw, 24px);
}

/* 英語は小さく(上)、日本語は大きく(下) */
.contact-head .section__title-en {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--blue-bright);
}

.contact-head .section__title-ja {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.contact-lead {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 2.1;
  text-wrap: pretty; /* 最大幅は決めず、フォームと同じ幅いっぱいに広げる。最後の行に、1〜2語だけ残らないようにする。折り返しは、意味のまとまり(.phrase)の境目だけ */
}

/* 入力の行: PCは、左に項目名・右に入力欄。スマホは縦 */
.field {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 10px 32px;
  padding: clamp(18px, 2vw, 26px) 0;
  border-top: 1px solid var(--line);
}

.field__label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy);
}

.field__req {
  flex: none;
  padding: 2px 10px;
  border-radius: 9999px;
  background: var(--orange-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.field__input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #c4cdda;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit; /* 16px以上にして、iPhoneで入力時に拡大されないようにする */
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__input::placeholder {
  color: #8d96a5;
}

.field__input:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(16, 104, 196, 0.18);
}

.field__input--area {
  min-height: 220px;
  resize: vertical;
}

.field.is-error .field__input {
  border-color: #c0392b;
  background: #fff7f6;
}

.field__error {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: #b3261e;
}

/* 個人情報保護方針への同意: 線は使わず、中央の白いピル型の「チェック」にする。
   チェックを入れると、紺の枠と淡い青の地になる */
.consent {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: clamp(28px, 3.4vw, 44px);
  text-align: center;
}

.consent__note {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.consent__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 100%;
  padding: 16px 28px;
  border: 1.5px solid #c4cdda;
  border-radius: 9999px;
  background: #fff;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.consent__label:hover {
  border-color: var(--navy);
}

.consent__label:has(.consent__check:checked) {
  border-color: var(--navy);
  background: var(--navy-tint);
}

.consent__label:has(.consent__check:focus-visible) {
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 4px rgba(16, 104, 196, 0.18);
}

.consent__check {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--navy);
  cursor: pointer;
}

.consent__check:focus-visible {
  outline: 3px solid rgba(16, 104, 196, 0.35);
  outline-offset: 3px;
}

.consent__text a {
  color: var(--navy);
  text-underline-offset: 4px;
}

.consent.is-error .consent__label {
  border-color: #c0392b;
  background: #fff7f6;
}

.consent .field__error {
  margin: 0;
}

/* エラーの案内(ページの上) */
.form-alert {
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1.5px solid #e4b4b0;
  border-radius: 14px;
  background: #fff6f5;
  color: #8c1d18;
  font-size: 15px;
  font-weight: 500;
}

.form-alert p {
  margin: 0;
}

.form-alert p + p,
.form-alert ul {
  margin-top: 6px;
}

.form-alert ul {
  margin-bottom: 0;
  padding-left: 1.4em;
}

.form-alert a {
  color: inherit;
}

.form-alert--admin {
  border-color: #e6d28a;
  background: #fffbea;
  color: #6b5600;
}

/* 人間には見えない罠の入力欄(画面の外に置く) */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-note {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.contact-note a {
  color: var(--navy);
}

.contact-note--captcha {
  margin-top: 20px;
  font-size: 12px;
  text-align: center;
}

/* ボタン: 紺の塗り(進む)と、紺の枠(戻る) */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(28px, 4vw, 40px);
}

.btn-fill,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 clamp(32px, 5vw, 56px);
  border: 1.5px solid var(--navy);
  border-radius: 9999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-fill {
  background: var(--navy);
  color: #fff;
}

.btn-line {
  background: transparent;
  color: var(--navy);
}

.btn-fill:hover,
.btn-fill:focus-visible {
  background: #fff;
  color: var(--navy);
}

.btn-line:hover,
.btn-line:focus-visible {
  background: var(--navy);
  color: #fff;
}

.btn-fill .icon {
  transition: transform 0.25s ease;
}

.btn-fill:hover .icon,
.btn-fill:focus-visible .icon {
  transform: translateX(4px);
}

.btn-fill[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.contact-actions--confirm .form-alert {
  margin: 16px 0 0;
  max-width: 28em;
}

/* 確認画面: 項目ごとに、細い線で区切る */
.confirm {
  margin: 0;
}

.confirm__row {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 6px 32px;
  padding: clamp(16px, 2vw, 22px) 0;
  border-top: 1px solid var(--line);
}

.confirm__row:last-child {
  border-bottom: 1px solid var(--line);
}

.confirm__label {
  font-weight: 700;
  color: var(--navy);
}

.confirm__value {
  margin: 0;
  white-space: pre-wrap; /* お問い合わせ内容の改行を、そのまま見せる */
  overflow-wrap: anywhere;
}

/* 完了画面 */
.contact-done {
  display: grid;
  justify-items: center;
  padding: clamp(8px, 2vw, 24px) 0;
  text-align: center;
}

.contact-done__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
}

.contact-done__icon .icon {
  width: 36px;
  height: 36px;
}

.contact-done__text {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 2;
  color: var(--ink-soft);
}

.contact-done__text a {
  color: var(--navy);
}

/* reCAPTCHA のバッジは隠す。代わりに、フォームの下に、表記を出している */
.grecaptcha-badge {
  visibility: hidden;
}

@media (max-width: 767px) {
  .contact-tel__card {
    grid-template-columns: 1fr;
  }

  .contact-tel__circle {
    width: 56px;
    height: 56px;
  }

  .field,
  .confirm__row {
    grid-template-columns: 1fr;
  }

  .field__label {
    padding-top: 0;
  }

  .consent__label {
    width: 100%;
    border-radius: 20px;
  }

  .contact-actions {
    flex-direction: column-reverse; /* 縦に積むときは、進むボタンが上 */
    align-items: stretch;
  }

  .btn-fill,
  .btn-line {
    width: 100%;
  }

  .contact-actions .contact-form {
    width: 100%;
  }
}

/* ---------- 個人情報保護方針 ---------- */

.policy-card {
  max-width: 960px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
}

.policy__lead {
  margin: 0 0 clamp(20px, 3vw, 32px);
  line-height: 2.1;
}

.policy__item {
  padding: clamp(20px, 2.4vw, 28px) 0;
  border-top: 1px solid var(--line);
}

.policy__title {
  margin: 0 0 12px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--navy);
}

.policy__item p {
  margin: 0;
}

.policy__item p + p,
.policy__list {
  margin-top: 12px;
}

.policy__list {
  margin-bottom: 0;
  padding-left: 1.4em;
}

.policy__item a {
  color: var(--navy);
  text-underline-offset: 4px;
}

.policy__address {
  font-style: normal;
  line-height: 2;
}

.policy__sign {
  margin: clamp(24px, 3vw, 40px) 0 0;
  text-align: right;
  font-weight: 700;
  color: var(--navy);
}

/* 管理画面で書いた本文(会社の正式な文面に差し替えたとき) */
.policy__custom h2,
.policy__custom h3 {
  margin: 1.8em 0 0.6em;
  padding-top: 1.2em;
  border-top: 1px solid var(--line);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--navy);
}

.policy__custom > :first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.policy__custom p,
.policy__custom ul,
.policy__custom ol {
  margin: 0 0 1em;
  line-height: 2;
}

.policy__custom ul,
.policy__custom ol {
  padding-left: 1.4em;
}

.policy__custom a {
  color: var(--navy);
  text-underline-offset: 4px;
}

/* フッター: 白い帯の、個人情報保護方針へのリンク */
.footer-bottom__links {
  margin: 0 0 18px;
  font-size: 13px;
}

.footer-bottom__links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-bottom__links a:hover,
.footer-bottom__links a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Inner pages (archive / single / page) ---------- */

.site-main--inner {
  padding-top: var(--header-offset);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 clamp(24px, 3vw, 40px);
  padding: 0;
  list-style: none;
}

.filter__link {
  display: block;
  padding: 6px 18px;
  border: 1px solid var(--navy);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}

.filter__link[aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

.navigation.pagination {
  margin-top: 48px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-numbers {
  display: inline-block;
  min-width: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
}

.page-numbers.current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.entry {
  width: min(760px, 100% - 48px);
  margin: 0 auto;
  padding: 40px 0 96px;
}

.entry__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

.entry__title {
  margin: 0 0 32px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.5;
  color: var(--navy);
}

.entry__body p {
  margin: 0 0 1.4em;
}

.entry__body img {
  height: auto;
  border-radius: 4px;
}

/* クラシックエディタの画像まわり */
.alignnone,
.aligncenter {
  display: block;
  margin: 1.4em auto;
}

.alignleft {
  float: left;
  margin: 0.4em 1.4em 1em 0;
}

.alignright {
  float: right;
  margin: 0.4em 0 1em 1.4em;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
  margin: 0.4em 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.entry__back {
  margin-top: 56px;
}

/* ---------- 一覧・詳細ページ(施工事例・お知らせ): 下層MV(事業紹介と同じ)の下 ---------- */

/* MVの直後。上の余白は、MV側が持っているので詰める */
.archive.section,
.post.section {
  padding-top: 0;
}

.archive__empty {
  padding: clamp(24px, 4vw, 56px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
}

.archive__empty p {
  margin: 0;
}

.archive__empty p + p {
  margin-top: 20px;
}

/* 詳細: 白い角丸のカードに、日付・分類・タイトル・本文 */
.post-card {
  max-width: 960px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: clamp(20px, 2.4vw, 36px);
  background: #fff;
}

.post-card__head {
  margin-bottom: clamp(24px, 3vw, 36px);
  padding-bottom: clamp(20px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
}

.post-card .entry__title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 34px);
}

.post__back {
  margin: clamp(24px, 3vw, 40px) 0 0;
}

/* 詳細の本文の写真: 投稿のとき、サイズ(中・大)や配置(なし・中央)をどう選んでも、同じ見え方にする。
   写真は、高さをそろえて、左から横に並べ、入りきらないぶんは、次の行へ送る。
   (inc/content.php が、写真だけの段落に .entry__photos を付け、空の段落を取り除いている) */
.post-card .entry__body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.post-card .entry__body > * {
  flex: 0 0 100%;
  min-width: 0;
}

.post-card .entry__body > .entry__photos {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: flex-start;
  max-width: 100%;
  margin: 0;
  font-size: 0; /* 写真の間の空白(&nbsp;)が、幅を取らないように */
  line-height: 0;
}

.post-card .entry__body > .wp-caption {
  flex: 0 0 auto;
  width: auto !important; /* キャプションの箱に、投稿時の幅(300pxなど)が入っているので、外す */
  max-width: calc(100% - 16px);
  margin: 0 16px 16px 0;
}

/* 写真の右の余白(16px)のぶん、最大幅を引く: 本文の幅からはみ出さないように */
.post-card .entry__photos img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 16px);
  max-height: clamp(240px, 34vw, 420px);
  margin: 0 16px 16px 0;
  border-radius: 8px;
}

.post-card .wp-caption img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(240px, 34vw, 420px);
  border-radius: 8px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
