/* =========================================================
   木本ケンマ コーポレートサイト スタイル
   - デザイントークンを :root に集約
   - 配色はネイビー(#1b2a4a)＋スチールブルー(#2e6fb0)で統一
   ========================================================= */

:root {
  /* カラー */
  --color-primary: #1b2a4a;       /* 深いネイビー（ブランドカラー） */
  --color-primary-dark: #12203c;
  --color-primary-soft: rgba(27, 42, 74, 0.1);
  --color-accent: #2e6fb0;        /* スチールブルー（ホバー・差し色） */
  --color-bg: #f4f6f9;            /* セクション背景 */
  --color-surface: #ffffff;       /* カード背景 */
  --color-text: #222222;
  --color-muted: #555555;
  --color-line: #e0e0e0;

  /* レイアウト */
  --max-width: 1200px;
  --gutter: 30px;
  --section-pad: 80px;

  /* 装飾 */
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(27, 42, 74, 0.15);
  --shadow-lg: 0 4px 15px rgba(27, 42, 74, 0.35);
  --transition: 0.25s ease;

  --font-base: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Helvetica Neue", sans-serif;
}

html {
  /* PC では 16px、スマホでは 14px へ自動で滑らかに縮む */
  font-size: clamp(14px, 1.1vw + 0.6rem, 16px);
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
}

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

a {
  color: var(--color-primary);
}

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

/* 共通：中央寄せコンテナ */
.inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 共通：セクション見出し */
.section-title {
  text-align: center;
  font-size: 2em;
  margin: 0 auto 48px;
  color: var(--color-primary);
  position: relative;
  padding-bottom: 16px;
}

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

/* =========================================================
   ヒーロー（写真・動画なし／グラデーション背景）
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(46, 111, 176, 0.45), transparent 55%),
    linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #24406e 100%);
}

/* 精密加工をイメージした同心円パターン（軸＝Axis のモチーフ） */
.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -10%;
  width: 80vmax;
  height: 80vmax;
  transform: translateY(-50%);
  background:
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 48px);
  pointer-events: none;
}

/* スクロールを促すインジケーター */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
}

.scroll-hint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scroll-dot 1.6s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translate(-50%, 0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; }
}

/* =========================================================
   緞帳（カーテン）アニメ
   ========================================================= */
.curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 3;
  overflow: hidden;
  transform: translateY(0%);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.9, 1);
}

.curtain.hide {
  transform: translateY(-100%);
}

.curtain-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.curtain-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  font-weight: bold;
  color: var(--color-primary);
  font-family: var(--font-base);
  opacity: 0.8;
}

.persistent-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: 90%;
  font-size: 2.8em;
  color: white;
  font-weight: 600;
  font-family: var(--font-base);
  opacity: 0;
  transition: opacity 1s ease;
  z-index: 2;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4);
}

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  z-index: 4;
  padding: 10px 0;
  font-family: var(--font-base);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  display: inline-block;
  vertical-align: middle;
  font-weight: 600;
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.main-nav a:hover {
  color: var(--color-accent);
}

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

/* =========================================================
   サービス
   ========================================================= */
.services-section {
  width: 100%;
  background-color: var(--color-bg);
  padding: var(--section-pad) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--color-surface);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

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

/* 線画アイコン（写真の代わり） */
.service-icon {
  width: 64px;
  height: 64px;
  margin: 8px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-accent);
}

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

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

.service-card h3 {
  font-size: 1.2em;
  margin: 10px 0;
  color: var(--color-primary);
}

.service-card p {
  font-size: 0.95em;
  color: var(--color-muted);
  margin: 0;
  text-align: left;
}

/* =========================================================
   会社概要 / 募集要項 / 設備一覧（テーブル系）
   ========================================================= */
.company-section {
  width: 100%;
  background-color: var(--color-bg);
  padding: var(--section-pad) 0;
  text-align: center;
}

/* 偶数番目のセクションは背景を白にして区切りを出す */
.company-section:nth-of-type(even) {
  background-color: var(--color-surface);
}

.company-profile {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-table th,
.profile-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
}

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

.profile-table th {
  background: #eef2f8;
  font-weight: bold;
  width: 30%;
  color: var(--color-primary);
}

/* =========================================================
   アクセス
   ========================================================= */
.location-section {
  padding: var(--section-pad) var(--gutter);
  background-color: var(--color-bg);
  color: var(--color-text);
  text-align: center;
}

.office-block {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: left;
}

.office-block h3 {
  font-size: 1.5em;
  margin: 0 0 10px;
  color: var(--color-primary);
}

.office-block p {
  line-height: 1.6;
  font-size: 1em;
  margin: 4px 0;
}

.map-container {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map-container iframe {
  display: block;
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px var(--gutter) 24px;
  text-align: center;
}

.site-footer .footer-name {
  font-size: 1.2em;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.site-footer address {
  font-style: normal;
  font-size: 0.9em;
  line-height: 1.8;
}

.site-footer .copyright {
  margin-top: 24px;
  font-size: 0.8em;
  opacity: 0.6;
}

/* スクリーンリーダー専用（SEO用キーワードなど視覚的に隠す） */
.visually-hidden {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================================
   ハンバーガーアイコン
   ========================================================= */
.hamburger {
  display: none;
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9999;
  background: transparent;
  padding: 0;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  cursor: pointer;
}

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

.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* =========================================================
   レスポンシブ（タブレット）
   ========================================================= */
@media (max-width: 991px) {
  :root {
    --section-pad: 60px;
  }
}

/* =========================================================
   レスポンシブ（スマホ：幅 767px 以下）
   ========================================================= */
@media (max-width: 767px) {

  /* ヘッダーは横並びのまま（社名左／ハンバーガー右） */
  .logo-text {
    font-size: 1rem;
  }

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

  /* ナビをドロワー化 */
  .main-nav {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 5;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--color-line);
  }

  .main-nav a {
    display: block;
    padding: 16px var(--gutter);
  }

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

  /* ヒーローを縦長画面に収める */
  .hero {
    height: 70vh;
  }

  .persistent-logo {
    font-size: 1.7em;
  }

  /* サービスカードを 1 カラム */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* テーブル文字を少し小さく */
  .profile-table {
    font-size: 0.9rem;
  }

  .profile-table th {
    width: 38%;
  }

  /* 地図の高さを縮める */
  .map-container iframe {
    height: 240px;
  }
}

@media (min-width: 768px) {
  .hamburger {
    display: none !important;
  }
}

/* =========================================================
   モーション軽減設定（アクセシビリティ）
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
