/* ==========================================================
   丸栄ニューウェーブ株式会社 コーポレートサイト
   ========================================================== */

:root {
  --text: #1d1d1f;
  --text-sub: #6e6e73;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --text-on-dark: #f5f5f7;
  --accent: #0f2f72;
  --accent-hover: #1a3f94;
  --radius: 20px;
  --nav-height: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ----------------------------------------------------------
   ナビゲーション
   ---------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo:hover {
  text-decoration: none;
  opacity: 0.7;
}

.nav-logo span {
  font-weight: 400;
  color: var(--text-sub);
  font-size: 12px;
  margin-left: 8px;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.5vw, 28px);
  align-items: center;
}

.nav-links a {
  position: relative;
  color: var(--text);
  font-size: 13.5px;
  opacity: 0.85;
  transition: opacity 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent);
  text-decoration: none;
}

.nav-links a.is-current {
  color: var(--accent);
  opacity: 1;
}

/* PC表示: ホバーで下線が左からスッと伸びる */
@media (min-width: 701px) {
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-links a:hover::after,
  .nav-links a.is-current::after {
    transform: scaleX(1);
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }

.nav.is-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    padding: 12px 22px 24px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

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

  .nav-links a {
    font-size: 17px;
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
}

/* ----------------------------------------------------------
   お引越し専用フリーダイヤルボタン（ナビ直下）
   ---------------------------------------------------------- */

/* 本文と同じコンテナ幅の中で右寄せするための固定ラッパー */
.tel-ribbon-wrap {
  position: fixed;
  top: calc(var(--nav-height) + 12px);
  left: 0;
  right: 0;
  z-index: 900;
  pointer-events: none;
}

.tel-ribbon-wrap .container {
  display: flex;
  justify-content: flex-end;
}

.tel-ribbon {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 980px;
  background: linear-gradient(135deg, #16a34a, #0f8a3c);
  box-shadow: 0 2px 6px rgba(15, 138, 60, 0.35), 0 8px 22px rgba(15, 138, 60, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: telPulse 2s ease-out infinite;
}

@keyframes telPulse {
  0% { box-shadow: 0 2px 6px rgba(15, 138, 60, 0.35), 0 8px 22px rgba(15, 138, 60, 0.28), 0 0 0 0 rgba(22, 163, 74, 0.8); }
  70% { box-shadow: 0 2px 6px rgba(15, 138, 60, 0.35), 0 8px 22px rgba(15, 138, 60, 0.28), 0 0 0 16px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 2px 6px rgba(15, 138, 60, 0.35), 0 8px 22px rgba(15, 138, 60, 0.28), 0 0 0 0 rgba(22, 163, 74, 0); }
}

.tel-ribbon:hover {
  text-decoration: none;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 10px rgba(15, 138, 60, 0.4), 0 14px 32px rgba(15, 138, 60, 0.35);
  animation-play-state: paused;
}

.tel-ribbon .freedial-mark {
  height: 18px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.tel-ribbon-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.tel-ribbon strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
  .tel-ribbon {
    animation: none;
  }
}

@media (max-width: 700px) {
  .tel-ribbon {
    right: 14px;
    padding: 9px 18px;
    gap: 8px;
  }

  .tel-ribbon-label {
    display: none;
  }
}

/* ----------------------------------------------------------
   共通レイアウト
   ---------------------------------------------------------- */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

.container-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 22px;
}

.section {
  padding: 110px 0;
}

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

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

/* ミッドナイトブルー（深い紺）背景＋白文字のセクション */
.section-midnight {
  background: #0f1d40;
  color: #ffffff;
}
.section-midnight .eyebrow { color: #c7d2ec; }
.section-midnight .headline-sm,
.section-midnight .lead { color: #ffffff; }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.headline {
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 24px;
}

.headline-sm {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 20px;
}

.lead {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-sub);
  line-height: 1.9;
}

.section-dark .lead {
  color: #a1a1a6;
}

.text-center {
  text-align: center;
}

/* ----------------------------------------------------------
   ヒーロー
   ---------------------------------------------------------- */

.hero {
  padding: calc(var(--nav-height) + 110px) 0 110px;
  text-align: center;
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(15, 47, 114, 0.10), transparent 60%),
    radial-gradient(900px 480px at 15% 0%, rgba(74, 111, 192, 0.10), transparent 55%),
    var(--bg);
}

.hero .headline {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.15;
}

.hero .lead {
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero-sub {
  padding: calc(var(--nav-height) + 90px) 0 70px;
  text-align: center;
  background:
    radial-gradient(1000px 420px at 60% -20%, rgba(15, 47, 114, 0.08), transparent 60%),
    var(--bg);
}

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

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost:hover {
  background: rgba(15, 47, 114, 0.06);
}

.btn-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.link-arrow::after {
  content: " ›";
  font-weight: 600;
}

/* ----------------------------------------------------------
   カードグリッド
   ---------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 56px;
}

/* 4カラム固定（カードが折り返さず1行で並ぶ）。タブレットで2列、スマホで1列 */
.card-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 860px) {
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .card-grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 16px 40px rgba(0, 0, 0, 0.09);
}

.section-dark .card {
  background: #1d1d1f;
  box-shadow: none;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0f2f72, #4a6fc0);
  color: #fff;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.85;
  flex-grow: 1;
}

.section-dark .card h3 {
  color: var(--text-on-dark);
}

.section-dark .card p {
  color: #a1a1a6;
}

.card .card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(15, 47, 114, 0.08);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 16px;
}

