/* =========================================================
 * main.css — クライアントサイト共通ベーススタイル（テンプレート）
 * ブランドカラーは下記 :root の CSS 変数で案件ごとに調整する。
 * ページ固有のコンポーネントは案件側で追記してください。
 * ========================================================= */

:root {
  /* Brand palette (hugo.yaml と同期) */
  --c-primary: #4FA3E3;
  --c-secondary: #0B2545;
  --c-accent1: #00D4FF;
  --c-accent2: #FF3D8B;
  --c-text-dark: #11324d;
  --c-text-muted: #45657d;
  --c-text-light: #FFFFFF;
  --c-bg-light: #F5F9FC;
  --c-border: #E0E6ED;

  /* Sky gradient palette */
  --sky-1: #eaf8ff;
  --sky-2: #b7e5ff;
  --sky-3: #f8fdff;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.32);
  --glass-bg-strong: rgba(255, 255, 255, 0.48);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 18px 60px rgba(55, 120, 170, 0.16);

  /* Typography — モジュラースケール 4:3 */
  --fs-base: 1rem;       /* 16px */
  --fs-sm: 0.8125rem;    /* 13px */
  --fs-md: 1.125rem;     /* 18px */
  --fs-lg: 1.5rem;       /* 24px */
  --fs-xl: 2rem;         /* 32px */
  --fs-xxl: 2.66rem;     /* 42.6px */
  --fs-hero: 3.55rem;    /* 56.8px */

  --ff-jp: "Noto Sans JP", -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --ff-en: "Inter", var(--ff-jp);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --container-max: 1120px;
  --header-height: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* アンカー (#xxx) で飛んだ先が sticky ヘッダーに隠れないよう余白を確保 */
:target { scroll-margin-top: calc(var(--header-height) + 16px); }
body {
  margin: 0;
  font-family: var(--ff-jp);
  font-size: var(--fs-base);
  line-height: 1.75;
  color: var(--c-text-dark);
  /* 1本の空色グラデをページ全体に敷き、
     各カードを半透明ガラスで浮かせる構成 */
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 28%, var(--sky-3) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
ul { padding-left: 1.25rem; }
ul[role="list"] { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--ff-en), var(--ff-jp);
  font-weight: 700; line-height: 1.35;
  margin-block: 0 var(--space-sm);
  /* 見出しの孤立語を避ける (Chrome 114+ / Safari 17.4+ / Firefox 121+) */
  text-wrap: balance;
  /* 日本語の文節単位折り返し (対応ブラウザのみ) */
  word-break: auto-phrase;
}
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

/* 本文: 日本語の自然な折り返し (文節単位で折り返し + 段落末のオーファン回避) */
p, li, dd {
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
/* 見出しの英語単語分割回避 (英数のみのラベルは壊れて欲しくない) */
.eyebrow, .news-date, .card-date, .article-date {
  word-break: keep-all;
  overflow-wrap: normal;
}

.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-md);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
  word-break: keep-all;
  min-width: 12rem;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--c-primary); color: var(--c-text-light); box-shadow: 0 4px 14px rgba(79,163,227,0.35); }
.btn-primary:hover { background: #3d8fd1; }
.btn-secondary { background: transparent; color: var(--c-secondary); border: 2px solid var(--c-secondary); }
.btn-secondary:hover { background: var(--c-secondary); color: var(--c-text-light); }

/* ---------- Header / Nav ----------
   参考 rebuilding2 のピル型フローティングカード方式:
   .site-header は sticky ラッパー (上部フェード)、
   .header-inner がガラスのパーツ (border-radius:999px) として浮かぶ
*/
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0;
  background: linear-gradient(to bottom, rgba(234, 248, 255, 0.75), rgba(234, 248, 255, 0));
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 0;
  height: auto;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  padding: 10px 22px;
}
.site-logo { margin: 0; }
.site-logo-img { display: inline-block; height: 40px; width: auto; vertical-align: middle; margin-right: 0.5rem; }
.site-logo a {
  font-family: var(--ff-en);
  font-weight: 700;
  color: var(--c-secondary);
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none;
}
.logo-en { font-size: 1.25rem; letter-spacing: 0.02em; }
.logo-jp { font-size: 0.875rem; color: var(--c-text-dark); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-secondary); margin: 5px auto; }

