/* --- Variables & Reset --- */
:root {
  --primary: #3a487f;
  --primary-light: rgba(13, 109, 253, 0.1);
  --text-dark: #212529;
  --text-muted: #6c757d;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --container-width: 1200px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth; /* スムーズスクロールをブラウザ標準機能で実現 */
  overflow-x: hidden;
}

body {
  line-height: 1.8;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

/* --- Layout Components --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 6rem 0;
}

.bg-light {
  background-color: var(--bg-light);
}
.text-center {
  text-align: center;
}

/* --- Typography --- */
.ff-raleway {
  font-family: "Raleway", sans-serif;
}
.section-title-en {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.section-title-ja {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 3rem;
}
.nobreak {
  display: inline-block;
  white-space: nowrap;
}
address {
  font-style: normal;
  line-height: inherit; /* 行間を親要素に合わせる */
}

/* --- Header & Nav --- */
header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95); /* 少し透けさせるとおしゃれ */
  backdrop-filter: blur(5px); /* 背後をぼかす最新の表現 */
  z-index: 1000;
  border-bottom: 3px solid var(--primary);
}

.header-logo img {
  height: 50px;
  width: auto;
  display: block;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-list a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  position: relative; /* アニメーションの基準点にする */
  padding-bottom: 4px; /* 線との隙間を作る */
  transition: color 0.3s;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary); /* ブランドカラーの線 */
  transform: scaleX(0); /* 最初は長さを0にする */
  transform-origin: center; /* 中央から伸びる設定（左からなら left） */
  transition: transform 0.3s ease; /* 0.3秒でふわっと動かす */
}

.nav-list a:hover {
  color: var(--primary); /* 文字色も一緒に変えると綺麗 */
}

.nav-list a:hover::after {
  transform: scaleX(1); /* ホバー時に長さを100%にする */
}

@media (max-width: 768px) {
  .header-logo img {
    height: 40px;
  }
  .nav-container {
    height: 90px;
  }
}

/* PCなど、マウス操作ができるデバイスのみホバーを有効にする */
@media (hover: hover) {
  .nav-list a:hover::after {
    transform: scaleX(1);
  }
  .nav-list a:hover {
    color: var(--primary);
  }
}

/* --- Hero Section --- */
.hero {
  background-color: var(--primary-light);
  padding: 5rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-catchphrase {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero h1 {
  font-size: 1rem;
  font-weight: 400;
  margin-top: 2rem;
}

/* --- Company Info Table --- */
.about-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
  border-top: 2px solid var(--primary); /* 上部にアクセントカラー */
}

.about-table th,
.about-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #eee;
}

.about-table th {
  width: 250px;
  background-color: #fcfcfc;
  color: var(--primary);
  font-weight: 700;
  text-align: left;
  vertical-align: top;
}

/* --- Margin Rate Card (マージン率のセクション) --- */
.margin-info {
  background-color: var(--white);
  border: 1px solid #e0e4f0;
  border-left: 5px solid var(--primary); /* 左側に太い線を入れて強調 */
  padding: 2rem;
  margin-top: 2rem;
}

.margin-info__title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.margin-info__text {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.margin-info__calc {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.margin-emphasis {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
  border-bottom: 2px double var(--primary);
  margin: 0 0.2rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .about-table th {
    width: 100px;
    font-size: 0.9rem;
  }
}

/* --- Service Section --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.service-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.service-item h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

/* --- About Table --- */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.table th,
.table td {
  padding: 1.5rem 0.5rem;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
}

.table th {
  width: 30%;
}

/* --- Access Section --- */
.access-info {
  margin-bottom: 2rem;
}

.access-address {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.access-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 2px solid #eee;
  padding-left: 1.5rem;
}

.access-list li {
  margin-bottom: 0.5rem;
}

.access-list strong {
  color: var(--text-dark);
}

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 12px; /* 地図の角を丸くして柔らかい印象に */
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Privacy Section --- */
.privacy-text {
  max-width: 800px; /* 読みやすいように幅を制限 */
}

.privacy-list {
  margin-top: 1.5rem;
  padding-left: 1.5rem;
}

.privacy-list > li {
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.privacy-sub-list {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  font-weight: 400;
  list-style-type: disc;
}

.privacy-sub-list li {
  margin-bottom: 0.25rem;
}

/* --- Buttons --- */
.recruit__btn {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  position: relative;
  transition: opacity 0.3s;
}

.recruit__btn:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* --- Footer Refinement --- */
.footer {
  background: #333;
  color: var(--white);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2カラム構成 */
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #ccc;
}

.footer-nav-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr; /* メニューを2列に並べる */
  gap: 0.5rem 2rem;
}

.footer-nav-list a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

.footer-nav-list a:hover {
  color: #fff;
}

.footer-bottom {
  background-color: #222;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
}

/* スマホ用調整 */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-nav-list {
    justify-content: center;
    margin-top: 2rem;
  }
}

/* --- Hamburger Menu --- */

/* 1. ボタンのデザイン */
.menu-btn {
  display: none; /* デスクトップでは隠す */
  z-index: 100;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
}

.menu-btn span {
  display: block;
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: var(--primary);
  left: 7px;
  transition: 0.3s;
}

/* 三本線の位置設定 */
.menu-btn span:nth-child(1) {
  top: 13px;
}
.menu-btn span:nth-child(2) {
  top: 21px;
}
.menu-btn span:nth-child(3) {
  top: 29px;
}

/* 2. モバイル時のスタイル (768px以下) */
@media (max-width: 768px) {
  /* ボタンは常に最前面 */
  .menu-btn {
    display: block;
    z-index: 100;
    position: relative;
  }

  /* メニュー背景 */
  .nav-wrapper {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    transition: 0.4s;
    z-index: 90;
    display: flex !important;
    justify-content: center;
    align-items: center;
  }

  /* 開いたとき */
  .nav-wrapper.is-open {
    right: 0;
  }

  /* リストと文字 */
  .nav-list {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .nav-list a {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
  }

  /* ハンバーガーアニメーション */
  .menu-btn.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-btn.is-open span:nth-child(2) {
    opacity: 0;
  }
  .menu-btn.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* --- Page Top & Animations --- */
.go-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

.go-top svg {
  fill: var(--white);
  width: 24px;
}

/* Scroll Animation (ScrollRevealの代わり) */
.loadfade {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-catchphrase {
    font-size: 2rem;
  }
  .nav-list {
    display: none;
  } /* 本来はハンバーガーメニューにする箇所 */
  .section-title-en {
    font-size: 2.5rem;
  }
}