.card .link-arrow {
  margin-top: 20px;
  font-size: 15px;
  font-weight: 500;
}

/* ----------------------------------------------------------
   数値ハイライト
   ---------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-top: 64px;
  text-align: center;
}

.stat-value {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f2f72, #4a6fc0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-value small {
  font-size: 0.45em;
  font-weight: 600;
}

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

.section-dark .stat-label {
  color: #a1a1a6;
}

/* ----------------------------------------------------------
   テーブル（会社概要など）
   ---------------------------------------------------------- */

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
  font-size: 16px;
}

.info-table th,
.info-table td {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 180px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
    padding: 8px 0;
  }

  .info-table th {
    border-bottom: none;
    padding-top: 20px;
  }
}

/* ----------------------------------------------------------
   ホワイト物流 自主行動宣言の取組項目テーブル
   ---------------------------------------------------------- */

.prose .pledge-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0 8px;
  font-size: 15px;
  line-height: 1.7;
}

.prose .pledge-table th,
.prose .pledge-table td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.prose .pledge-table thead th {
  background: #0f1d40;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.prose .pledge-table td:nth-child(1),
.prose .pledge-table th:nth-child(1) {
  width: 48px;
  text-align: center;
  white-space: nowrap;
}

.prose .pledge-table td:nth-child(2),
.prose .pledge-table th:nth-child(2) {
  width: 92px;
  text-align: center;
  white-space: nowrap;
}

.prose .pledge-table td:nth-child(3),
.prose .pledge-table th:nth-child(3) {
  width: 200px;
  font-weight: 600;
}

.prose .pledge-pr {
  margin-top: 28px;
  padding: 20px 22px;
  background: rgba(15, 29, 64, 0.04);
  border-left: 4px solid #0f1d40;
  border-radius: 8px;
}

@media (max-width: 640px) {
  .prose .pledge-table {
    font-size: 13px;
    line-height: 1.6;
  }
  .prose .pledge-table th,
  .prose .pledge-table td {
    padding: 8px 8px;
  }
  .prose .pledge-table td:nth-child(2),
  .prose .pledge-table th:nth-child(2) {
    width: 64px;
  }
  .prose .pledge-table td:nth-child(3),
  .prose .pledge-table th:nth-child(3) {
    width: auto;
  }
}

/* ----------------------------------------------------------
   拠点カード
   ---------------------------------------------------------- */

.office-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.office-card + .office-card {
  margin-top: 24px;
}

.office-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.office-card .office-area {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}

.office-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  font-size: 15px;
  margin-bottom: 16px;
}

.office-meta dt {
  color: var(--text-sub);
  font-weight: 600;
  white-space: nowrap;
}

.office-meta dd {
  margin: 0;
}

.office-card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.85;
}

/* ----------------------------------------------------------
   ニュース
   ---------------------------------------------------------- */

.news-list {
  margin-top: 48px;
}

.news-item {
  display: flex;
  gap: 32px;
  padding: 26px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  align-items: baseline;
}

.news-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.news-date {
  font-size: 14px;
  color: var(--text-sub);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.news-title {
  font-size: 17px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .news-item {
    flex-direction: column;
    gap: 4px;
  }
}

/* ----------------------------------------------------------
   採用
   ---------------------------------------------------------- */

.job-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
@media (max-width: 520px) {
  .job-grid { grid-template-columns: 1fr; }
}

.job-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.job-card .job-type {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 14px;
}

.job-card .job-type.is-part {
  background: #34c759;
}

.job-card .job-type.is-contract {
  background: #ff9f0a;
}

.job-meta {
  font-size: 14.5px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
}

.job-meta dt {
  color: var(--text-sub);
  font-weight: 600;
  white-space: nowrap;
}

.job-meta dd {
  margin: 0;
}

/* ----------------------------------------------------------
   CTA
   ---------------------------------------------------------- */

.cta {
  text-align: center;
  padding: 110px 0;
}

.cta .lead {
  max-width: 620px;
  margin: 0 auto 40px;
}

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

.footer {
  background: var(--bg-alt);
  /* 下部固定のギミック帯（104px）に最終行が隠れないよう、帯の高さぶん余白を確保 */
  padding: 48px 0 144px;
  font-size: 13px;
  color: var(--text-sub);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-links a {
  color: var(--text-sub);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-contact {
  margin-bottom: 16px;
  line-height: 2;
}

.footer-copy {
  font-size: 12px;
}

/* ----------------------------------------------------------
   写真ヒーロー
   ---------------------------------------------------------- */

.hero-photo {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}

.hero-photo .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.30),
    rgba(0, 0, 0, 0.05) 45%,
    rgba(0, 0, 0, 0.60) 100%
  );
}

.hero-photo .hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: calc(var(--nav-height) + 120px) 0 90px;
}

.hero-photo .eyebrow {
  color: #b7c6ea;
}

