/* ==========================================================
   Kensetsu Corporate — original design system
   Palette:
     --main       #591719  メインカラー(指定)
     --main-deep  #3B0E10  フッター・濃部
     --paper      #F7F4F2  地色
     --gold       #C9A15F  ダーク背景上のラベル
   Type:
     Display: "Noto Serif JP" — キャッチ・見出し
     Body:    "Noto Sans JP"  — 本文・UI
   ========================================================== */

:root {
  --main: #591719;        /* メインカラー（指定色） */
  --main-deep: #3B0E10;   /* 濃色（フッター下・影） */
  --main-tint: #7A2A2C;   /* 明るめの補助 */
  --gold: #C9A15F;        /* ダーク背景上のラベル用 */
  --gold-soft: #E5CFA0;   /* ダーク背景上の淡いゴールド */
  --ink: #2A2022;         /* テキスト */
  --ink-soft: #4A3D3E;
  --paper: #F7F4F2;
  --white: #FFFFFF;
  --steel: #8A7F80;
  --line: #E2D9D7;
  --accent: #591719;      /* 旧accent参照はメインカラーへ集約 */
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --w: min(1120px, 92vw);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  word-break: auto-phrase;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  font-size: 15px;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
[hidden] { display: none !important; }

.inner { width: var(--w); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 40px);
  height: 84px;
  background: transparent;
  color: #fff;
  transition: background .4s ease, height .4s ease, box-shadow .4s ease;
}
.site-header.is-scrolled {
  height: 68px;
  background: var(--main);
  box-shadow: 0 4px 24px rgba(59,14,16,.35);
}
.site-logo { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .12em; }
.site-logo small { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .3em; color: var(--steel); font-weight: 400; }

.global-nav ul { display: flex; gap: clamp(16px, 2.5vw, 36px); }
.global-nav a {
  font-size: 13px; letter-spacing: .1em; padding: 8px 0; position: relative;
}
.global-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: #fff; transform: scaleX(0); transform-origin: right;
  transition: transform .3s ease;
}
.global-nav a:hover::after,
.global-nav li.current-menu-item a::after { transform: scaleX(1); transform-origin: left; }

