/* ==========================================================================
     1. デザインシステム & 変数定義（Phase 2に基づくトーン＆マナー）
     ========================================================================== */
:root {
  --color-primary: #1e3b29; /* 深森林緑：プロの気品・重厚感 */
  --color-primary-light: #365c43; /* 明るめの深緑：アクセント用 */
  --color-bg: #faf7f2; /* 生成り色：無垢の木肌・温かみ */
  --color-accent: #8c6239; /* 高貴茶：熟練の木工技術・ウォルナット */
  --color-accent-light: #f0e9df; /* 薄茶：コールの背景等 */
  --color-text: #2c251e; /* 焦茶：有機的な統一感をもたせた黒 */
  --color-white: #ffffff;
  --color-muted: #6e5f4b;

  --font-serif:
    "Times New Roman", "Georgia", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans:
    "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

/* ==========================================================================
     2. 全体・共通スタイル
     ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* 固定ヘッダー（高さ70px）との被りを防止するアンカースクロールオフセット */
[id] {
  scroll-margin-top: 90px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px; /* 推奨ベースサイズ */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
}

h2 {
  font-size: 1.5rem; /* スマホ：24px相当 */
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 0.75rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 5rem 0;
}

/* ==========================================================================
     3. ヘッダー & ナビゲーション
     ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(5px);
  z-index: 1000;
  border-bottom: 1px solid rgba(140, 98, 57, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: bold;
  font-size: 1.15rem;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.logo span {
  font-size: 0.75rem;
  display: block;
  font-family: var(--font-sans);
  color: var(--color-muted);
  font-weight: normal;
  letter-spacing: 0.02em;
}

.logo img {
  height: 40px;
  width: auto;
}

/* PCナビゲーション */
.nav-pc {
  display: none;
}

.nav-pc ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-pc a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.5rem 0;
}

.nav-pc a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-pc a:hover::after {
  width: 100%;
}

/* スマホナビゲーション（三本線ハンバーガー） */
.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.menu-btn:hover {
  background-color: rgba(30, 59, 41, 0.05);
}

.menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 2px;
  margin: 3px 0;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* スマホメニュー開時（三本線 → × に滑らかに変形） */
.menu-btn.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-btn.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-btn.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* スマホメニュー展開時の動的処理用スタイル（滑らかなフェードイン＆スライドダウン） */
.nav-sp {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s;
  z-index: 999;
}

.nav-sp.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-sp ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-sp li {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-sp.is-open li {
  opacity: 1;
  transform: translateY(0);
}

/* リスト項目のフェードインのズレ（Stagger効果） */
.nav-sp.is-open li:nth-child(1) { transition-delay: 0.05s; }
.nav-sp.is-open li:nth-child(2) { transition-delay: 0.1s; }
.nav-sp.is-open li:nth-child(3) { transition-delay: 0.15s; }
.nav-sp.is-open li:nth-child(4) { transition-delay: 0.2s; }

.nav-sp a {
  display: block;
  padding: 1.1rem 24px;
  border-bottom: 1px solid rgba(140, 98, 57, 0.08);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.nav-sp a:active,
.nav-sp a:hover {
  background-color: var(--color-bg);
  color: var(--color-accent);
  padding-left: 28px;
}

/* メニュー用背景オーバーレイ（背景の暗転） */
.nav-sp-overlay {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 70px);
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  z-index: 998;
}

.nav-sp-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
     4. Section 1: Heroエリア（ファーストビュー）
     ========================================================================== */
.hero {
  height: 100vh;
  min-height: 600px;
  position: relative;
  display: flex;
  align-items: center;
  padding-top: 70px;
  overflow: hidden;
  background-color: var(--color-primary);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35; /* 文字の視認性を確保するために暗くマスク */
}

.hero-content {
  position: relative;
  z-index: 10;
  color: var(--color-white);
  max-width: 650px;
}

.hero-title {
  font-size: 1.75rem; /* スマホ */
  line-height: 1.4;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-subtitle {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--color-bg);
  border-left: 2px solid var(--color-accent);
  padding-left: 15px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-text {
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: rgba(250, 247, 242, 0.85);
  margin-bottom: 2rem;
}

.btn-cta {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 1rem 2.5rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  border-radius: 2px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-align: center;
}

.btn-cta:hover {
  background-color: #734e2a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  opacity: 1;
}

/* ==========================================================================
     5. Section 2: 悩みへの共感・基本スタンス
     ========================================================================== */
.empathy {
  background-color: var(--color-white);
}

.empathy-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.empathy-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-weight: 500;
}

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

.empathy-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.empathy-item::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 2px;
  color: #a63a2b; /* 不安を象徴する赤 */
  font-weight: bold;
  font-size: 1.1rem;
}