.hero-photo .headline {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-photo .lead {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero-photo .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.hero-photo .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ----------------------------------------------------------
   写真つきセクション
   ---------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

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

/* 図版（間取り図・面積図・アクセスマップ）は全体を表示し、角丸で四隅が切れないよう内側に白い余白を設ける */
.split-img.is-diagram {
  background: #fff;
  padding: 14px;
  display: flex;
  align-items: center;
}

.split-img.is-diagram img {
  height: auto;
  object-fit: contain;
}

@media (max-width: 800px) {
  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* カード上部の写真 */
.card-photo {
  padding: 0 0 32px;
  overflow: hidden;
}

.card-photo img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

/* 認証ロゴ（Gマーク・グリーン経営認証など）は切り抜かず全体を表示 */
.card-photo img.is-logo {
  object-fit: contain;
  background: #fff;
  padding: 18px;
}

/* 認証・認定ロゴのストリップ（各ロゴは独立画像／縦幅固定で高さを揃える） */
.cert-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 44px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cert-strip img {
  height: 78px;
  width: auto;
  display: block;
}

@media (max-width: 600px) {
  .cert-strip { gap: 22px 30px; }
  .cert-strip img { height: 60px; }
}

.card-photo h3,
.card-photo p,
.card-photo .link-arrow {
  padding: 0 32px;
}

.card-photo h3 {
  margin-top: 24px;
}

/* 拠点フォトタイル */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 56px;
}

/* 拠点タイル: 1行目=2枚（大きく）、3枚目以降=3枚ずつ。端数の行は中央寄せ。
   拠点数が増減しても崩れず、各タイルの大きさは一定。 */
.office-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.office-grid .photo-tile:nth-child(1),
.office-grid .photo-tile:nth-child(2) {
  flex: 0 0 calc((100% - 20px) / 2);
  max-width: calc((100% - 20px) / 2);
}

.office-grid .photo-tile:nth-child(n+3) {
  flex: 0 0 calc((100% - 40px) / 3);
  max-width: calc((100% - 40px) / 3);
}

@media (max-width: 700px) {
  .office-grid .photo-tile {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

.photo-tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: block;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-tile:hover img {
  transform: scale(1.04);
}

.photo-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.55));
}

.tile-label {
  position: absolute;
  left: 20px;
  bottom: 16px;
  z-index: 1;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.tile-label small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

/* ニュースのサムネイル */
.news-item .news-thumb {
  width: 128px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}

.news-item.has-thumb {
  align-items: center;
}

@media (max-width: 600px) {
  .news-item .news-thumb {
    width: 100%;
    height: 160px;
  }
}

/* ナビのロゴ画像 */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

/* ----------------------------------------------------------
   ヒーロースライダー（クロスフェード）
   ---------------------------------------------------------- */

.hero-slider {
  position: relative;
  overflow: hidden;
  color: #fff;
}

.slider-track {
  display: flex;
  min-height: 92vh;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero-slider .slide {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-slider .slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slider .slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.06),
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.28) 100%
  );
}

.hero-slider .slide-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: 110px;
}

.hero-slider .slide-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #cfdcf7;
  margin-bottom: 12px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-slider .slide-title {
  font-size: clamp(28px, 4.8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 16px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 2px 24px rgba(0, 0, 0, 0.5);
}

.hero-slider .slide-text {
  font-size: clamp(14px, 1.8vw, 17px);
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.9;
  max-width: 780px;
  margin-bottom: 28px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 12px rgba(0, 0, 0, 0.5);
}

.slider-dots {
  position: absolute;
  bottom: 36px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  z-index: 2;
}

.slider-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.slider-dots button.is-active {
  background: #fff;
  transform: scale(1.25);
}

/* ----------------------------------------------------------
   エリアマップカード・お問合わせ・フッター文書リンク
   ---------------------------------------------------------- */

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 56px;
}

.area-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.area-card .area-map {
  position: relative;
  width: min(420px, 92%);
  margin: 0 auto 24px;
}

.area-map img {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ホバーで対応エリアの円を地図の背面に表示（元サイトと同じ配置） */
.area-map::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  background-repeat: no-repeat;
}

.area-map-chubu::before {
  background-image: url("/images/legacy/2024/12/chubu_b-1.png");
  background-size: 61% auto;
  background-position: 32% 25%;
}

.area-map-kyushu::before {
  background-image: url("/images/legacy/2024/12/kyushu_b-2.png");
  background-size: 67% auto;
  background-position: 48% 43%;
}

.area-card:hover .area-map::before {
  opacity: 1;
}

.area-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.area-tags {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.area-tags span {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(15, 47, 114, 0.08);
  border-radius: 999px;
  padding: 4px 16px;
}

.contact-panel {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  padding: 48px 44px;
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}

.contact-panel h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.contact-panel .contact-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.contact-panel .contact-value.tel {
  font-size: clamp(24px, 3.5vw, 32px);
  color: var(--accent);
}

.contact-panel .contact-note {
  font-size: 13.5px;
  color: var(--text-sub);
  margin-top: 4px;
}

@media (max-width: 700px) {
  .contact-panel {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }
}

.footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 12.5px;
}

.footer-docs a {
  color: var(--text-sub);
}

.footer-docs a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ----------------------------------------------------------
   下層ページ用部品
   ---------------------------------------------------------- */

/* 理念ブロック */
.philosophy-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 44px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

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

.philosophy-card .philosophy-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 14px;
}

.philosophy-card .philosophy-words {
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 12px;
  white-space: nowrap;
}

.philosophy-card p {
  font-size: 15.5px;
  color: var(--text-sub);
  line-height: 2;
}