.nav-contact {
  border: 1px solid #fff; color: #fff !important; padding: 10px 22px !important;
  font-size: 13px; letter-spacing: .12em;
  transition: background .3s, color .3s;
}
.nav-contact:hover { background: #fff; color: var(--main) !important; }
.nav-contact::after { display: none; }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .nav-toggle {
    display: block; background: none; border: 0; cursor: pointer;
    width: 44px; height: 44px; position: relative; z-index: 110;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; position: absolute; left: 10px;
    width: 24px; height: 2px; background: #fff; transition: .3s;
  }
  .nav-toggle span { top: 21px; }
  .nav-toggle span::before { top: -8px; left: 0; }
  .nav-toggle span::after { top: 8px; left: 0; }
  body.nav-open .nav-toggle span { background: transparent; }
  body.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  body.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

  .global-nav {
    position: fixed; inset: 0; background: var(--main-deep); color: #fff;
    display: grid; place-items: center;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  body.nav-open .global-nav { opacity: 1; pointer-events: auto; }
  .global-nav ul {
    flex-direction: row; flex-wrap: wrap; justify-content: center;
    text-align: center; gap: 28px 14px;
    padding: 0 24px;
  }
  .global-nav li { flex: 0 0 100%; } /* 通常リンクは1行ずつ */
  .global-nav li:has(> .nav-contact) { flex: 0 0 auto; } /* ボタン2つは同じ行に横並び */
  .global-nav a { font-size: 16px; }
  .global-nav .nav-contact { border-color: var(--gold); display: inline-block; margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100svh; min-height: 560px;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden;
  background: #2A2022;
}
.hero-bg {
  position: absolute; inset: 0; overflow: hidden;
  background: #2A2022; /* 読み込み前の下地（実際の値はインラインで上書き） */
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(265deg, rgba(16,11,12,.55) 0%, rgba(16,11,12,.15) 40%, rgba(16,11,12,0) 60%),
    linear-gradient(rgba(42,32,34,.3), rgba(42,32,34,.55));
}
/* キャッチ＋英字サブの共通ラッパー：flexで両者の頭（上端）を揃える */
.hero-texts {
  position: absolute; top: 50%; right: clamp(24px, 7vw, 110px);
  transform: translateY(-50%);
  height: max-content; /* top:50%由来の使用可能領域(画面下半分)での自動折返しを防ぐ */
  display: flex; flex-direction: row-reverse; align-items: flex-start;
  gap: 26px;
  z-index: 10;
}
.hero-copy {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 40px);
  font-weight: 600; letter-spacing: .22em; line-height: 1.9;
  max-height: min(60svh, 620px); /* 超過分は左隣の段へ自動折返し */
  text-shadow: 0 2px 12px rgba(0,0,0,.75), 0 0 48px rgba(0,0,0,.45);
}
.hero-copy { animation: heroIn 1.2s .45s cubic-bezier(.22,1,.36,1) both; }
.hero-lead p { animation: heroIn 1.2s 1.05s cubic-bezier(.22,1,.36,1) both; }
@keyframes heroIn {
  from { opacity: 0; translate: 24px 0; }
  to   { opacity: 1; translate: 0 0; }
}
.hero-lead p { transform: none !important; animation-name: heroInUp; }
@keyframes heroInUp {
  from { opacity: 0; translate: 0 20px; }
  to   { opacity: 1; translate: 0 0; }
}
.hero-sub {
  align-self: center; /* キャッチ（列全体の高さ基準）に対して上下中央 */
  writing-mode: vertical-rl;
  font-family: var(--sans);
  letter-spacing: .26em; font-weight: 300; color: #fff;
  opacity: .85;
  max-height: min(60svh, 620px);
  text-shadow: 0 2px 12px rgba(0,0,0,.75);
  animation: heroSubInSide 1.2s .75s cubic-bezier(.22,1,.36,1) both;
}
@keyframes heroSubInSide {
  from { opacity: 0; translate: 16px 0; } /* 縦書きの読み始め（右）から */
  to   { opacity: .85; translate: 0 0; }
}
@keyframes heroSubIn {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: .85; translate: 0 0; }
}
.hero-lead { position: relative; padding: 0 clamp(20px, 4vw, 56px) 86px clamp(72px, 10vw, 140px); max-width: 640px; }
.hero-lead p { font-size: 14px; letter-spacing: .08em; opacity: .95; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.hero-lead .lead-sp { display: none; }
@media (max-width: 640px) {
  .hero-lead .lead-pc { display: none; }
  .hero-lead .lead-sp { display: block; }
}
.scroll-sign {
  position: absolute; left: clamp(20px, 4vw, 56px); bottom: 0;
  font-size: 10px; letter-spacing: .35em; color: #fff;
  writing-mode: vertical-rl; padding-bottom: 72px;
}
.scroll-sign::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 1px; height: 64px; background: rgba(255,255,255,.7);
  animation: scrollline 2.2s ease-in-out infinite;
  transform-origin: top;
  transform: translate(-50%, 0);
}
@keyframes scrollline {
  0% { transform: translate(-50%, 0) scaleY(0); transform-origin: top; }
  45% { transform: translate(-50%, 0) scaleY(1); transform-origin: top; }
  55% { transform: translate(-50%, 0) scaleY(1); transform-origin: bottom; }
  100% { transform: translate(-50%, 0) scaleY(0); transform-origin: bottom; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
/* ---- 下層ページ共通の余白（v1.16.4〜 全ページ統一） ----
   --sec-top : パンくず直下〜最初の見出し／コンテンツまで
   --sec-gap : ページ内のセクション（h2ブロック）同士の間隔
   --sec-end : 最後のコンテンツ〜フッターまで */
:root { --sec-top: 40px; --sec-gap: 64px; --sec-end: clamp(64px, 10vw, 120px); }
@media (max-width: 640px) { :root { --sec-top: 28px; --sec-gap: 48px; --sec-end: 56px; } }
.section--page { padding: var(--sec-top) 0 var(--sec-end); }
.section--page .entry-content > :first-child { margin-top: 0; }
.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head .en {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 36px);
  letter-spacing: .08em; font-weight: 600;
}
.section-head .ja { font-size: 12px; letter-spacing: .25em; color: var(--accent); }
.more-link {
  display: inline-block; margin-top: 32px; font-size: 13px; letter-spacing: .15em;
  border-bottom: 1px solid var(--main); padding-bottom: 4px; transition: color .3s, border-color .3s;
}
.more-link:hover { color: var(--accent); border-color: var(--accent); }

/* News */
.news-list li { border-bottom: 1px solid var(--line); }
.news-list li:first-child { border-top: 1px solid var(--line); }
.news-list a {
  display: grid; grid-template-columns: 110px 110px 1fr; gap: 20px;
  align-items: center; padding: 22px 8px; transition: background .3s;
}
.news-list a:hover { background: #fff; }
.news-date { font-size: 13px; color: var(--steel); letter-spacing: .06em; }
.news-cat {
  font-size: 11px; text-align: center; border: 1px solid var(--main);
  padding: 2px 8px; letter-spacing: .1em; white-space: nowrap;
}
.news-title { font-size: 14px; }
@media (max-width: 640px) {
  .news-list a { grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 6px 14px; }
  .news-title { grid-column: 1 / -1; }
  .news-cat { justify-self: end; } /* 文字量ぶんの幅のまま右寄せ */
}

/* Works grid */
.works-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px;
}
.work-card { background: #fff; border: 1px solid var(--line); transition: box-shadow .3s, transform .3s; }
.work-card:hover { box-shadow: 0 12px 32px rgba(16,32,47,.12); transform: translateY(-4px); }
.work-thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--main-tint); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-thumb .noimg {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: rgba(255,255,255,.5); font-family: var(--serif); letter-spacing: .2em; font-size: 13px;
}
.work-body { padding: 20px 22px 24px; }
.work-cat { font-size: 11px; color: var(--accent); letter-spacing: .15em; }
.work-title { font-size: 15px; font-weight: 500; margin-top: 6px; line-height: 1.6; }
.work-meta { font-size: 12px; color: var(--steel); margin-top: 10px; }

/* TOP: two-tone band linking to company */
.band {
  background: var(--main); color: #fff;
}
.band .inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center;
  padding: clamp(64px, 9vw, 110px) 0;
}
.band h2 { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .12em; line-height: 1.8; }
.band p { font-size: 14px; opacity: .85; margin-top: 20px; }
.band .more-link { color: #fff; border-color: #fff; }
/* 背景がメインカラーのため、ホバーはゴールドへ（--accent は --main と同色で消えてしまう） */
.band .more-link:hover { color: var(--gold); border-color: var(--gold); }
.band-figure { aspect-ratio: 16/10; background: url("../img/company.jpg") center/cover no-repeat, var(--main-tint); }
@media (max-width: 780px) { .band .inner { grid-template-columns: 1fr; } }

/* ---------- Page common：下層ページ見出し（v1.16〜 淡い塗りの大文字＋二重罫） ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, var(--main-tint) 0%, var(--main) 45%, var(--main-deep) 100%);
  background-size: cover; background-position: center;
  color: #fff;
  padding: 150px 0 64px;
}
.page-hero.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(rgba(42,32,34,.45), rgba(42,32,34,.6));
}
/* 二重の額縁（上端は固定ヘッダーの下から） */
.page-hero-frame { position: absolute; z-index: 1; inset: 98px 18px 18px; border: 1px solid rgba(201,161,95,.22); pointer-events: none; }
.page-hero-frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(201,161,95,.12); }
/* ページ名の英字：淡い塗りでゴールドに溶ける */
.page-hero-wm {
  position: absolute; z-index: 1; right: -0.05em; top: 50%; translate: 0 -50%;
  font-family: var(--serif); font-size: clamp(110px, 18vw, 230px); line-height: 1; letter-spacing: .02em; font-weight: 700;
  white-space: nowrap; pointer-events: none; user-select: none;
  color: transparent;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.07) 40%, rgba(201,161,95,.12) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.page-hero-wm.is-long { font-size: clamp(72px, 11vw, 140px); }
