/* ============================================================
   株式会社つくば地質 公式サイト 共通スタイルシート
   ------------------------------------------------------------
   構成：
     1. 変数（色・フォント・余白）      … サイト全体の色はここで一括変更できます
     2. リセット・基本設定
     3. 共通部品（ボタン・見出し・カード）
     4. ヘッダー・ナビゲーション
     5. フッター・ページトップボタン
     6. トップページ
     7. 下層ページ共通（ページタイトル・パンくず）
     8. 会社案内 / 事業内容 / 実績 / 採用 / お問い合わせ
     9. アニメーション
    10. レスポンシブ（タブレット・スマホ）
   ============================================================ */

/* ------------------------------------------------------------
   1. 変数（サイト全体の色・フォント）
   色を変えたいときは、この4色を書き換えるだけで全体に反映されます
   ------------------------------------------------------------ */
:root {
  --color-navy: #1b2a4a;        /* メイン：ネイビー（見出し・フッター） */
  --color-blue: #2563ae;        /* アクセント：ブルー（ボタン・リンク） */
  --color-blue-pale: #e8f0f9;   /* ブルーの薄い色（アイコン背景など） */
  --color-gray-bg: #f5f7fa;     /* ライトグレー（セクション背景） */
  --color-text: #2a3542;        /* 本文の文字色 */
  --color-text-sub: #64748b;    /* 補足文の文字色 */
  --color-border: #e2e8f0;      /* 罫線の色 */
  --color-white: #ffffff;

  --font-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-en: "Montserrat", sans-serif;

  --header-height: 72px;        /* 固定ヘッダーの高さ */
  --section-space: 96px;        /* セクション間の余白（広めに確保） */
  --radius: 12px;               /* 角丸の大きさ */
  --shadow: 0 4px 24px rgba(27, 42, 74, 0.08);        /* カードの影 */
  --shadow-hover: 0 12px 32px rgba(27, 42, 74, 0.16); /* ホバー時の影 */
}

/* ------------------------------------------------------------
   2. リセット・基本設定
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;                 /* ページ内リンクを滑らかに */
  scroll-padding-top: var(--header-height); /* 固定ヘッダー分ずらす */
}

body {
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.03em;
}

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

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: opacity 0.3s;
}

ul,
ol {
  list-style: none;
}

/* キーボード操作時のフォーカス表示（アクセシビリティ対応） */
:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

/* スクリーンリーダー専用テキスト（画面には表示されない） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 「本文へスキップ」リンク（キーボード利用者向け） */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 300;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 10px 20px;
  border-radius: 0 0 8px 8px;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* コンテンツの最大幅（左右に余白を確保） */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------------------------------------------------
   3. 共通部品
   ------------------------------------------------------------ */

/* --- セクション見出し（英語ラベル＋日本語タイトル） --- */
.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.section-head .en {
  display: block;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-head .ja {
  font-size: 34px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.4;
}

/* 左寄せ版の見出し */
.section-head.left {
  text-align: left;
}

/* --- ボタン --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 220px;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.3s, color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn .arrow {
  transition: transform 0.3s;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* 塗りつぶしボタン（お問い合わせなど、最も目立たせたい導線用） */
.btn-primary {
  background: var(--color-blue);
  color: var(--color-white);
}

.btn-primary:hover {
  background: #1d5292;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* 枠線ボタン（2番目の導線用） */
.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* 白ボタン（ネイビー背景の上で使う） */
.btn-white {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-white:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* --- テキストリンク（→付き） --- */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--color-blue);
}

.text-link:hover {
  opacity: 0.7;
}

/* --- カード共通 --- */
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* ------------------------------------------------------------
   4. ヘッダー・ナビゲーション（固定ヘッダー）
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 200;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}

/* スクロール時に影を付ける（script.jsで .is-scrolled を付与） */
.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(27, 42, 74, 0.1);
}

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

/* ロゴ（社名） */
.site-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.3;
}

.site-logo .logo-en {
  display: block;
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-blue);
  text-transform: uppercase;
}