/* 沿革タイムライン */
.timeline {
  margin-top: 56px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(15, 47, 114, 0.25);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.timeline-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.timeline-body {
  font-size: 16px;
  line-height: 1.9;
}

/* 組織図 */
.org-chart {
  margin-top: 56px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.org-chart img {
  display: block;
  width: 100%;
  max-width: 1200px;
  min-width: 680px;
  height: auto;
  margin: 0 auto;
}

/* 拠点詳細（写真＋情報の2カラム） */
.office-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 72px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.office-detail:last-child {
  border-bottom: none;
}

.office-detail .office-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.office-detail .office-photo img {
  width: 100%;
  display: block;
}

.office-detail h3 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.office-detail .office-sub {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

.office-detail p {
  font-size: 15.5px;
  color: var(--text-sub);
  line-height: 2;
  margin-bottom: 16px;
}

.access-list {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-sub);
}

.access-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.access-list li::before {
  content: "›";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 800px) {
  .office-detail {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* グループ会社リスト */
.group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.group-list li {
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.group-list li:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05), 0 10px 26px rgba(0, 0, 0, 0.10);
}

.group-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.group-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

.group-list a::after {
  content: "↗";
  font-size: 14px;
  color: var(--text-sub);
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.group-list a:hover::after {
  color: var(--accent);
}

/* トップ4本柱（アイコン＋文字のミニマル型） */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px 24px;
  margin-top: 64px;
}

.pillar {
  display: block;
  text-align: center;
  color: var(--text);
  transition: transform 0.3s ease, color 0.3s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  color: var(--accent);
  text-decoration: none;
}

.pillar svg {
  width: 54px;
  height: 54px;
  display: block;
  margin: 0 auto 20px;
  stroke: currentColor;
  transition: stroke 0.3s ease;
}

.pillar h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.pillar p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
}

.pillar .link-arrow {
  display: inline-block;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pillar:hover .link-arrow {
  opacity: 1;
  transform: translateY(0);
}

/* トップ3本柱のフォトカード */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 56px;
}

.feature-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.10);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10), 0 20px 44px rgba(0, 0, 0, 0.16);
  text-decoration: none;
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.feature-card:hover img {
  transform: scale(1.05);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.62));
}

.feature-body {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  z-index: 1;
  color: #fff;
}

.feature-body h3 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.feature-body p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.feature-body .link-arrow {
  display: inline-block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

/* サービスのアイコン（個別・横並び・縦横比維持・1行最大8個）・ブランドロゴ */
.icon-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  margin: 28px 0 0;
  max-width: 100%;
}
/* 閲覧時：常に「1行8個」の幅で固定し左詰め。8個未満は右側に空白ができてよい。
   どの事業でもアイコンの大きさは一定。画像は縦横比を維持。 */
.icon-strip { justify-content: flex-start; align-items: flex-end; }
.icon-strip .icon-cell {
  flex: 0 0 calc((100% - 16px * 7) / 8);
  max-width: calc((100% - 16px * 7) / 8);
  min-width: 0;
}
/* 閲覧時は幅固定・高さも固定のボックスに収め、縦長アイコン(WMS等)も高さを揃える */
.icon-strip:not(.is-editing) .icon-cell {
  height: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.icon-strip:not(.is-editing) .icon-cell img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
/* 編集時：操作ボタンが収まるよう自然サイズ＋縦積み */
.icon-strip.is-editing .icon-cell {
  flex: 0 0 auto;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.icon-strip.is-editing .icon-cell img {
  width: auto;
  height: 56px;
}
.icon-strip.is-editing .icon-cell .block-controls {
  margin: 0;
}

/* 見出しと写真の開始位置を揃える上端揃えスプリット */
.split-top {
  align-items: start;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  justify-content: center;
}

.brand-row img {
  height: 40px;
  width: auto;
}

/* Googleマップ埋め込み */
.map-embed {
  margin-top: 24px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.08);
}

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

/* 記事詳細（WordPressから取得した本文） */
.article-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 12px 0 8px;
}

.article-date {
  font-size: 14px;
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
  margin-bottom: 32px;
}

.article-hero {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.prose {
  font-size: 17px;
  line-height: 2;
  color: #333;
}

.prose p {
  margin-bottom: 1.6em;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.4em 0;
}

.prose h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.8em 0 0.7em;
}

.prose h3 {
  font-size: 21px;
  font-weight: 700;
  margin: 1.6em 0 0.6em;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
}