.nav-list { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.nav-list a { color: var(--c-text-muted); font-weight: 500; padding: 0.5rem 0.9rem; border-radius: 999px; transition: background 0.18s ease, color 0.18s ease; }
.nav-list a:hover { background: rgba(30, 146, 233, 0.1); color: var(--c-text-dark); text-decoration: none; }
.nav-cta { background: linear-gradient(135deg, var(--c-primary), #56c3ff); color: var(--c-text-light) !important; padding: 0.6rem 1.25rem !important; border-radius: 999px !important; box-shadow: 0 4px 14px rgba(79, 163, 227, 0.35); }
.nav-cta:hover { background: linear-gradient(135deg, #3b8fd0, var(--c-primary)); }

/* ---------- Hero (TOP) ---------- */
.hero {
  position: relative;
  padding-block: var(--space-xxl);
  color: var(--c-secondary);
  overflow: visible;
}
.hero-inner { text-align: center; }
.hero-title {
  max-width: 980px;
  margin-inline: auto;
  font-size: var(--fs-hero);
  margin-bottom: var(--space-md);
  color: var(--c-secondary);
}
.hero-title__line,
.heading-line {
  display: block;
  word-break: keep-all;
  overflow-wrap: normal;
}
.hero-title__chunk {
  display: inline-block;
}
.hero-title__chunk + .hero-title__chunk {
  margin-left: 0.16em;
}
.hero-sub {
  font-size: var(--fs-md);
  color: var(--c-secondary);
  margin-bottom: var(--space-lg);
  /* 区切り文字 (/) と各語句の間で自然改行させ、語句の途中では折らない */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.5rem;
}
.hero-sub__sep {
  color: var(--c-primary);
  opacity: 0.6;
  font-weight: 300;
  /* セパレータが行頭/行末に単独で残らないよう前後の語句に密着させる */
  margin: 0 -0.15rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn {
  max-width: 100%;
}

/* ---------- Sections ---------- */
section { padding-block: var(--space-xl); }
.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  background: var(--c-accent1);
  margin: 0.5rem auto 0;
}

/* Pillars (TOP 3本柱) */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}
.pillar-card {
  background: var(--glass-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(55, 120, 170, 0.22); }
.pillar-link { display: inline-block; margin-top: var(--space-sm); font-weight: 600; }

/* News */
.news-list {
  display: flex; flex-direction: column;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
  padding: var(--space-sm) var(--space-md);
}
.news-item {
  display: flex; gap: var(--space-md); align-items: baseline;
  padding-block: var(--space-sm);
  border-bottom: 1px solid rgba(17, 50, 77, 0.08);
}
.news-item:last-child { border-bottom: 0; }
.news-date { color: var(--c-primary); font-family: var(--ff-en); font-weight: 600; white-space: nowrap; }
.news-more { text-align: right; margin-top: var(--space-md); }
.news-empty { text-align: center; color: #666; }

/* Twin CTA */
.twin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}
.twin-card {
  background: linear-gradient(135deg, var(--c-secondary), #133c74);
  color: var(--c-text-light);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}
.twin-card h3 { color: var(--c-accent1); }
.twin-recruit { background: linear-gradient(135deg, #2c5788, var(--c-primary)); }
.twin-card .btn { margin-top: var(--space-sm); }

/* ---------- List / Single ---------- */
/* body 側のグラデーションを活かすため背景色は指定しない */
.list-page, .single-article {
  padding-block: var(--space-xl);
}
.main-content:has(.reason-panel) {
  background:
    radial-gradient(70% 28rem at 50% 47%, rgba(255, 255, 255, 0.44), transparent 72%),
    radial-gradient(68% 32rem at 50% 67%, rgba(0, 212, 255, 0.12), transparent 74%),
    linear-gradient(180deg, rgba(211, 241, 255, 0.58) 0%, rgba(228, 248, 255, 0.74) 42%, rgba(246, 252, 255, 0.7) 100%);
}
/* 非TOPページのヘッダーを装飾バナー化 (殺風景対策) */
.list-header, .article-header {
  position: relative;
  text-align: center;
  margin-bottom: var(--space-xl);
  padding: var(--space-xl) var(--space-md);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--c-text-light);
  background:
    radial-gradient(circle at 15% 20%, rgba(0, 212, 255, 0.35), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(79, 163, 227, 0.32), transparent 60%),
    linear-gradient(135deg, var(--c-secondary) 0%, #133c74 55%, var(--c-primary) 100%);
  border-bottom: none;
}
.list-header::after, .article-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: var(--c-accent1);
}
.list-title, .article-title {
  color: var(--c-text-light);
  margin-bottom: var(--space-sm);
}
.list-lead, .article-lead { color: rgba(255, 255, 255, 0.9); font-size: var(--fs-md); max-width: 840px; margin-inline: auto; }
.article-date { display: inline-block; margin-top: var(--space-sm); color: var(--c-accent1); font-family: var(--ff-en); }
.article-body {
  max-width: 920px;
  margin-inline: auto;
  background: var(--glass-bg-strong);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
}
/* グリッドやギャラリーを含むワイドなページは横幅を広げる */
.article-body:has(.recruit-benefits),
.article-body:has(.reason-panel),
.article-body:has(.process-flow) {
  max-width: 1120px;
}
.article-body:has(.reason-panel) {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.article-body h2,
.list-body h2 { margin-top: var(--space-xl); padding-left: 0.75rem; border-left: 4px solid var(--c-primary); }
.article-body h3,
.list-body h3 { margin-top: var(--space-lg); color: var(--c-secondary); }
.article-body > :first-child,
.list-body > :first-child { margin-top: 0; }
.article-body table,
.list-body table { width: 100%; border-collapse: collapse; margin-block: var(--space-md); }
.article-body th, .article-body td,
.list-body th, .list-body td { border: 1px solid rgba(17, 50, 77, 0.1); padding: 0.75rem; text-align: left; }
.article-body th,
.list-body th { background: rgba(255, 255, 255, 0.4); font-weight: 600; }

.process-flow {
  position: relative;
  margin: var(--space-md) 0 var(--space-lg);
  isolation: isolate;
}
.process-flow::before {
  content: none;
}
.process-steps {
  position: relative;
  z-index: 1;
  perspective: 900px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.process-step {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 0.45rem;
  min-height: 200px;
  padding: 1.25rem 1.1rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(91, 151, 196, 0.18),
    0 10px 22px rgba(18, 68, 120, 0.1),
    0 22px 46px rgba(18, 68, 120, 0.13);
  transform: translateY(var(--lift, 0)) scale(var(--scale, 1));
  transform-origin: 50% 65%;
  will-change: transform;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.42s ease;
}
.process-step::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(60% 52% at 20% 0%, rgba(255, 255, 255, 0.62), transparent 62%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.2) 48%, rgba(224, 247, 255, 0.32));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.94),
    inset 0 -18px 30px rgba(84, 142, 190, 0.11),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);
  transition: filter 0.42s ease, opacity 0.42s ease;
  pointer-events: none;
}
@supports (backdrop-filter: url("#liquidGlass")) or (-webkit-backdrop-filter: url("#liquidGlass")) {
  .process-step::before {
    backdrop-filter: blur(10px) saturate(180%) brightness(1.05) url(#liquidGlass);
    -webkit-backdrop-filter: blur(10px) saturate(180%) brightness(1.05) url(#liquidGlass);
  }
}
.process-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(clamp(0.75rem, 1.5vw, 1rem) * -0.72);
  z-index: 2;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.74);
  border-right: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 4px -4px 14px rgba(18, 68, 120, 0.08);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  transform: translateY(-50%) rotate(45deg);
}
.process-step:last-child::after { content: none; }
.process-step:hover,
.process-step:focus-within,
.process-step:focus-visible {
  --lift: -8px;
  --scale: 1.015;
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(91, 151, 196, 0.18),
    0 2px 4px rgba(18, 68, 120, 0.08),
    0 14px 28px rgba(18, 68, 120, 0.14),
    0 34px 58px rgba(18, 68, 120, 0.18);
}
.process-step:hover::before,
.process-step:focus-within::before,
.process-step:focus-visible::before {
  filter: brightness(1.04) saturate(1.08);
}
.process-step:focus:not(:focus-visible) {
  outline: none;
}
.process-step:focus-visible {
  outline: 3px solid rgba(0, 212, 255, 0.42);
  outline-offset: 4px;
}
.process-step--goal::before {
  background:
    radial-gradient(60% 52% at 20% 0%, rgba(255, 255, 255, 0.66), transparent 62%),
    radial-gradient(70% 70% at 100% 100%, rgba(124, 179, 66, 0.2), transparent 68%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.56), rgba(237, 250, 230, 0.28) 48%, rgba(214, 241, 201, 0.35));
}
.process-icon {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  color: var(--c-text-light);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent1));
  font-family: var(--ff-en);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}
.process-step--goal .process-icon {
  background: linear-gradient(135deg, #7CB342, #12866d);
}
.process-role {
  position: relative;
  z-index: 1;
  color: var(--c-secondary);
  font-size: 1.12rem;
}
.process-step--goal .process-role { color: #12866d; }
.process-desc {
  position: relative;
  z-index: 1;
  color: var(--c-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.55;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  list-style: none; padding: 0;
}
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(55, 120, 170, 0.22); }
.card-link:hover { background: rgba(255, 255, 255, 0.15); }
.card-link { display: block; padding: var(--space-md); color: inherit; text-decoration: none; }
.card-title { margin-bottom: var(--space-xs); font-size: var(--fs-lg); color: var(--c-secondary); }
.card-summary { color: var(--c-text-muted); font-size: 0.94rem; }
.card-date { display: block; margin-top: var(--space-sm); color: var(--c-primary); font-family: var(--ff-en); }
.card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}
.card-with-thumb .card-link { padding: var(--space-sm); }

/* 個別インタビュー写真 */
.greeting-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin: var(--space-md) 0 var(--space-lg);
}
.greeting-photo {
  margin: 0;
  position: relative;
  padding: 10px;
  border-radius: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.greeting-photo::before {
  /* 左上に浮かぶソフトな光 (雲感) */
  content: "";
  position: absolute;
  top: -24px; left: -24px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.9), rgba(255,255,255,0) 70%);
  filter: blur(16px);
  z-index: -1;
}
.greeting-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  display: block;
}
.greeting-photo figcaption {
  margin-top: var(--space-sm);
  text-align: center;
  font-weight: 600;
  color: var(--c-secondary);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
}
.greeting-body p { margin: 0 0 var(--space-sm); line-height: 1.95; }
.greeting-body p:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
  .greeting-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .greeting-photo { max-width: 360px; margin-inline: auto; }
}