/* グローバルナビゲーション */
.global-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.global-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-navy);
  padding: 8px 0;
}

/* ホバー時：下線がスッと伸びる */
.global-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.global-nav a:hover::after,
.global-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ヘッダー内のお問い合わせボタン（常に目立たせる） */
.nav-contact {
  background: var(--color-blue);
  color: var(--color-white) !important;
  padding: 12px 28px !important;
  border-radius: 999px;
  transition: background 0.3s;
}

.nav-contact::after {
  display: none; /* 下線アニメーションは不要 */
}

.nav-contact:hover {
  background: #1d5292;
}

/* --- ハンバーガーメニューボタン（スマホ用。PCでは非表示） --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 210;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  transition: transform 0.3s, opacity 0.3s;
}

/* メニューが開いているとき：3本線を「×」に変形 */
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ------------------------------------------------------------
   5. フッター・ページトップボタン
   ------------------------------------------------------------ */
.site-footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 64px 0 32px;
  margin-top: var(--section-space);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-company .site-logo {
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer-company address {
  font-style: normal;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 2;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px 40px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

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

.copyright {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

/* --- ページトップへ戻るボタン（script.jsで表示制御） --- */
.page-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s;
}

.page-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-top:hover {
  background: var(--color-blue);
}

/* ------------------------------------------------------------
   6. トップページ
   ------------------------------------------------------------ */

/* --- ヒーロー（ファーストビュー） --- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  /* 背景画像。写真を差し替えるときは images/hero.svg を置き換えてください */
  background: url("images/hero.svg") center / cover no-repeat;
}

/* 文字を読みやすくするための白い半透明レイヤー */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.55) 55%, rgba(255, 255, 255, 0.1) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: var(--header-height);
}

.hero-catch {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.hero-sub {
  margin-top: 24px;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--color-text);
  font-weight: 500;
}

.hero-btns {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* スクロールを促す表示 */
.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--color-navy);
  writing-mode: vertical-rl;
  padding-bottom: 48px;
}

.hero-scroll::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 40px;
  background: var(--color-navy);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- 各セクション共通の余白 --- */
.section {
  padding-top: var(--section-space);
}

/* 背景がライトグレーのセクション */
.section-gray {
  background: var(--color-gray-bg);
  padding-bottom: var(--section-space);
  margin-top: var(--section-space);
}

.section-gray + .section {
  margin-top: 0;
}

/* --- 会社紹介（トップ） --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text p + p {
  margin-top: 1em;
}

.about-text .text-link {
  margin-top: 24px;
}

.about-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- 事業内容（トップ：4枚カード） --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  padding: 36px 24px;
  text-align: center;
}

.service-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--color-blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue);
}

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

.service-card h3 {
  font-size: 18px;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--color-text-sub);
  text-align: left;
}

.service-more {
  text-align: center;
  margin-top: 40px;
}

/* --- 強み（3カラム） --- */
.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.strength-item {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.strength-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.strength-item .num {
  font-family: var(--font-en);
  font-size: 40px;
  font-weight: 600;
  color: var(--color-blue);
  line-height: 1;
}

.strength-item h3 {
  font-size: 20px;
  color: var(--color-navy);
  margin: 16px 0 12px;
}

.strength-item p {
  font-size: 14.5px;
  color: var(--color-text-sub);
}

/* --- お知らせ（トップ） --- */
.news-list {
  max-width: 840px;
  margin: 0 auto;
}

.news-list li {
  border-bottom: 1px solid var(--color-border);
}

.news-list a,
.news-list .news-row {
  display: flex;
  gap: 32px;
  align-items: baseline;
  padding: 20px 8px;
  color: var(--color-text);
  transition: background 0.3s;
}

.news-list a:hover {
  background: var(--color-gray-bg);
}

.news-list time {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--color-text-sub);
  flex-shrink: 0;
}

.news-list .label {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
  border-radius: 999px;
  padding: 2px 14px;
}