.prose ul,
.prose ol {
  margin: 0 0 1.6em 1.4em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li {
  margin-bottom: 0.5em;
}

.prose figure {
  margin: 1.4em 0;
}

.prose figcaption {
  font-size: 13.5px;
  color: var(--text-sub);
  text-align: center;
  margin-top: 8px;
}

.prose iframe {
  max-width: 100%;
  border-radius: 12px;
}

/* 求人の有効期限バッジ */
.job-expire {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 14px;
}

/* ----------------------------------------------------------
   スクロール連動 配送トラック（遊び心ギミック）
   ---------------------------------------------------------- */

.scroll-truck {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 104px;
  z-index: 400;
  pointer-events: none;
  overflow: hidden;
  /* 最初は完全に非表示。スクロールが始まると .started が付いてフェードイン */
  opacity: 0;
  transition: opacity 0.8s ease;
}
.scroll-truck.started { opacity: 1; }

/* ランドマーク（富士山・東京タワー・レインボーブリッジ） */
.scroll-truck .landmark {
  position: absolute;
  bottom: 14px;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
.scroll-truck .landmark svg { width: 100%; height: auto; display: block; }
.scroll-truck .lm-fuji { width: 150px; }
.scroll-truck .lm-tower { width: 40px; }
.scroll-truck .lm-bridge { width: 178px; }
.scroll-truck .lm-castle { width: 62px; opacity: 0.96; }
.scroll-truck .lm-ferris { width: 54px; }
.scroll-truck .lm-torii { width: 46px; }
.scroll-truck .lm-pagoda { width: 46px; }

/* 鳥居：夜は朱色が沈む */
.scroll-truck .torii { transition: fill 0.6s ease; }
.scroll-truck.night .torii { fill: #7a2f2a; }

/* ----------------------------------------------------------
   季節で変わる街路樹（JSが .season-* を付与）
   1-2月:冬枯れ / 3-4月:桜 / 5-8月:緑 / 9-10月:紅葉 / 11-12月:クリスマス
   ---------------------------------------------------------- */
/* 桜・紅葉は広葉樹なので、針葉樹の形を隠して丸い樹冠に差し替える（色だけ季節で変える） */
.scroll-truck .tree-canopy { display: none; }
.scroll-truck.season-sakura .tree-canopy,
.scroll-truck.season-autumn .tree-canopy { display: block; }
.scroll-truck.season-sakura .tree,
.scroll-truck.season-autumn .tree { display: none; }
.scroll-truck.season-autumn .tree-canopy { fill: url(#autumn); }
.scroll-truck.night.season-sakura .tree-canopy { fill: #6b4a5c; }
.scroll-truck.night.season-autumn .tree-canopy { fill: #6b4030; }

/* 針葉樹の形のまま色だけ変わる季節 */
.scroll-truck.season-winter .tree { fill: url(#winter); }
.scroll-truck.season-xmas   .tree { fill: url(#xmas); }
/* season-green は既定の url(#foliage) のまま */

/* 夜モードは季節より優先させるため、季節クラスを含めて詳細度を上げる */
.scroll-truck.night.season-green  .tree { fill: #3f5a45; }
.scroll-truck.night.season-winter .tree { fill: #58657c; }
.scroll-truck.night.season-xmas   .tree { fill: #23402f; }

/* 舞い散る桜の花びら（3〜4月だけ表示） */
.scroll-truck .petals {
  position: absolute;
  inset: 0;
  z-index: 1;          /* 街並みより前・トラックより後ろ */
  pointer-events: none;
  display: none;
}
.scroll-truck.season-sakura .petals { display: block; }
.scroll-truck .petal {
  position: absolute;
  top: 0;
  width: var(--sz, 5px);
  height: var(--sz, 5px);
  background: linear-gradient(135deg, #fbdce8, #ef9dbe);
  border-radius: 62% 8% 62% 8%;   /* 花びらの形 */
  opacity: 0;
  will-change: transform;
  animation: petalFall var(--d, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
}
/* 左右に揺れながら回転して落ちる＝ふわっと舞い散る */
@keyframes petalFall {
  0%   { transform: translate(0, -8px) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.95; }
  25%  { transform: translate(var(--sway), 22px) rotate(90deg); }
  50%  { transform: translate(calc(var(--sway) * -0.6), 52px) rotate(190deg); }
  75%  { transform: translate(calc(var(--sway) * 0.8), 82px) rotate(290deg); }
  90%  { opacity: 0.95; }
  100% { transform: translate(0, 112px) rotate(360deg); opacity: 0; }
}

/* 流れる雲（5〜8月だけ表示） */
.scroll-truck .clouds {
  position: absolute;
  inset: 0;
  z-index: 0;          /* ランドマークと同階層。DOM順で「ランドマークの手前・街並みの奥」になる */
  pointer-events: none;
  display: none;
}
.scroll-truck.season-green .clouds { display: block; }
.scroll-truck .cloud {
  position: absolute;
  left: 0;
  bottom: var(--b, 48px);
  width: var(--w, 64px);
  opacity: var(--o, 0.9);
  will-change: transform;
  /* 遅延を負にして、開いた瞬間から雲が空に散らばっている状態にする */
  animation: cloudDrift var(--d, 78s) linear infinite;
  animation-delay: var(--delay, 0s);
}
.scroll-truck .cloud svg { width: 100%; height: auto; display: block; }
.scroll-truck .cloud-shadow,
.scroll-truck .cloud-body,
.scroll-truck .cloud-hi { transition: fill 0.6s ease; }
/* 夜は雲も夕闇に沈む */
.scroll-truck.night.season-green .cloud-shadow { fill: #2f3a52; }
.scroll-truck.night.season-green .cloud-body   { fill: #46536e; }
.scroll-truck.night.season-green .cloud-hi     { fill: #57657f; }
@keyframes cloudDrift {
  from { transform: translateX(-110px); }
  to   { transform: translateX(calc(100vw + 110px)); }
}

/* 舞い落ちる楓（9〜10月だけ表示） */
.scroll-truck .leaves {
  position: absolute;
  inset: 0;
  z-index: 1;          /* 街並みより前・トラックより後ろ */
  pointer-events: none;
  display: none;
}
.scroll-truck.season-autumn .leaves { display: block; }
.scroll-truck .leaf {
  position: absolute;
  top: 0;
  width: var(--sz, 7px);
  height: var(--sz, 7px);
  background: var(--c, #c9552f);
  /* 楓のシルエット（5つの葉先＋葉柄） */
  clip-path: polygon(
    50% 0%, 58% 20%, 73% 12%, 67% 33%, 88% 26%, 74% 45%, 97% 47%, 78% 60%,
    90% 78%, 66% 71%, 57% 92%, 52% 72%, 50% 100%, 48% 72%, 43% 92%, 34% 71%,
    10% 78%, 22% 60%, 3% 47%, 26% 45%, 12% 26%, 33% 33%, 27% 12%, 42% 20%
  );
  opacity: 0;
  will-change: transform;
  animation: leafFall var(--d, 9s) linear infinite;
  animation-delay: var(--delay, 0s);
}
/* 花びらより大きく回りながら、ひらひら舞い落ちる */
@keyframes leafFall {
  0%   { transform: translate(0, -8px) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  25%  { transform: translate(var(--sway), 22px) rotate(120deg); }
  50%  { transform: translate(calc(var(--sway) * -0.7), 52px) rotate(240deg); }
  75%  { transform: translate(calc(var(--sway) * 0.8), 82px) rotate(345deg); }
  90%  { opacity: 1; }
  100% { transform: translate(0, 112px) rotate(450deg); opacity: 0; }
}

/* 舞い落ちる雪（1〜2月だけ表示） */
.scroll-truck .snow {
  position: absolute;
  inset: 0;
  z-index: 1;          /* 街並みより前・トラックより後ろ */
  pointer-events: none;
  display: none;
}
.scroll-truck.season-winter .snow,
.scroll-truck.season-xmas .snow { display: block; }
.scroll-truck .flake {
  position: absolute;
  top: 0;
  width: calc(var(--sz, 4px) + 1px);
  height: calc(var(--sz, 4px) + 1px);
  /* 帯の上部は白いページ背景。白い粒＋青灰色の細いリングにして、
     白地でも輪郭で認識できるようにする */
  background: #ffffff;
  box-shadow:
    0 0 0 0.7px rgba(104, 143, 189, 0.6),
    0 0 3px rgba(150, 190, 230, 0.7);
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
  animation: snowFall var(--d, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
  transition: box-shadow 0.6s ease;
}
/* 夜はリング不要。光る純白に */
.scroll-truck.night.season-winter .flake,
.scroll-truck.night.season-xmas .flake {
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.95);
}
/* 花びらより遅く、ゆらゆらと舞い落ちる（回転しない） */
@keyframes snowFall {
  0%   { transform: translate(0, -8px); opacity: 0; }
  10%  { opacity: 0.95; }
  25%  { transform: translate(var(--sway), 24px); }
  50%  { transform: translate(calc(var(--sway) * -0.7), 54px); }
  75%  { transform: translate(calc(var(--sway) * 0.6), 84px); }
  90%  { opacity: 0.9; }
  100% { transform: translate(0, 112px); opacity: 0; }
}

/* クリスマスの飾りは11〜12月だけ表示。夜は電飾らしく光る */
.scroll-truck .xmas-deco { display: none; }
.scroll-truck.season-xmas .xmas-deco { display: block; }
.scroll-truck .xmas-ball circle { transition: filter 0.6s ease; }
.scroll-truck.night.season-xmas .xmas-ball circle { filter: drop-shadow(0 0 1.6px currentColor) brightness(1.25); }
.scroll-truck.night.season-xmas .xmas-star { filter: drop-shadow(0 0 2px #f0c94a); }

/* ----------------------------------------------------------
   お正月（1/1〜1/15＝season-newyear）：門松・獅子舞・羽子板
   既定は非表示。正月だけ表示し、冬景色（雪＋冬の街路樹）も流用する
   ---------------------------------------------------------- */
.scroll-truck .ny { display: none; z-index: 1; }      /* 街並みの手前・トラックより後ろ */
.scroll-truck.season-newyear .ny { display: block; }
.scroll-truck .ny-kadomatsu { width: 26px; }
.scroll-truck .ny-kadomatsu-r svg { transform: scaleX(-1); }   /* 右側は左右反転 */
.scroll-truck .ny-shishi { width: 38px; animation: nyShishiBob 2.6s ease-in-out infinite; }
.scroll-truck .ny-shishi-jaw { animation: nyChomp 1.9s ease-in-out infinite; }
.scroll-truck .ny-hagoita { width: 22px; }
.scroll-truck .ny-hane { animation: nyHane 1.7s ease-in-out infinite; }

/* 正月も冬景色：雪と冬の街路樹を流用 */
.scroll-truck.season-newyear .snow { display: block; }
.scroll-truck.season-newyear .tree { fill: url(#winter); }
.scroll-truck.night.season-newyear .tree  { fill: #58657c; }
.scroll-truck.night.season-newyear .flake { box-shadow: 0 0 4px rgba(255, 255, 255, 0.95); }

@keyframes nyShishiBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-2.5px) rotate(-1.5deg); } }
@keyframes nyChomp     { 0%, 62%, 100% { transform: translateY(0); } 78%, 88% { transform: translateY(3px); } }
@keyframes nyHane      { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 観覧車：最初は静止。スクロールが始まると（.started付与で）ゆっくり回り出す
   ゴンドラは円なので回っても違和感なし */
.scroll-truck .lm-ferris .f-rot {
  transform-box: fill-box;
  transform-origin: center;
}
.scroll-truck.started .lm-ferris .f-rot {
  animation: ferrisSpin 26s linear infinite;
}
@keyframes ferrisSpin { to { transform: rotate(360deg); } }
/* 夜はゴンドラが暖色に灯る */
.scroll-truck .lm-ferris .f-cab { transition: fill 0.6s ease; }
.scroll-truck.night .lm-ferris .f-cab { fill: #ffd766; }

.scroll-truck .lm-mtn { transition: fill 0.6s ease; }
.scroll-truck.night .lm-mtn { fill: #47536f; }   /* 夜の富士山 */
.scroll-truck.night .lm-br rect { fill: #58627a; } /* 夜の橋塔 */

/* 城：夜は他のビルと同じく夕闇色へ */
.scroll-truck .cas-wall,
.scroll-truck .cas-roof,
.scroll-truck .cas-base { transition: fill 0.6s ease; }
.scroll-truck.night .cas-wall { fill: #5a6684; }
.scroll-truck.night .cas-roof { fill: #3f4c6b; }
.scroll-truck.night .cas-base { fill: #4a5262; }

/* 花火：夜モードのときだけ東京タワーの脇で打ち上がる */
.scroll-truck .fireworks {
  bottom: 26px;              /* 空の高い位置 */
  width: 88px;
  opacity: 0;                /* 昼は非表示 */
  transition: opacity 0.5s ease;
}
/* 花火は夏（5〜8月＝season-green）の夜だけ上がる */
.scroll-truck.night.season-green .fireworks { opacity: 1; }
.scroll-truck .fireworks .fw-burst {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.12);
  opacity: 0;                /* 既定は消えている */
  filter: drop-shadow(0 0 1.4px rgba(255, 255, 255, 0.55));
}
/* 夏の夜だけ点火。3発を別々の間隔・周期で連発 */
.scroll-truck.night.season-green .fireworks .fw-b1 { animation: fw-burst 2.4s ease-out infinite; animation-delay: 0.1s; }
.scroll-truck.night.season-green .fireworks .fw-b2 { animation: fw-burst 2.8s ease-out infinite; animation-delay: 1.0s; }
.scroll-truck.night.season-green .fireworks .fw-b3 { animation: fw-burst 3.2s ease-out infinite; animation-delay: 1.9s; }
@keyframes fw-burst {
  0%   { transform: scale(0.12); opacity: 0; }
  8%   { opacity: 1; }
  55%  { transform: scale(1);    opacity: 0.95; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* 高架（桁＋橋脚。新幹線と同じ層でビルの後ろ） */
.scroll-truck .viaduct {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;   /* 道路の上端から立ち上がる */
  height: 19px;
  z-index: 0;
  pointer-events: none;
}
.scroll-truck .viaduct::before {   /* 桁（ビーム） */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: linear-gradient(#c8cdd7, #a3a9b6);
}
.scroll-truck .viaduct::after {    /* 橋脚（一定間隔） */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 5px; bottom: 0;
  background: repeating-linear-gradient(to right, transparent 0 56px, #aab0bc 56px 64px);
}
/* 昼夜の色切り替えをなめらかに */
.scroll-truck .viaduct::before,
.scroll-truck .viaduct::after { transition: background 0.6s ease; }
/* 夜は高架も暗くして夜景に馴染ませる */
.scroll-truck.night .viaduct::before {
  background: linear-gradient(#49505f, #363c49);
}
.scroll-truck.night .viaduct::after {
  background: repeating-linear-gradient(to right, transparent 0 56px, #3d4453 56px 64px);
}

/* 新幹線（ビルの後ろ＝z-index 0で街並みに隠れ、合間から見える） */
.scroll-truck .shinkansen-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30px;
  height: 18px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.scroll-truck .shinkansen {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 158px;                     /* 2両編成ぶんの長さ */
  transform: translateX(-200px);   /* 既定は画面左に待機（長くなった分だけ左へ） */
  will-change: transform;
}
.scroll-truck .shinkansen svg { width: 100%; height: auto; display: block; }
/* トリガーで発車し、一気に駆け抜ける（JSが .run を付与） */
.scroll-truck .shinkansen.run {
  animation: shinkansenDash 6.5s cubic-bezier(0.4, 0, 0.5, 1) forwards;
}
@keyframes shinkansenDash {
  from { transform: translateX(-200px); }
  to   { transform: translateX(calc(100vw + 60px)); }
}

/* 飛行機（空を高く通過） */
.scroll-truck .airplane-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 76px;
  height: 27px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.scroll-truck .airplane {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 74px;
  transform: translate(-90px, 8px);   /* 既定は画面左に待機 */
  will-change: transform;
}
.scroll-truck .airplane svg { width: 100%; height: auto; display: block; }
/* トリガーで飛び出し、一気に飛び去る（JSが .run を付与） */
.scroll-truck .airplane.run {
  animation: airplaneDash 3.6s linear forwards;
}
@keyframes airplaneDash {
  from { transform: translate(-90px, 8px); }
  to   { transform: translate(calc(100vw + 60px), -6px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-truck .shinkansen,
  .scroll-truck .airplane { animation: none; opacity: 0; }
}

/* 空（最奥レイヤー）。下が色づき、上へ向かってマスクで無色になる。
   色はJSがスクロール進捗に応じて補間して backgroundColor にセットする */
.scroll-truck .sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgb(56, 138, 212);   /* 既定は昼の青空 */
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.26) 45%, transparent 100%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.26) 45%, transparent 100%);
  pointer-events: none;
}

/* コンテナ船。JSが停泊位置をleftに、待機位置までの距離を --ship-from にセットする。
   トリガー(.run)で一度だけ出航し、スクロールに関係なく停泊位置まで進んで止まる */
.scroll-truck .ship {
  position: absolute;
  bottom: 16px;
  left: 0;
  width: 90px;
  z-index: 0;        /* レインボーブリッジ・街並みの向こう側（隙間から覗く） */
  opacity: 0;
  transform: translateX(var(--ship-from, 130vw));   /* 既定は画面外・右で待機 */
  will-change: transform;
  pointer-events: none;
}
.scroll-truck .ship svg { width: 100%; height: auto; display: block; }
.scroll-truck .ship.run {
  opacity: 1;
  animation: shipSail 10s cubic-bezier(0.15, 0.7, 0.25, 1) forwards;
}
@keyframes shipSail {
  from { transform: translateX(var(--ship-from, 130vw)); }
  to   { transform: translateX(0); }   /* = 停泊位置 */
}

.scroll-truck .scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.scroll-truck .scene-svg {
  display: block;
}

/* 色の切り替えをなめらかに */
.scroll-truck .win rect,
.scroll-truck .bldg,
.scroll-truck .bldg2,
.scroll-truck .bldg-far,
.scroll-truck .tree,
.scroll-truck .trunk,
.scroll-truck .lamp {
  transition: fill 0.6s ease;
}

/* ビルは半リアル調：グラデーションの陰影で見せるため輪郭線は付けない */
/* 街路樹は有機的にやわらかい線のまま */
.scroll-truck .tree,
.scroll-truck .trunk {
  stroke: #7e8ca2;
  stroke-width: 0.7;
  stroke-linejoin: round;
}

/* ヘッドライト（既定は消灯） */
.scroll-truck .headlight {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* 街灯のグロー（既定は消灯、夜だけ点灯） */
.scroll-truck .lamp-glow {
  transition: opacity 0.6s ease;
}

/* ---- 夜モード（背景が濃色のとき点灯） ---- */
.scroll-truck.night .scene {
  opacity: 1;   /* 半透明にすると奥の高架が透けるため夜も不透明に */
}

.scroll-truck.night .win rect { fill: #ffd766; }   /* 窓の明かり */
.scroll-truck.night .lamp { fill: #fff0a8; }       /* 街灯の光 */
.scroll-truck.night .lamp-glow { opacity: 0.6; }   /* 夜だけ光のにじみ */
.scroll-truck.night .bldg { fill: #46536e; }       /* ビルを夕闇色に */
.scroll-truck.night .bldg2 { fill: #515f7c; }
.scroll-truck.night .bldg-far { fill: #33405c; }   /* 遠景ビルはより暗く */
.scroll-truck.night .tree { fill: #3f5a45; } /* 街路樹を夜の緑に */
.scroll-truck.night .trunk { fill: #4e3b2b; }
.scroll-truck .ground, .scroll-truck .curb { transition: fill 0.6s ease; }
.scroll-truck.night .ground { fill: #313a4d; }   /* 建物の間の地面も夜色に */
.scroll-truck.night .curb { fill: #414b60; }

.scroll-truck.night .headlight { opacity: 1; } /* ヘッドライト点灯 */

.scroll-truck .road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 15px;
  background:
    /* 路面上端の白線（ふち） */
    linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px),
    /* アスファルト */
    linear-gradient(to bottom, #3b4048, #2b2f35);
}

/* 中央の黄色いセンターライン（破線） */
.scroll-truck .road::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    rgba(240, 194, 0, 0.9) 0 22px,
    transparent 22px 44px
  );
}

.scroll-truck .warehouse {
  position: absolute;
  bottom: 14px;
  left: 0;
  width: 88px;
  height: auto;
}

.scroll-truck .warehouse svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.08));
}

.scroll-truck .wh-label {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  white-space: nowrap;
}

/* 中間倉庫のフォークリフト（トラックより前面に表示） */
.scroll-truck .forklift {
  position: absolute;
  bottom: 13px;
  left: 0;
  width: 62px;
  z-index: 3;
  opacity: 0;
}

.scroll-truck .forklift svg {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;   /* 荷物・フォークがviewBox右端(58)を超えるため、切り取らせない */
  /* 背景が白いライン画になったので白枠は不要。接地影のみ */
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

/* フォークの昇降・荷物の受け渡しはJSで駆動（停車中のみ稼働）。
   荷物のフェードだけCSSでなめらかに */
/* 荷物はフェードさせない（積む／降ろす瞬間に切り替える） */

.scroll-truck .truck {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 140px;
  height: auto;
  z-index: 2;
  overflow: visible; /* ヘッドライトのビームが車体の外まで伸びる */
  will-change: transform;
  /* 明るい白のライン画背景では白枠は不要。接地影のみ */
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.3));
}


.scroll-truck .wheel {
  transform-box: fill-box;
  transform-origin: center;
}

.scroll-truck .box {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center bottom;
  transform: translateY(4px) scale(0.6);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-truck.load-1 .b1,
.scroll-truck.load-2 .b1,
.scroll-truck.load-2 .b2,
.scroll-truck.load-3 .b1,
.scroll-truck.load-3 .b2,
.scroll-truck.load-3 .b3 {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 700px) {
  .scroll-truck { height: 54px; }
  .scroll-truck .truck { width: 108px; }
  .footer { padding-bottom: 92px; }  /* 帯が低い分フッター余白も縮小 */
}

@media (prefers-reduced-motion: reduce) {
  .scroll-truck { display: none; }
}

/* ----------------------------------------------------------
   スクロールアニメーション
   ---------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