/* 企業理念 / 行動指針: 横並びガラスカード */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0;
}
.philosophy-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
}
.philosophy-card .eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.2em;
  color: #0f76c3; margin-bottom: 10px;
}
.philosophy-card h3 { margin: 0 0 var(--space-sm); font-size: var(--fs-lg); color: var(--c-secondary); }
.philosophy-card .philosophy-lead {
  font-weight: 600; color: var(--c-secondary);
  padding: var(--space-sm); margin: 0 0 var(--space-sm);
  border-left: 3px solid var(--c-primary);
  background: rgba(255,255,255,0.4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.philosophy-card p { margin: 0 0 var(--space-xs); line-height: 1.9; }
.philosophy-card p:last-child { margin-bottom: 0; }

/* 会社情報: 定義リストを2カラム表示 */
.company-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: var(--space-md) 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--glass-shadow);
}
.company-info > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(17, 50, 77, 0.08);
  min-width: 0; /* グリッドアイテムの min-width:auto による横はみ出しを防止 */
}
.company-info > div:nth-last-child(-n+2) { border-bottom: 0; }
.company-info dt {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-secondary);
  letter-spacing: 0.04em;
}
.company-info dd { margin: 0; min-width: 0; color: var(--c-text-dark); line-height: 1.75; overflow-wrap: anywhere; }
.company-info .info-sub { display: inline-block; margin-left: 0.5rem; font-size: var(--fs-sm); color: var(--c-text-muted); }
@media (max-width: 768px) {
  .company-info { grid-template-columns: 1fr; }
  .company-info > div { border-bottom: 1px solid rgba(17, 50, 77, 0.08); }
  .company-info > div:last-child { border-bottom: 0; }
  .company-info > div { grid-template-columns: 5.5rem 1fr; }
}
@media (max-width: 480px) {
  /* スマホ幅ではラベル横の値カラムが狭すぎ、所在地・アクセス等の長い値が
     窮屈に折り返される。ラベル(dt)を上・値(dd)を下に積み、値に全幅を与える */
  .company-info > div { grid-template-columns: 1fr; gap: 0.2rem; }
}