/* --- お問い合わせ導線（ネイビーの帯） --- */
.cta {
  margin-top: var(--section-space);
  background: var(--color-navy);
  color: var(--color-white);
  padding: 80px 24px;
  text-align: center;
}

.cta h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.cta p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
}

/* CTAの直後にフッターが来るときは余白を詰める */
.cta + .site-footer {
  margin-top: 0;
}

/* ------------------------------------------------------------
   7. 下層ページ共通
   ------------------------------------------------------------ */

/* ページタイトル部分 */
.page-header {
  padding: calc(var(--header-height) + 72px) 0 56px;
  background: var(--color-gray-bg);
  text-align: center;
}

.page-header .en {
  display: block;
  font-family: var(--font-en);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 36px;
  color: var(--color-navy);
}

/* パンくずリスト（現在地の表示） */
.breadcrumb {
  margin-top: 24px;
  font-size: 12px;
  color: var(--color-text-sub);
}

.breadcrumb ol {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
}

/* 下層ページの本文ブロック */
.page-section {
  padding-top: 80px;
}

.lead {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

/* ------------------------------------------------------------
   8. 各ページ固有
   ------------------------------------------------------------ */

/* --- 会社案内：代表挨拶 --- */
.greeting-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: start;
}

.greeting-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.greeting-name {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-sub);
}

.greeting-name strong {
  display: block;
  font-size: 18px;
  color: var(--color-navy);
}

.greeting-text p + p {
  margin-top: 1em;
}

/* --- 会社案内：会社概要（表） --- */
.company-table {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.company-table th {
  width: 180px;
  color: var(--color-navy);
  font-weight: 700;
  white-space: nowrap;
}

/* --- 会社案内：沿革（タイムライン） --- */
.history-list {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 24px;
}

/* 縦のライン */
.history-list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.history-list li {
  position: relative;
  display: flex;
  gap: 32px;
  padding: 16px 0;
}

/* ラインの上の丸 */
.history-list li::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-blue);
}

.history-list time {
  flex-shrink: 0;
  width: 110px;
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--color-navy);
}

/* --- 事業内容ページ --- */
.centrifuge-box {
  background: var(--color-blue-pale);
  border-radius: var(--radius);
  padding: 48px;
  max-width: 920px;
  margin: 48px auto 0;
}

.centrifuge-box h3 {
  color: var(--color-navy);
  font-size: 20px;
  margin-bottom: 16px;
}

.centrifuge-box p + p {
  margin-top: 1em;
}

/* 業務の詳細ブロック（画像＋説明を交互に） */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-top: 72px;
}

/* 偶数番目は画像と文章を左右入れ替え */
.service-detail:nth-of-type(even) .service-detail-img {
  order: 2;
}

.service-detail-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.service-detail h3 {
  font-size: 24px;
  color: var(--color-navy);
  margin-bottom: 16px;
  padding-left: 16px;
  border-left: 4px solid var(--color-blue);
}

.service-detail ul {
  margin-top: 16px;
}

.service-detail li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
  font-size: 15px;
}

/* リストの先頭にチェックマーク */
.service-detail li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-blue);
  font-weight: 700;
}

/* --- 実績ページ（カード一覧） --- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.works-card .works-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.works-card .works-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

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

.works-body {
  padding: 24px;
}

.works-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-blue);
  background: var(--color-blue-pale);
  border-radius: 999px;
  padding: 3px 14px;
  margin-bottom: 12px;
}

.works-body h3 {
  font-size: 17px;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.works-body p {
  font-size: 14px;
  color: var(--color-text-sub);
}

.works-note {
  margin-top: 48px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-sub);
}

/* --- 採用ページ --- */
.recruit-status {
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-gray-bg);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}

.recruit-status h3 {
  font-size: 20px;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.recruit-status p {
  font-size: 15px;
  color: var(--color-text-sub);
}

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

.recruit-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- お問い合わせページ --- */
.contact-note {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--color-text-sub);
  font-size: 15px;
}

.contact-form {
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
  font-size: 15px;
}