.stance-box {
  background-color: var(--color-accent-light);
  border-left: 4px solid var(--color-primary);
  padding: 2rem;
  margin-top: 1rem;
}

.stance-title {
  color: #a63a2b;
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

.stance-text {
  margin: 0;
  font-weight: 500;
}

/* ==========================================================================
     6. Section 3: 解決策・提供価値（選ばれる理由）
     ========================================================================== */
.value-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.value-card {
  background-color: var(--color-white);
  border: 2px solid transparent;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.value-card:hover {
  border: 2px solid var(--color-accent); /* 茶色のソリッドライン */
  box-shadow: 0 6px 18px rgba(140, 98, 57, 0.15);
}

.value-arrow {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  color: var(--color-accent); /* 濃い茶色 */
  padding: 0.25rem 0;
}

.arrow-svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  transform: rotate(90deg); /* モバイル環境は下向き三角 */
  opacity: 0.2;
  animation: arrowFade 1.4s infinite ease-in-out;
}

.arrow-svg:nth-child(1) {
  animation-delay: 0s;
}
.arrow-svg:nth-child(2) {
  animation-delay: 0.22s;
}
.arrow-svg:nth-child(3) {
  animation-delay: 0.44s;
}

/* 矢印の純粋な点滅アニメーション (不透明度の変化のみ) */
@keyframes arrowFade {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

.value-img-wrap {
  height: 240px;
  overflow: hidden;
  position: relative;
  background-color: var(--color-primary);
}

.value-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.value-body {
  padding: 2rem;
}

.value-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-accent);
  font-weight: bold;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.value-body h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.value-body p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

/* ==========================================================================
     7. Section 4: 施工実績（Masonry / 積み上げ式画像ギャラリー）
     ========================================================================== */
.works {
  background-color: var(--color-white);
}

.works-desc {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 0.95rem;
}

/* 施工実績ギャラリー（CSS columns 方式のメイソンリー：JS不要・重複なし） */
.masonry-gallery {
  columns: 2;
  column-gap: 12px;
  width: 100%;
}

/* JSが動的生成した masonry-col はレイアウトに影響させない（旧キャッシュ対応） */
.masonry-col {
  display: contents;
}

.masonry-item {
  break-inside: avoid;
  display: block;
  width: 100%;
  margin-bottom: 12px;
  background-color: var(--color-white);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

/* 縦横比のクラス指定（縦長・横長・正方形それぞれの美しいアスペクト比） */
.img-landscape {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.img-portrait {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.img-square {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.masonry-caption {
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  color: var(--color-muted);
  background-color: var(--color-white);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
     8. Section 5: 会社概要
     ========================================================================== */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background-color: var(--color-white);
}

.company-table th,
.company-table td {
  padding: 1.2rem 1rem;
  border-bottom: 1px solid rgba(140, 98, 57, 0.15);
  text-align: left;
  font-size: 0.95rem;
}

.company-table th {
  width: 30%;
  color: var(--color-primary);
  font-weight: bold;
  vertical-align: top;
}

.company-table td {
  width: 70%;
}

.address-group {
  margin-bottom: 1rem;
}

.address-group:last-child {
  margin-bottom: 0;
}

.address-label {
  display: inline-block;
  font-size: 0.8rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.25rem;
  font-weight: normal;
}

/* ==========================================================================
     9. Section 6: CTA（お問い合わせメールフォーム）
     ========================================================================== */
.contact {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.contact h2 {
  color: var(--color-white);
}

.contact h2::after {
  background-color: var(--color-accent);
}

.contact-desc {
  text-align: center;
  max-width: 600px;
  margin: -1.5rem auto 3rem auto;
  font-size: 0.95rem;
  color: rgba(250, 247, 242, 0.85);
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--color-white);
  padding: 2.5rem 1.5rem;
  color: var(--color-text);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.form-group label .required {
  color: #a63a2b;
  margin-left: 4px;
  font-size: 0.8rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dcd1bf;
  background-color: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  border-radius: 2px;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary-light);
  background-color: var(--color-white);
}

select.form-control {
  height: 46px;
}

.form-submit-wrap {
  text-align: center;
  margin-top: 2.5rem;
}

.btn-submit {
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  font-size: 1rem;
}

/* ==========================================================================
     10. フッター
     ========================================================================== */
footer {
  background-color: #122419;
  color: rgba(250, 247, 242, 0.6);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  border-top: 1px solid rgba(250, 247, 242, 0.05);
}

/* ==========================================================================
     11. TOPへ戻るボタン
     ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.is-show {
  opacity: 0.5;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-primary-light);
  transform: translateY(-3px);
  opacity: 1;
}

/* ==========================================================================
     12. レスポンシブ対応（Media Queries）
     ========================================================================== */

/* ==========================================================================
     13. 画像ポップアップ用モーダル
     ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* 透過50%の黒背景 */
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 2001;
  background-color: var(--color-white);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(20px); /* 浮かび上がるアニメーションの開始位置 */
  transition: transform 0.3s ease;
}

.modal.is-open .modal-content {
  transform: translateY(0);
}

.modal-nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s, transform 0.2s;
  user-select: none;
}

.modal-nav:hover {
  background-color: rgba(0, 0, 0, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s;
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-img-wrap {
  width: 100%;
  background-color: #1a1a1a; /* 画像の背景（余白部分）を暗くして締める */
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 60vh;
}

.modal-img-wrap img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
}

.modal-text {
  padding: 1.5rem;
  background-color: var(--color-white);
  color: var(--color-text);
  overflow-y: auto;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

body.is-modal-open {
  overflow: hidden; /* 背景のスクロールをロック */
}

.masonry-item {
  cursor: pointer;
}

/* タブレット・PCサイズ以上のブレイクポイント（768px〜） */
@media (min-width: 768px) {
  h2 {
    font-size: 2rem; /* 32px */
    margin-bottom: 4rem;
  }

  .section-padding {
    padding: 7rem 0;
  }

  /* ヘッダー・ナビのPC最適化 */
  .menu-btn {
    display: none;
  }
  .nav-pc {
    display: block;
  }

  /* Heroエリア */
  .hero-title {
    font-size: 2.85rem; /* 46px相当 */
    line-height: 1.35;
  }
  .hero-subtitle {
    font-size: 1.15rem;
  }
  .hero-text {
    font-size: 1rem;
  }

  /* 共感セクション */
  .empathy-intro {
    font-size: 1.15rem;
  }
  .empathy-item {
    font-size: 1.1rem;
    padding-left: 2.5rem;
  }

  /* 提供価値（3カラム + 仲介矢印） */
  .value-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
  }
  .value-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .value-arrow {
    flex-direction: row;
    padding: 0 0.5rem;
  }
  .arrow-svg {
    transform: rotate(0deg); /* PC環境は右向き三角 */
  }
  .value-img-wrap {
    height: 200px;
  }
  .value-body {
    flex-grow: 1;
  }

  /* 施工実績（PC時は3カラム・隙間を拡張） */
  .masonry-gallery {
    columns: 3;
    column-gap: 20px;
  }
  .masonry-item {
    margin-bottom: 20px;
  }

  /* 会社概要 */
  .company-table th,
  .company-table td {
    padding: 1.5rem;
    font-size: 1rem;
  }

  /* CTAフォーム */
  .form-container {
    padding: 4rem 3.5rem;
  }

  .back-to-top {
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
  }

  /* モーダルのPC向け調整 */
  .modal-content {
    max-height: 85vh;
  }
  .modal-img-wrap,
  .modal-img-wrap img {
    max-height: 70vh;
  }
  .modal-title {
    font-size: 1.25rem;
  }
  .modal-desc {
    font-size: 0.95rem;
  }
}

/* 大型ディスプレイ用の細かな調整（1024px〜） */
@media (min-width: 1024px) {
  .value-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
     プライバシーポリシー
   ========================================================================== */
.privacy-policy {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(140, 98, 57, 0.2);
}

.privacy-policy h3 {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: var(--font-serif);
}

.privacy-box {
  background-color: var(--color-white);
  border: 1px solid rgba(140, 98, 57, 0.15);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.privacy-item {
  margin-bottom: 2rem;
}

.privacy-item:last-child {
  margin-bottom: 0;
}

.privacy-item h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
  padding-bottom: 0.25rem;
}

.privacy-item p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0;
}

/* プライバシーポリシー 外部リンクボタン */
.btn-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-primary);
  background-color: var(--color-white);
  border: 1px solid var(--color-accent);
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-privacy:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  opacity: 1;
}

/* ==========================================================================
     フッター
   ========================================================================== */
footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 3rem 0 2rem 0;
  margin-top: 4rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.2rem 2rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--color-white);
  text-decoration: underline;
  opacity: 1;
}

.copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85); /* コントラスト比向上（WCAG 2.1 AA適合） */
  margin: 0;
  text-align: center;
}

/* ==========================================================================
     アクセシビリティ & ユニバーサルデザイン強化
   ========================================================================== */
/* キーボード操作時のわかりやすいフォーカスリング */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
     フォーム送信レスポンス通知メッセージ
   ========================================================================== */
.form-status {
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
  font-weight: 500;
}

.form-status.success {
  background-color: #e6f4ea;
  color: #137333;
  border: 1px solid #ceead6;
}

.form-status.error {
  background-color: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

/* ==========================================================================
     送信完了サンクス表示エリア
   ========================================================================== */
.form-thanks {
  text-align: center;
  padding: 3rem 1.5rem;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.thanks-icon {
  width: 70px;
  height: 70px;
  background-color: #137333;
  color: var(--color-white);
  font-size: 2.2rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem auto;
  font-weight: bold;
}

.form-thanks h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.form-thanks p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.form-thanks .thanks-note {
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ==========================================================================
   事業領域・対応概要セクション（対象者・提供内容・対応エリア）
   ========================================================================== */
.scope-section {
  background-color: var(--color-bg);
  /* 線による区切りは使わず、背景色の面切り替えで統一 */
}

.scope-container {
  max-width: 1000px;
  margin: 0 auto;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.scope-block {
  background-color: var(--color-white);
  padding: 2.25rem 1.75rem;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scope-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.scope-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
}

.scope-block .scope-header:not(:first-child) {
  margin-top: 1.75rem;
}

.scope-badge {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-transform: uppercase;
  font-weight: 700;
}

.scope-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: 0.03em;
}

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

.scope-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.925rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 0.6rem;
}

.scope-list li:last-child {
  margin-bottom: 0;
}

.scope-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  top: 0.15em;
  font-size: 0.55rem;
  color: var(--color-accent);
}

@media (max-width: 900px) {
  .scope-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ==========================================================================
   企業理念セクション（Philosophy / 自分軸）
   ========================================================================== */
.philosophy-section {
  background-color: var(--color-bg);
  padding: 4rem 0;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: center;
}

.philosophy-img-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(30, 59, 41, 0.12), 0 0 0 1px rgba(140, 98, 57, 0.25);
  background-color: var(--color-white);
  padding: 0.75rem;
}

.philosophy-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

.philosophy-body {
  padding: 1rem 0;
}

.philosophy-badge {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
}

.philosophy-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--color-primary);
  line-height: 1.5;
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 1rem;
  text-align: center;
}

.philosophy-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

.philosophy-text {
  font-size: 0.975rem;
  line-height: 2;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.philosophy-text p {
  margin-bottom: 1rem;
}

.philosophy-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .philosophy-img-wrap {
    max-width: 420px;
    margin: 0 auto;
  }

  .philosophy-title {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   画像拡大表示用モーダル（ポップアップ）
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  background-color: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-img-wrap {
  background-color: #111;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: 65vh;
  overflow: hidden;
}

.modal-img-wrap img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
}

.modal-text {
  padding: 1.25rem 1.5rem;
  background-color: var(--color-white);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-prev {
  left: 10px;
}

.modal-next {
  right: 10px;
}

body.is-modal-open {
  overflow: hidden;
}