.article-nav {
  display: flex; justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--c-border);
  gap: var(--space-sm);
}
.article-nav a { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* prev が無い最新記事でも next を右端に固定する (片方だけのとき左寄せ防止) */
.article-nav .next { margin-left: auto; }

/* ---------- 404 ---------- */
.not-found {
  text-align: center;
  padding-block: var(--space-xxl);
}
.not-found-title { color: var(--c-secondary); }
.not-found-lead { color: var(--c-text-muted); margin-bottom: var(--space-lg); }
.not-found-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-secondary);
  color: var(--c-text-light);
  /* 縦の存在感が大きすぎたため、上下パディングと本文との間隔を圧縮 */
  padding-block: var(--space-lg) var(--space-md);
  margin-top: var(--space-xl);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(3, 1fr);
  /* PC で間延びしないよう列間・行間も詰める */
  gap: var(--space-lg) var(--space-lg);
  align-items: start;
}
.footer-company { min-width: 0; }
.footer-logo { margin: 0 0 var(--space-md); }
.footer-logo a { color: var(--c-text-light); font-family: var(--ff-en); font-size: 1.25rem; font-weight: 700; }
.footer-address {
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.footer-address__zip,
.footer-address__line { color: var(--c-text-light); }
.footer-address__access {
  opacity: 0.6;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.35rem;
  row-gap: 0.05rem;
}
.footer-address__access-route {
  display: inline-flex;
  flex-wrap: wrap;
  column-gap: 0.35rem;
}
.footer-address__access-part,
.footer-address__access-separator { white-space: nowrap; }
.footer-tel {
  margin: var(--space-md) 0 0;
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: 0.94rem;
}
.footer-tel__label {
  font-family: var(--ff-en);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  opacity: 0.55;
}
.footer-tel a {
  color: var(--c-accent1);
  font-family: var(--ff-en);
  letter-spacing: 0.02em;
}
.footer-nav { display: contents; }
.footer-nav__section { min-width: 0; }
.footer-nav__heading {
  font-family: var(--ff-en);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.55;
  margin: 0 0 1rem;
  text-transform: uppercase;
}
.footer-nav__section ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav a {
  color: var(--c-text-light);
  opacity: 0.9;
  font-size: 0.94rem;
  /* 「生成AIを活用した開発」「プライバシーポリシー」など長いリンクは
     カラム幅を超える場合にきれいに折り返したいので nowrap は外す */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.footer-nav a:hover { opacity: 1; color: var(--c-accent1); }
.footer-copy {
  margin: var(--space-lg) 0 0;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  opacity: 0.55;
  text-align: left;
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reason-card,
  .process-step {
    transform: none !important;
  }
  .reason-card:hover,
  .reason-card:focus-visible,
  .reason-card:focus-within,
  .process-step:hover,
  .process-step:focus-within,
  .process-step:focus-visible {
    --lift: 0;
    --scale: 1;
  }
  .reason-card:hover::after,
  .reason-card:focus-visible::after,
  .reason-card:focus-within::after {
    transform: translateX(-130%) rotate(8deg);
  }
  #three-bg-canvas { display: none; }
  .three-bg-fallback { display: block; }
}

/* ---------- Forms (contact) ---------- */
.contact-intro { max-width: 640px; margin: 0 auto var(--space-md); line-height: 1.8; }
.form-grid { display: grid; gap: var(--space-md); max-width: 640px; margin-inline: auto; }
.form-row label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(17, 50, 77, 0.12);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: inherit;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
}
.form-row textarea { min-height: 8rem; resize: vertical; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--c-primary); outline-offset: 2px; border-color: var(--c-primary);
}
.form-row .required { color: var(--c-accent2); margin-left: 0.25rem; }
.form-row .form-note { display: block; margin-top: 0.3rem; font-size: var(--fs-sm); color: #666; }
.form-privacy p { font-size: var(--fs-sm); line-height: 1.7; background: rgba(255, 255, 255, 0.5); padding: var(--space-sm); border-radius: var(--radius-md); border-left: 3px solid var(--c-primary); backdrop-filter: blur(6px); margin-bottom: var(--space-xs); }
.form-privacy-notes { font-size: var(--fs-sm); line-height: 1.8; color: var(--c-text-muted); margin: 0 0 var(--space-sm); padding-left: 1.25rem; }
.form-privacy-notes li { margin-bottom: 0.25rem; }
.form-privacy .form-checkbox { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: var(--space-sm); font-weight: 600; cursor: pointer; }
.form-privacy .form-checkbox input { width: auto; }
.form-actions { text-align: center; }
.form-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root { --header-height: 64px; }
  .hero-title {
    font-size: 2.66rem;
    max-width: 760px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
  .footer-company { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-address__access {
    display: grid;
    gap: 0.15rem;
  }
  .footer-address__access-route {
    display: flex;
    min-width: 0;
  }
  .footer-address__access-part {
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .footer-address__access-separator { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    position: absolute; top: 100%; right: 20px; left: 20px;
    flex-direction: column;
    /* 背景コンテンツが透けてメニュー文字が読みにくかったため不透明寄りに変更。
       backdrop-filter は端末非対応でも可読性が落ちないよう高めの alpha を保つ。 */
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(79, 163, 227, 0.28);
    box-shadow: 0 18px 48px rgba(11, 37, 69, 0.28);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    padding: 0.5rem;
    border-radius: 20px;
    gap: 0.25rem;
  }
  .nav-list.is-open { display: flex; }
  /* 項目自体を行ボタン化: タップ判定拡大 + コントラスト強化 */
  .nav-list li { width: 100%; }
  .nav-list a {
    display: block;
    width: 100%;
    color: var(--c-text-dark);
    font-size: 1.0625rem;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-radius: 12px;
  }
  .nav-list a:hover { background: rgba(79, 163, 227, 0.12); }
  .nav-list .nav-cta {
    text-align: center;
    margin-top: 0.25rem;
    border-radius: 999px !important;
  }
  .hero { padding-block: var(--space-xl); }
  .hero-title {
    max-width: 25rem;
    font-size: 2rem;
    line-height: 1.42;
  }
  .hero-cta {
    /* スマホでは縦積みにし、各ボタンが必ず1行幅まで広がるようにする */
    flex-direction: column;
    align-items: center;
  }
  .hero-cta .btn {
    min-width: 0;
    width: 100%;
    max-width: 22rem;
    box-sizing: border-box;
    /* 長い日本語コピーがコンテナ幅で自然改行するよう keep-all を解除 */
    white-space: normal;
    /* auto-phrase 非対応ブラウザ (Safari/Firefox) は normal にフォールバックさせる。
       .btn の word-break: keep-all を上書きしないとスマホで横はみ出しが発生する。 */
    word-break: normal;
    word-break: auto-phrase;
    overflow-wrap: anywhere;
    line-height: 1.45;
  }
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  section { padding-block: var(--space-lg); }
  .list-header, .article-header { padding: var(--space-lg) var(--space-sm); }
  .article-body { padding: var(--space-md); }
  .article-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .article-nav .next {
    margin-left: 0;
    text-align: right;
  }
  .career-steps { grid-template-columns: 1fr; }
  .career-step {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(79, 163, 227, 0.16);
  }
  .career-step:last-child { border-bottom: 0; }
  .career-step::after {
    top: auto;
    right: auto;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }
  .reason-panel {
    padding: var(--space-sm);
    border-radius: 22px;
  }
  .reason-cards {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .reason-card { padding: 1.45rem 1.2rem; }
  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
  .process-step {
    min-height: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  }
  .process-step::after {
    top: auto;
    right: auto;
    bottom: calc(var(--space-sm) * -0.64);
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }
  .benefits-common { grid-template-columns: 1fr; }
  .benefit-group--wide { grid-column: auto; }

  /* Services index responsive */
  .works-strength-grid { grid-template-columns: 1fr; }
  .works-strength-card {
    min-height: auto;
    padding: var(--space-md);
  }
  .works-strength-card h3 { max-width: 100%; font-size: 1.25rem; }
  .works-cta {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .works-cta .btn { justify-self: center; }
  .svc-hero:has(.svc-hero-cta) { padding: var(--space-lg) var(--space-md); }
  .svc-hero .svc-hero-cta .btn {
    min-width: 0;
    width: 100%;
    max-width: 22rem;
    white-space: normal;
    word-break: auto-phrase;
    overflow-wrap: anywhere;
  }
  .svc-feat-grid { grid-template-columns: 1fr; }
  .svc-feat-card { min-height: 260px; padding: var(--space-md); }
  .svc-feat-card h3 { font-size: 1.25rem; }
  .svc-partner-cta {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .svc-partner-cta .btn { justify-self: center; }
}

/* 日本語テキストの意味単位での折返し制御 */
.nowrap-block {
  display: inline-block;
  /* 文節内（CJK間）での改行を防ぎ、ブロック単位での改行のみを許容。
     white-space:nowrap だと overflow-wrap が無効になり、コンテナ幅を超えた
     ブロックがはみ出すため、keep-all + overflow-wrap:anywhere で
     「通常は1行・収まらない場合のみ折返し」を実現する */
  white-space: normal;
  word-break: keep-all;
  /* ブロック自体がコンテナ幅を超える場合は文字単位の折返しを許可（オーバーフロー防止） */
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .hero-title {
    max-width: 19.5rem;
    font-size: 1.55rem;
    line-height: 1.48;
  }
  .hero-title__chunk {
    display: block;
  }
  .hero-title__chunk + .hero-title__chunk {
    margin-left: 0;
  }
  /* CTA付きサービスヒーロー: 最小1.9rem固定だと iPhone SE 等の狭幅(〜320px)で
     見出し各行(8字)がパネル内幅を超え、nowrap-block のオーバーフロー回避で
     文字単位折返し(「そのホームペー/ジ」)が発生する。viewport 連動で縮小し、
     480px時点では従来の約1.9rem相当を保ったまま狭幅で段階的に小さくする。 */
  .svc-hero .svc-hero-title {
    font-size: clamp(1.3rem, 7vw, 1.9rem);
  }
  .recruit-benefits { padding: var(--space-sm); }
  .experienced-offer {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .experienced-offer__label { text-align: left; }
  .benefit-lines > div {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .benefit-lines dd { justify-self: start; }
}

/* レスポンシブテーブル: スマホ幅では縦積みカード化 */
@media (max-width: 600px) {
  .article-body table:not(.responsive-stack),
  .list-body table:not(.responsive-stack) {
    table-layout: fixed;
    max-width: 100%;
  }
  .article-body table:not(.responsive-stack) th,
  .article-body table:not(.responsive-stack) td,
  .list-body table:not(.responsive-stack) th,
  .list-body table:not(.responsive-stack) td {
    word-break: auto-phrase;
    overflow-wrap: normal;
  }
  .article-body table.responsive-stack,
  .list-body table.responsive-stack {
    display: block;
    border: 0;
  }
  .article-body table.responsive-stack thead,
  .list-body table.responsive-stack thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
  }
  .article-body table.responsive-stack tbody,
  .list-body table.responsive-stack tbody { display: block; }
  .article-body table.responsive-stack tr,
  .list-body table.responsive-stack tr {
    display: block;
    border: 1px solid rgba(17, 50, 77, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.35);
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.6rem;
  }
  .article-body table.responsive-stack td,
  .list-body table.responsive-stack td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0.15rem 0;
    text-align: left;
  }
  .article-body table.responsive-stack td:first-child,
  .list-body table.responsive-stack td:first-child {
    font-weight: 600;
    color: var(--c-secondary);
    border-bottom: 1px dashed rgba(17, 50, 77, 0.18);
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
  }
}

/* =====================================================================
   mail.php 確認/完了/エラー画面（自社製フォームハンドラ）
   サイトの共通ヘッダ/フッタは持たない最小レイアウト。
   既存の .container / .btn / .btn-primary / .btn-secondary を流用する。
   ===================================================================== */
.mail-handler-main {
  padding-top: var(--space-lg, 2.5rem);
  padding-bottom: var(--space-lg, 2.5rem);
  max-width: 720px;
}
.mail-handler-main h1 {
  margin-bottom: 1rem;
}
.confirm-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
}
.confirm-table th,
.confirm-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(17, 50, 77, 0.12);
}
.confirm-table th {
  width: 32%;
  white-space: nowrap;
  color: var(--c-secondary, #11324d);
  font-weight: 600;
  background: rgba(17, 50, 77, 0.04);
}
.mail-handler-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .confirm-table th { width: auto; white-space: normal; }
}