.page-hero .inner { position: relative; z-index: 2; }
.page-hero-row { display: flex; align-items: center; gap: 29px; /* 18px＋回転ぶん11px */ }
.page-hero-icon { width: 52px; height: 52px; flex: 0 0 52px; border: 1px solid rgba(201,161,95,.5); display: grid; place-items: center; transform: rotate(45deg); margin-left: 11px; /* 45°回転ぶん（(52×√2−52)÷2）内側に寄せ、ひし形の左端をパンくずの左端に揃える */ }
.page-hero-icon svg { width: 28px; height: 28px; display: block; overflow: visible; transform: rotate(-45deg); }
.kc-lineart { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.page-hero-text { min-width: 0; }
.page-hero .en { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 40px); letter-spacing: .1em; line-height: 1.2; }
.page-hero .ja { font-size: 12px; letter-spacing: .3em; color: var(--gold); margin-top: 8px; }
.page-hero .ja::after { content: ""; display: block; width: 100%; max-width: 220px; height: 3px; margin-top: 12px; border-top: 1px solid var(--gold); border-bottom: 1px solid rgba(201,161,95,.5); }
@media (max-width: 640px) {
  /* スマホ：全体を詰め、英字は額縁の右上（タイトルと重ならない位置）へ */
  .page-hero { padding: 116px 0 36px; }
  .page-hero-frame { inset: 84px 12px 12px; }
  .page-hero-wm { font-size: 60px; top: 90px; bottom: auto; right: 10px; translate: 0 0; letter-spacing: .04em; }
  .page-hero-wm.is-long { font-size: 38px; top: 96px; }
  .page-hero-icon { width: 38px; height: 38px; flex-basis: 38px; margin-left: 8px; }
  .page-hero-icon svg { width: 20px; height: 20px; }
  .page-hero-row { gap: 20px; }
  .page-hero .en { font-size: 26px; }
  .page-hero .ja { margin-top: 6px; }
  .page-hero .ja::after { max-width: 150px; margin-top: 10px; }
}
.breadcrumb { font-size: 11px; color: var(--steel); padding: 16px 0; letter-spacing: .06em; }
.breadcrumb a:hover { color: var(--accent); }