/* 「必須」バッジ */
.required {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--color-white);
  background: #c0392b;
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;          /* 16px以上にするとスマホで自動ズームされない */
  font-family: var(--font-jp);
  color: var(--color-text);
  background: var(--color-gray-bg);
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.3s, background 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  background: var(--color-white);
}

.form-group textarea {
  min-height: 180px;
  resize: vertical;
}

.form-submit {
  text-align: center;
  margin-top: 40px;
}

/* 送信後に表示するメッセージ（script.jsで表示） */
.form-message {
  display: none;
  max-width: 720px;
  margin: 24px auto 0;
  background: var(--color-blue-pale);
  border-radius: 8px;
  padding: 20px 24px;
  color: var(--color-navy);
  font-weight: 500;
  text-align: center;
}

.form-message.is-visible {
  display: block;
}

/* Googleマップ埋め込み枠 */
.map-wrap {
  margin-top: 80px;
}

.map-placeholder {
  aspect-ratio: 16 / 6;
  background: var(--color-gray-bg);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-sub);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

/* Googleマップを貼り付けたとき用（iframeを枠いっぱいに表示） */
.map-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 6;
  border: 0;
  border-radius: var(--radius);
}

/* ------------------------------------------------------------
   9. アニメーション（スクロールでふわっと表示）
   script.js が画面に入った要素へ .is-inview を付けます
   ------------------------------------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* 2番目・3番目…と少しずつ遅らせて表示 */
.fade-in.delay-1 { transition-delay: 0.15s; }
.fade-in.delay-2 { transition-delay: 0.3s; }
.fade-in.delay-3 { transition-delay: 0.45s; }

/* 「動きを減らす」設定の方にはアニメーションを無効化（アクセシビリティ対応） */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------
   10. レスポンシブ対応
   ------------------------------------------------------------ */

/* --- タブレット（900px以下） --- */
@media (max-width: 900px) {
  :root {
    --section-space: 72px;
  }

  .section-head .ja {
    font-size: 28px;
  }

  /* ナビゲーションをスマホ用ドロワーに切り替え */
  .menu-toggle {
    display: flex;
  }

  .global-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 84vw);
    height: 100dvh;
    background: var(--color-navy);
    padding: calc(var(--header-height) + 24px) 32px 32px;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
  }

  /* メニューが開いた状態（script.jsで .is-open を付与） */
  .global-nav.is-open {
    transform: translateX(0);
  }

  .global-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .global-nav a {
    display: block;
    color: var(--color-white);
    padding: 14px 8px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .global-nav a::after {
    display: none;
  }

  .nav-contact {
    text-align: center;
    margin-top: 16px;
    border-bottom: none !important;
  }

  /* メニューの背後の黒い半透明背景 */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s;
    border: none;
    cursor: pointer;
  }

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

  /* グリッドを2列に */
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strength-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .service-detail,
  .recruit-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* 画像と文章の入れ替えを解除（縦並びのときは常に画像が上） */
  .service-detail:nth-of-type(even) .service-detail-img {
    order: 0;
  }

  .greeting-grid {
    grid-template-columns: 1fr;
  }

  .greeting-photo {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* --- スマホ（600px以下） --- */
@media (max-width: 600px) {
  :root {
    --header-height: 60px;
    --section-space: 56px;
  }

  body {
    font-size: 15px;
  }

  .site-logo {
    font-size: 17px;
  }

  .hero {
    min-height: 80vh;
  }

  .hero::before {
    background: rgba(255, 255, 255, 0.72);
  }

  .section-head .ja {
    font-size: 24px;
  }

  .page-header h1 {
    font-size: 26px;
  }

  .service-grid,
  .strength-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .hero-btns {
    flex-direction: column;
  }

  .company-table th {
    width: 110px;
    padding: 16px 8px;
  }

  .company-table td {
    padding: 16px 8px;
  }

  .centrifuge-box {
    padding: 28px 20px;
  }

  .recruit-status {
    padding: 32px 20px;
  }

  .history-list li {
    flex-direction: column;
    gap: 4px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .page-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }
}
