/* =====================================================
   株式会社クリアライフ  style.css
   カラーパレット:
     --navy  : #0E2841
     --blue  : #2D7FCF
     --sky   : #B8D4FD
===================================================== */

/* ---------- リセット・ベース ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- CSS カスタムプロパティ ---------- */
:root {
  --navy:       #0E2841;
  --blue:       #2D7FCF;
  --sky:        #B8D4FD;
  --sky-light:  #eaf3ff;
  --white:      #ffffff;
  --gray-bg:    #f5f7fa;
  --text:       #222222;
  --text-muted: #666666;
  --border:     #d0dff5;
  --header-h:   64px;
  --radius:     8px;
  --shadow:     0 4px 20px rgba(14, 40, 65, 0.10);
  --transition: 0.3s ease;
}

/* ---------- コンテナ ---------- */
.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- セクション共通 ---------- */
.section {
  padding: 80px 0;
}

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

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 20px;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--blue);
  border-radius: 2px;
  margin: 12px auto 0;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 0.97rem;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.btn-primary:hover {
  background: #1a6ab8;
  border-color: #1a6ab8;
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
  margin-top: 20px;
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white);
}

/* ---------- フェードインアニメーション ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

/* ---------- HEADER ---------- */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  transition: background var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* デスクトップナビ */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 0.87rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: rgba(45, 127, 207, 0.35);
}

/* ハンバーガー（モバイル） */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
  overflow: hidden;

  background:
    url('../images/track01.jpg') center 58% / cover no-repeat;
  background-color: var(--navy); /* フォールバック */
}

/* 写真の上に重ねるカラーオーバーレイ */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* 左上: 濃いネイビー（テキスト可読性確保）→ 右下: ブルートーンで画像を透かせるシネマティック効果 */
  background:
    linear-gradient(
      145deg,
      rgba(14, 40, 65, 0.94) 0%,
      rgba(14, 40, 65, 0.80) 35%,
      rgba(20, 60, 105, 0.65) 60%,
      rgba(45, 127, 207, 0.38) 100%
    );
  pointer-events: none;
}

/* 下端フェード: ヒーローから次セクションへ自然につなぐ */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(14, 40, 65, 0.45) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 0 24px;
  max-width: 760px;
}

.hero-sub {
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--sky);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero-catch {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 36px;
  text-shadow:
    0 2px 8px  rgba(0, 0, 0, 0.55),
    0 4px 24px rgba(14, 40, 65, 0.70);
}

/* ---------- 事業内容 ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(14, 40, 65, 0.15);
}

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

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.9;
  flex: 1;
}

/* ---------- 会社概要 ---------- */
.company-wrap {
  max-width: 780px;
  margin: 40px auto 0;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

.company-table th {
  width: 200px;
  white-space: nowrap;
  color: var(--navy);
  font-weight: 700;
  background: rgba(184,212,253,0.25);
}

.company-table td a {
  color: var(--blue);
  text-decoration: underline;
}

.company-table tbody tr:last-child th,
.company-table tbody tr:last-child td {
  border-bottom: none;
}

.vehicle-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}

.vehicle-list li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.88rem;
}

.vehicle-list li span {
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

/* ---------- 求人情報 ---------- */
.recruit-box {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius);
  padding: 60px 40px;
  box-shadow: var(--shadow);
  max-width: 680px;
  margin: 40px auto 0;
}

.recruit-lead {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.9;
}

/* ---------- お問い合わせ ---------- */
.contact-wrap {
  max-width: 680px;
  margin: 40px auto 0;
}

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

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

.required {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

.optional {
  display: inline-block;
  background: #b0b8c4;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,127,207,0.15);
}

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

/* スパム対策ハニーポット */
.honeypot-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-feedback {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: #e6f4ea;
  color: #2d6a4f;
  border: 1px solid #a8d5b5;
}

.form-feedback.error {
  display: block;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5a9a3;
}

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

.form-submit .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 同意チェックボックス */
.form-group-consent {
  margin-top: 28px;
  padding: 16px 20px;
  background: rgba(184,212,253,0.2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
}

.consent-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* プライバシーポリシーリンク風ボタン */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}

.link-btn:hover {
  color: #1a6ab8;
}

/* フッターのプライバシーボタン */
.footer-privacy-btn {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}

.footer-privacy-btn:hover {
  color: var(--white);
}

/* ========== プライバシーポリシー モーダル ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 40, 65, 0.65);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--navy);
  background: var(--gray-bg);
}

.modal-body {
  overflow-y: auto;
  padding: 24px 28px;
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--text);
}

.modal-body h3 {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 8px;
  padding-left: 10px;
  border-left: 3px solid var(--blue);
}

.modal-body h3:first-of-type {
  margin-top: 12px;
}

.modal-body p {
  margin-bottom: 10px;
}

.modal-body ul {
  list-style: disc;
  padding-left: 1.6em;
  margin-bottom: 10px;
}

.modal-body ul li {
  margin-bottom: 4px;
}

.policy-date {
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ---------- アクセス ---------- */
.access-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 40px;
  align-items: start;
}

.access-info {
  font-size: 0.92rem;
  line-height: 2;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.access-info p + p {
  margin-top: 8px;
}

.access-info a {
  color: var(--blue);
  text-decoration: underline;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 400px;
  border: none;
}

/* ---------- FOOTER ---------- */
#site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-info {
  font-size: 0.88rem;
  line-height: 2;
}

.footer-company {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.footer-info a {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.82rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.65);
  transition: color var(--transition);
}

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

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
}

/* =====================================================
   レスポンシブ
===================================================== */

/* タブレット */
@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid .service-card:last-child {
    grid-column: 1 / -1;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }

  .access-wrap {
    grid-template-columns: 1fr;
  }
}

/* モバイル */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .section { padding: 60px 0; }


  /* ハンバーガーメニュー表示 */
  .hamburger {
    display: flex;
  }

  /* モバイルナビメニュー */
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 8px 0 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-link {
    padding: 14px 24px;
    border-radius: 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* ヒーロー */
  .hero-catch {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  /* サービスカード */
  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-grid .service-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  /* 会社概要テーブル */
  .company-table th {
    width: auto;
    display: block;
    border-bottom: none;
    padding-bottom: 4px;
  }

  .company-table td {
    display: block;
    padding-top: 4px;
    padding-bottom: 16px;
  }

  .company-table tbody tr {
    display: block;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

  .company-table tbody tr:last-child {
    border-bottom: none;
  }

  .company-table th,
  .company-table td {
    border-bottom: none;
  }

  .vehicle-list {
    grid-template-columns: 1fr 1fr;
  }

  /* フッター */
  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .recruit-box {
    padding: 40px 24px;
  }

  .vehicle-list {
    grid-template-columns: 1fr;
  }
}