.entry-content h2 {
  font-family: var(--serif); font-size: 22px; letter-spacing: .1em;
  border-left: 3px solid var(--accent); padding-left: 16px; margin: var(--sec-gap, 64px) 0 20px;
}
.entry-content h2:first-child { margin-top: 0; }
.entry-content h3 { font-size: 17px; margin: 32px 0 12px; letter-spacing: .08em; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1.2em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0; background: #fff; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 14px 18px; font-size: 14px; text-align: left; }
.entry-content th { background: var(--paper); width: 220px; font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) {
  .entry-content th { width: auto; display: block; border-bottom: 0; }
  .entry-content td { display: block; }
}

/* Company table variant */
.company-table th { background: var(--main); color: #fff; border-color: var(--main-tint); }

/* Contact */
.contact-note { background: #fff; border: 1px solid var(--line); padding: 28px 32px; margin-bottom: 40px; font-size: 14px; }
/* ---------- お問い合わせフォーム（モダン版） ---------- */
.contact-note { border-radius: 12px; }
.contact-privacy-note {
  margin-top: 8px; font-size: 12px; letter-spacing: .02em; color: var(--steel);
  white-space: nowrap;
}
.contact-privacy-note a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 880px) { .contact-privacy-note { white-space: normal; } }

.wpcf7 form > p { margin-bottom: 28px; font-size: 13.5px; font-weight: 600; letter-spacing: .06em; color: var(--ink); }
.wpcf7 form label { cursor: pointer; }

.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 14px 16px; margin-top: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 400; line-height: 1.6;
  transition: border-color .25s, box-shadow .25s;
  -webkit-appearance: none; appearance: none;
}
.wpcf7 textarea { min-height: 220px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus {
  outline: none; border-color: var(--main);
  box-shadow: 0 0 0 3px rgba(89, 23, 25, .12);
}

/* 種別ラジオ：ピル型チップ */
.wpcf7-radio { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wpcf7-radio .wpcf7-list-item { margin: 0; }
.wpcf7-radio input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.wpcf7-radio .wpcf7-list-item-label {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px 10px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 400; letter-spacing: .04em;
  transition: background .25s, border-color .25s, color .25s, box-shadow .25s;
}
/* 左側の円チェックマーク */
.wpcf7-radio .wpcf7-list-item-label::before {
  content: "\2713"; /* ✓ */
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 18px;
  border: 1.5px solid var(--line); border-radius: 50%;
  font-size: 11px; line-height: 1; color: transparent;
  transition: background .25s, border-color .25s, color .25s;
}
.wpcf7-radio .wpcf7-list-item-label:hover { border-color: var(--main-tint); }
.wpcf7-radio .wpcf7-list-item-label:hover::before { border-color: var(--main-tint); }
.wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label {
  background: var(--main); border-color: var(--main); color: #fff;
}
.wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::before {
  background: #fff; border-color: #fff; color: var(--main); /* 色反転 */
}
.wpcf7-radio label:has(input:focus-visible) .wpcf7-list-item-label {
  box-shadow: 0 0 0 3px rgba(89, 23, 25, .2);
}

/* 同意チェック＋送信ボタン：中央寄せ */
.wpcf7 form > p:has(.wpcf7-acceptance) { text-align: center; margin: 48px 0 28px; font-weight: 400; font-size: 14px; }
.wpcf7 .wpcf7-acceptance input[type="checkbox"] {
  accent-color: var(--main); width: 17px; height: 17px;
  vertical-align: -3px; margin-right: 6px;
}
.wpcf7 .wpcf7-acceptance a { text-decoration: underline; text-underline-offset: 3px; }
.wpcf7 form > p:has(.wpcf7-submit) { text-align: center; margin-bottom: 0; }

.wpcf7 input[type="submit"] {
  background: var(--main); color: #fff; border: 0; border-radius: 999px;
  padding: 17px 80px; font-family: var(--sans); font-size: 14px; letter-spacing: .22em; cursor: pointer;
  box-shadow: 0 8px 24px rgba(89, 23, 25, .3);
  transition: background .3s, transform .3s, box-shadow .3s;
}
.wpcf7 input[type="submit"]:hover {
  background: var(--main-tint); transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(89, 23, 25, .35);
}
.wpcf7 input[type="submit"]:active { transform: translateY(0); }

/* CF7デフォルトの左マージンを打ち消し（種別チップ・同意チェック共通） */
.wpcf7 .wpcf7-list-item { margin: 0; }

/* 送信スピナー：通常フローから外してボタンの中央配置に影響させない */
.wpcf7 form > p:has(.wpcf7-submit) { position: relative; }
.wpcf7 .wpcf7-spinner {
  position: absolute; top: 50%; transform: translateY(-50%);
  margin: 0 0 0 12px;
}

/* バリデーション・応答メッセージ */
.wpcf7-not-valid-tip { font-size: 12px; font-weight: 400; color: #B3261E; margin-top: 6px; }
.wpcf7 .wpcf7-response-output {
  margin: 28px 0 0; padding: 14px 20px; border-radius: 10px;
  border: 1px solid var(--main); font-size: 14px; font-weight: 400; text-align: center;
}

/* Single work */
.single-work-meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--steel); margin: 12px 0 32px; }
.single-work-eyecatch { margin-bottom: 40px; }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 56px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; padding: 0 6px;
}
.pagination .current { background: var(--main); color: #fff; border-color: var(--main); }

/* ---------- Footer ---------- */
.site-footer { background: var(--main-deep); color: #fff; margin-top: 0; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto; gap: 40px;
  padding: clamp(48px, 7vw, 80px) 0 40px;
}
.footer-logo { font-family: var(--serif); font-size: 22px; letter-spacing: .12em; }
.footer-addr { font-size: 12px; color: #C7A9A6; margin-top: 16px; line-height: 2; font-style: normal; }
.footer-nav ul { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .footer-nav ul { gap: 24px 18px; }
  .footer-nav li:has(> .nav-contact) { order: 2; } /* ボタン2つは末尾へ */
  /* テキストリンクとボタンの間に全幅の改行要素を挟み、ボタン2つを専用行に揃える */
  .footer-nav ul::after { content: ""; flex-basis: 100%; height: 0; order: 1; }
  .footer-nav .nav-contact { padding: 9px 16px !important; } /* 狭幅でも2ボタンが1行に収まる幅 */
}
.footer-nav a { font-size: 12px; letter-spacing: .12em; color: #DCC5C2; transition: color .3s; }
.footer-nav a:hover { color: #fff; }
.copyright {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0; font-size: 11px; color: #A88785; letter-spacing: .1em; text-align: center;
}
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr; } }

/* Fade-in on scroll */
.fadein { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.fadein.is-visible { opacity: 1; transform: none; }

/* 子要素のスタッガー（.stagger を親に付与） */
.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.stagger.is-visible > * { opacity: 1; transform: none; }
.stagger.is-visible > *:nth-child(1) { transition-delay: .05s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: .15s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: .25s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: .35s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: .45s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: .55s; }

/* 実績カード：画像ズーム */
.work-thumb img { transition: transform .8s cubic-bezier(.22,1,.36,1); }
.work-card:hover .work-thumb img { transform: scale(1.06); }

/* セクション見出しの下線アニメーション */
.section-head { position: relative; }
.section-head::after {
  content: ""; position: absolute; left: 0; bottom: -14px;
  width: 56px; height: 2px; background: var(--main);
  transform: scaleX(0); transform-origin: left; transition: transform .8s .3s cubic-bezier(.22,1,.36,1);
}
.fadein.is-visible .section-head::after,
.is-visible .section-head::after { transform: scaleX(1); }

/* ダーク背景（.band）上では下線を白系に */
.band .section-head::after { background: var(--gold); }

/* 中央寄せ見出し用：下線も中央に */
.section-head--center { justify-content: center; }
.section-head--center::after {
  left: 50%; margin-left: -28px; transform-origin: center;
}

/* お知らせ行：ホバーで矢印スライド */
.news-list a { position: relative; }
.news-list a::after {
  content: "→"; position: absolute; right: 12px; top: 50%; translate: -8px -50%;
  opacity: 0; color: var(--main); transition: opacity .3s, translate .3s;
}
.news-list a:hover::after { opacity: 1; translate: 0 -50%; }


/* ---------- カスタムロゴ ---------- */
.site-logo { display: flex; flex-direction: column; gap: 2px; }
.site-logo .logo-link { display: block; line-height: 0; color: inherit; }
.site-logo .logo-link:has(> :not(img)) , .site-logo .logo-link { line-height: 1.2; }
.site-logo img.site-logo-img { height: 44px; width: auto; display: block; }
.footer-logo img.footer-logo-img { height: 56px; width: auto; display: block; }
.band-figure { background-size: cover; background-position: center; }


/* ---------- ヒーロー中央ロゴ ---------- */
.hero-logo {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: auto;
  filter: drop-shadow(0 10px 36px rgba(0,0,0,.5));
  animation: heroLogoIn 1.4s .2s cubic-bezier(.22,1,.36,1) both;
  z-index: 1;
}
@keyframes heroLogoIn {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- ヒーロー長文キャッチ：モバイル調整 ---------- */
/* ---- タブレット〜中間幅（〜1200px）：キャッチ=ロゴ右 / 英字サブ=ロゴ左 ---- */
@media (min-width: 640.02px) and (max-width: 1200px) {
  .hero-texts {
    left: clamp(64px, 9vw, 120px);
    right: clamp(20px, 5vw, 64px);
    justify-content: space-between;
    gap: 0;
  }
}

/* ---- スマホ：キャッチ=右端の縦書き1列 / 英字サブ=左端の縦書き1列 / ロゴ中央 ---- */
@media (max-width: 640px) {
  .hero-texts {
    left: 16px; right: 16px;
    top: 14svh;
    transform: none; /* 上基準の配置（中央合わせを解除） */
    flex-direction: column;
    align-items: center;      /* キャッチブロックを左右中央へ */
    justify-content: flex-start;
  }
  .hero-copy {
    writing-mode: horizontal-tb; /* スマホは横書き */
    max-height: none;
    width: fit-content;
    letter-spacing: .1em; line-height: 1.8;
  }
  .hero-sub {
    position: absolute;            /* キャッチから切り離してロゴ下へ */
    left: 0; right: 0;
    top: calc(70svh - 16svh);      /* 画面高70%の位置（親の上端16svhぶんを差し引き） */
    writing-mode: horizontal-tb;
    max-height: none;
    text-align: center;
    letter-spacing: .12em;
  }
  .hero-logo { top: 52%; animation-delay: .5s; }
  .hero-lead { padding: 0; width: fit-content; margin: 0 auto 40px; }
  /* 登場順を視線の流れ（上→下）に合わせて再設計 */
  .hero-copy { animation: heroInUp 1.1s .2s cubic-bezier(.22,1,.36,1) both; } /* 下からフェードイン */
  .hero-sub { animation-name: heroSubIn; animation-delay: .8s; } /* スマホは下から */
  .hero-lead p { animation-delay: 1.1s; }
  .scroll-sign { padding-bottom: 30px; left: clamp(17px, 4vw, 56px); }
  .scroll-sign::after { height: 20px; }
  .news-list a::after { display: none; } /* タップ環境では矢印を出さない（カテゴリとの重なり防止） */
}


/* ---------- 会社情報：Googleマップ ---------- */
.company-map { margin: 8px 0 32px; overflow: hidden; }
.company-map iframe { display: block; width: 100%; height: 400px; border: 0; }


/* マップ見出しのピンアイコン */
.entry-content h3.company-map-heading { display: flex; align-items: center; gap: 8px; }
.company-map-heading svg { width: 19px; height: 19px; flex: 0 0 19px; color: var(--main); }


/* 個人情報保護方針：冒頭文（PCでは1行維持） */
@media (min-width: 881px) {
  .privacy-lead { white-space: nowrap; }
}


/* スマホのみ有効な改行 */
.br-sp { display: none; }
@media (max-width: 640px) { .br-sp { display: inline; } }



/* ヒーローキャッチ・サブ内の強調文字（《》で囲んだ範囲） */
.catch-accent { color: var(--catch-accent, #D7000F); font-size: 1.3em; font-weight: 900; }

/* 行単位のspan：縦書きでは1行＝1列。--n（強調文字より前の不足文字数）ぶん頭を下げ、
   各行の強調文字の開始位置を揃える */
.hero-copy { --char-adv: 1.22em; } /* 1文字の送り ≒ 1em + letter-spacing .22em */
.hero-sub  { --char-adv: 1.26em; }
.hero-line {
  display: block;
  padding-inline-start: calc(var(--n, 0) * var(--char-adv, 1.22em));
}
@media (max-width: 640px) {
  /* 横書きでは padding-inline-start が左方向の字下げになり、
     縦書きと同じ --n 計算で各行の強調文字の頭（左端）が揃う */
  .hero-copy { --char-adv: 1.1em; }
}


/* ---------- セクション見出し（会社情報ページのh2と同一トンマナ） ---------- */
.section-heading {
  font-family: var(--serif); font-size: 22px; letter-spacing: .1em;
  border-left: 3px solid var(--accent); padding-left: 16px; margin: 0 0 20px;
}


/* ---------- 施工実績：ギャラリー＋ライトボックス ---------- */
.single-work-eyecatch { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.single-work-eyecatch img { display: block; width: 100%; height: auto; }

/* 拡大表示の案内文 */
.works-zoom-note {
  text-align: right;
  font-size: 12px;
  color: var(--steel);
  letter-spacing: .05em;
  margin: 0 0 8px;
}
.works-zoom-note::before {
  content: "";
  display: inline-block;
  width: 13px; height: 13px;
  margin-right: 5px;
  vertical-align: -2px;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M10 2a8 8 0 1 0 4.9 14.3l5.4 5.4 1.4-1.4-5.4-5.4A8 8 0 0 0 10 2zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12zm-1 3v2H7v2h2v2h2v-2h2V9h-2V7H9z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M10 2a8 8 0 1 0 4.9 14.3l5.4 5.4 1.4-1.4-5.4-5.4A8 8 0 0 0 10 2zm0 2a6 6 0 1 1 0 12 6 6 0 0 1 0-12zm-1 3v2H7v2h2v2h2v-2h2V9h-2V7H9z"/></svg>') center / contain no-repeat;
}

/* サムネイル行がある場合：大画像→小画像の間隔を小画像同士の間隔(12px)と揃える */
.single-work-eyecatch:has(+ .works-gallery-thumbs) { margin-bottom: 12px; }
.works-gallery-thumbs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin: 0 0 40px; /* 下は大画像単体時と同じ40pxで本文と区切る */
}
.works-gallery-thumbs button { padding: 0; border: none; background: none; cursor: zoom-in; }
.works-gallery-thumbs img {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: opacity .25s;
}
.works-gallery-thumbs button:hover img { opacity: .85; }

.kc-lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.kc-lightbox[hidden] { display: none; }
.kc-lightbox-backdrop { position: absolute; inset: 0; background: rgba(20, 8, 8, .86); }
.kc-lightbox-body {
  position: relative; margin: 0; max-width: min(920px, 92vw);
  animation: kcLbIn .25s ease both;
}
@keyframes kcLbIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.kc-lightbox-body img {
  display: block; max-width: 100%; max-height: 76svh; margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.kc-lightbox-caption {
  color: #fff; font-size: 16px; font-weight: 500; line-height: 1.75; letter-spacing: .06em;
  text-align: center; padding: 18px 8px 0; max-width: 720px; margin-inline: auto;
}
.kc-lightbox-caption::before { content: ""; display: block; width: 36px; height: 2px; background: var(--gold); margin: 0 auto 12px; }
.kc-lightbox-caption:empty { display: none; }
.kc-lightbox-close {
  position: absolute; top: -14px; right: -14px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 18px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
@media (max-width: 640px) {
  .kc-lightbox-close { top: -12px; right: 2px; }
  .kc-lightbox-body img { max-height: 66svh; }
  .kc-lightbox-caption { font-size: 14px; padding-top: 14px; }
}


/* ---------- 本文＋画像の横並びレイアウト（社長挨拶・採用メッセージ） ---------- */
.msg-photo-row { display: flex; gap: 28px; align-items: center; margin-bottom: 0; }
.msg-photo-row .msg-photo-text { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.msg-photo-row .msg-photo { flex: 0 0 38%; margin: 0; }
.msg-photo-row .msg-photo img { display: block; width: 100%; height: auto; }
.msg-photo-row.no-photo { display: block; }
@media (max-width: 640px) {
  .msg-photo-row { flex-direction: column; gap: 16px; }
  .msg-photo-row .msg-photo { flex: none; width: 100%; }
}

/* ---------- 求人情報：応募CTA ---------- */
.recruit-cta-wrap { text-align: center; margin: 28px 0 8px; }
.recruit-cta {
  display: inline-block;
  background: var(--main); color: #fff;
  border: 1px solid var(--main);
  border-radius: 999px;
  padding: 14px 40px;
  font-size: 14px; letter-spacing: .1em;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.recruit-cta:hover { background: #fff; color: var(--main); }


/* ==========================================================
   施工実績一覧：カテゴリ選択＋横スライドショー（v1.14〜）
   ========================================================== */
.works-lead { font-size: 13px; color: var(--steel); margin: -8px 0 24px; }
.works-cat-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.works-cat-head .section-heading { margin: 0; }
.works-back {
  margin-left: auto; padding: 0 0 2px; font-size: 12px; color: var(--main); cursor: pointer;
  background: none; border: 0; border-bottom: 1px solid var(--main); font-family: inherit; letter-spacing: .04em;
}
.works-cat-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.works-cat-switch button {
  font-size: 12px; padding: 6px 18px; cursor: pointer; letter-spacing: .1em; font-family: inherit;
  border: 1px solid var(--main); background: #fff; color: var(--main); transition: background .2s, color .2s;
}
.works-cat-switch button.is-active, .works-cat-switch button:hover { background: var(--main); color: #fff; }
.works-cat-more { margin-top: 20px; font-size: 12px; text-align: right; }
.works-cat-more a { color: var(--main); border-bottom: 1px solid var(--main); }

/* カテゴリカード（カテゴリ名＋件数のみ。通常＝臙脂、ホバー＝一段明るい臙脂＋矢印ゴールド v1.16.2〜） */
.cat-card {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center;
  width: 100%; min-height: 150px; padding: 26px 70px 26px 30px; text-align: left; cursor: pointer; color: #fff;
  background: var(--main); border: 1px solid var(--main); font-family: inherit;
  transition: box-shadow .3s, transform .3s, background .3s, border-color .3s;
}
.cat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--gold); z-index: -1; transition: width .35s cubic-bezier(.22,.61,.36,1), background .35s; }
.cat-card:hover, .cat-card:focus-visible { background: var(--main-tint); border-color: var(--main-tint); box-shadow: 0 12px 32px rgba(59,14,16,.25); transform: translateY(-4px); outline: none; }
.cat-card:hover::before, .cat-card:focus-visible::before { width: 100%; background: var(--main-deep); }
.cat-card-name { display: block; font-family: var(--serif); font-size: 26px; letter-spacing: .1em; line-height: 1.3; }
.cat-card-count { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; letter-spacing: .15em; color: var(--gold-soft, #E5CFA0); }
.cat-card-count::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
.cat-card-count strong { font-family: var(--serif); font-size: 20px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.cat-card-arrow {
  position: absolute; right: 22px; top: 50%; translate: 0 -50%; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid currentColor; display: grid; place-items: center; color: #fff; font-size: 14px; transition: color .3s, background .3s, border-color .3s;
}
.cat-card:hover .cat-card-arrow, .cat-card:focus-visible .cat-card-arrow { background: var(--gold); border-color: var(--gold); color: var(--main-deep); }

/* スライダー本体（常に3枚表示） */
.kc-slider { position: relative; }
.kc-slider-viewport { overflow: hidden; }
.kc-slider-track { display: flex; gap: 28px; transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.kc-slider-item { flex: 0 0 calc((100% - 56px) / 3); min-width: 0; display: flex; }
.kc-slider-item > * { flex: 1 1 auto; }
.kc-slider-item .work-card { display: block; }
.cat-card.kc-slider-item { display: block; }
.kc-slider-nav {
  position: absolute; top: 33%; width: 40px; height: 40px; border-radius: 50%; z-index: 2; cursor: pointer;
  border: 1px solid var(--main); background: rgba(255,255,255,.95); color: var(--main); font-size: 18px; line-height: 1;
  display: grid; place-items: center; transition: background .2s, color .2s; font-family: inherit;
}
.kc-slider-nav:hover { background: var(--main); color: #fff; }
.kc-slider-prev { left: -20px; } .kc-slider-next { right: -20px; }
.kc-slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.kc-slider-dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: width .3s, background .3s; }
.kc-slider-dots button.is-active { width: 28px; border-radius: 4px; background: var(--main); }
.kc-slider-dots button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.kc-slider-status { text-align: center; font-size: 11px; color: var(--steel); margin-top: 8px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
/* 枚数が表示枚数以下のときは静止（JSがナビを非表示にする） */
.kc-slider:not(.is-active) .kc-slider-track { transform: none !important; }

@media (max-width: 900px) {
  .kc-slider-item { flex-basis: calc((100% - 28px) / 2); }
  .kc-slider-prev { left: 4px; } .kc-slider-next { right: 4px; }
}
@media (max-width: 640px) {
  .kc-slider-item { flex-basis: 100%; }
  .works-cat-head .works-back { margin-left: 0; }
  /* スマホ：矢印をカードの上に重ねず、ドットの両脇に並べる（‹ ●●● ›） */
  .kc-slider { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .kc-slider-viewport { order: 0; flex: 0 0 100%; }
  .kc-slider-nav { position: static; translate: none; width: 36px; height: 36px; font-size: 16px; margin-top: 18px; }
  .kc-slider-prev { order: 1; margin-left: auto; } .kc-slider-next { order: 3; margin-right: auto; }
  .kc-slider-dots { order: 2; margin-top: 18px; }
  .kc-slider-status { order: 4; flex: 0 0 100%; margin-top: 6px; }
  .cat-card { min-height: 120px; padding: 22px 64px 22px 26px; }
  .cat-card-name { font-size: 22px; }
}
