/* ==========================================================
   共通レイアウト：ヘッダー / フッター / スマホ下部固定ボタン
   ★ 案件ごとに作る（Figma／参照サイトのデザインに合わせる）。見本：株式会社アクセル社の css/common_layout.css
   ※ 色はすべて css/common.css の :root 変数を使用
   ※ js/common.js が使う前提のid/class：#common_header（.is-show で表示）、.common_header__toggle、#common_header_drawer、
      #common_fixed、#common_side、.common_header--lock（html に付く）
   ※ 寸法は画面幅に比例（clamp + vw）。固定幅の箱には揃えない
   ========================================================== */

/* ---------- ヘッダー（左上に青いロゴの箱。MVの上では透明、スクロールで白地：.is-scrolled は js/top.js） ---------- */
.common_header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 48px);
  height: var(--header-h);
  color: var(--color-white);
  transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.common_header.is-scrolled,
.common_header.is-open {
  background: var(--color-white);
  color: var(--color-text);
  box-shadow: 0 1px 0 var(--color-line);
}

.common_header__logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  gap: 2px;
  min-width: clamp(140px, 14.6vw, 280px);
  margin-right: auto;
  padding-inline: clamp(16px, 2.6vw, 48px);
  background: var(--color-brand);
  color: var(--color-white);
}

.common_header__logo-en {
  font-family: var(--font-en);
  font-size: clamp(20px, 2.3vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.common_header__logo-ja {
  font-size: clamp(10px, 0.85vw, 14px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.common_header__nav {
  display: flex;
  gap: clamp(20px, 3.2vw, 64px);
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
@media (max-width: 1023px) {
  .common_header__nav {
    display: none;
  }
}

.common_header__nav a {
  transition: opacity 0.3s ease;
}
.common_header__nav a:hover {
  opacity: 0.6;
}

.common_header__btns {
  display: flex;
  align-self: stretch;
}
@media (max-width: 1023px) {
  .common_header__btns {
    display: none;
  }
}

/* ロゴと同じ箱（ヘッダーの高さいっぱい・英字＋日本語の2段） */
.common_header__btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: clamp(120px, 11vw, 210px);
  padding-inline: clamp(16px, 1.8vw, 32px);
  background: var(--color-brand);
  color: var(--color-white);
  transition: background-color 0.3s ease;
}
.common_header__btn:hover {
  background: var(--color-brand-soft);
}

.common_header__btn--recruit {
  background: var(--color-brand-dark);
}

.common_header__btn-en {
  font-family: var(--font-en);
  font-size: clamp(15px, 1.4vw, 24px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.common_header__btn-ja {
  font-size: clamp(10px, 0.8vw, 13px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* ハンバーガー */
.common_header__toggle {
  position: relative;
  width: var(--header-h);
  height: var(--header-h);
  display: none;
}
@media (max-width: 1023px) {
  .common_header__toggle {
    display: block;
  }
}

.common_header__toggle-bar {
  position: absolute;
  left: 50%;
  width: 26px;
  height: 2px;
  margin-left: -13px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.common_header__toggle-bar:nth-child(1) { top: calc(50% - 8px); }
.common_header__toggle-bar:nth-child(2) { top: calc(50% - 1px); }
.common_header__toggle-bar:nth-child(3) { top: calc(50% + 6px); }

.common_header.is-open .common_header__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.common_header.is-open .common_header__toggle-bar:nth-child(2) { opacity: 0; }
.common_header.is-open .common_header__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ドロワー */
.common_header__drawer {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  overflow-y: auto;
  padding: 16px var(--gutter) 48px;
  background: var(--color-white);
  color: var(--color-text);
}

.common_header__drawer-list a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-line);
  font-weight: 700;
}

.common_header__drawer-tel {
  display: flex;
  flex-direction: column;
  margin-top: 32px;
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-brand);
}

.common_header__drawer-tel span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-sub);
}

html.common_header--lock {
  overflow: hidden;
}

/* ---------- スマホ下部の固定ボタン ---------- */
.common_fixed {
  display: none;
}
@media (max-width: 767px) {
  .common_fixed {
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-footer);
    transform: translateY(100%);
    transition: transform 0.4s ease;
  }
  .common_fixed.is-show {
    transform: none;
  }
}

.common_fixed__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 700;
}

.common_fixed__btn--accent {
  background: var(--color-brand);
}

/* ---------- フッター（参考サイトの順：左に会社情報・GOOGLE MAP／右にナビ横一列 → 個人情報保護方針 → コピーライト） ---------- */
.common_footer {
  background: var(--color-footer);
  color: var(--color-white);
}

.common_footer__inner {
  padding: clamp(56px, 5vw, 96px) var(--gutter) clamp(24px, 2.4vw, 40px);
}
@media (max-width: 767px) {
  .common_footer__inner {
    padding-bottom: 88px;   /* 下部固定ボタンのぶん */
  }
}

/* CONTACT の青い箱が重なるぶん、上を空ける（--contact-overlap は css/top.css で定義。TOP以外は 0） */
.top ~ .common_footer .common_footer__inner {
  padding-top: calc(clamp(56px, 5vw, 96px) + var(--contact-overlap, 0px));
}

.common_footer__main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(32px, 4vw, 80px);
  padding-bottom: clamp(24px, 2.4vw, 40px);
  border-bottom: 1px solid var(--color-line-on-dark);
}
@media (max-width: 1023px) {
  .common_footer__main {
    flex-direction: column;
  }
}

.common_footer__logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.common_footer__logo-en {
  font-family: var(--font-en);
  font-size: clamp(32px, 3.2vw, 56px);
  font-weight: 700;
  line-height: 1;
}

.common_footer__logo-ja {
  margin-top: 6px;
  font-size: clamp(13px, 1.1vw, 17px);
  font-weight: 700;
}

.common_footer__address {
  font-size: clamp(13px, 1vw, 16px);
  font-style: normal;
  font-weight: 700;
  line-height: 1.9;
}

.common_footer__tel {
  display: inline-block;
  margin-top: 8px;
}

.common_footer__slash {
  margin-inline: 16px;
}

.common_footer__map {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 32px 10px 24px;
  border: 1px solid var(--color-white);
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.common_footer__map:hover {
  background: var(--color-white);
  color: var(--color-footer);
}

.common_footer__map-icon {
  width: 18px;
  height: 18px;
}

.common_footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 4.6vw, 88px);
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 700;
}
@media (max-width: 767px) {
  .common_footer__nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
}

.common_footer__nav-list a {
  transition: opacity 0.3s ease;
}
.common_footer__nav-list a:hover {
  opacity: 0.6;
}

.common_footer__sub {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  font-size: 13px;
  font-weight: 700;
}
@media (max-width: 767px) {
  .common_footer__sub {
    flex-direction: column;
  }
}

.common_footer__note {
  margin: 0;
  font-weight: 400;
  opacity: 0.6;
}

.common_footer__copy {
  margin: clamp(40px, 4vw, 72px) 0 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* ページトップ */
.common_footer__pagetop {
  position: fixed;
  right: clamp(16px, 2vw, 40px);
  bottom: clamp(16px, 2vw, 40px);
  z-index: 80;
  display: grid;
  place-items: center;
  width: clamp(44px, 4vw, 60px);
  height: clamp(44px, 4vw, 60px);
  border: 2px solid var(--color-brand);
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.common_footer__pagetop.is-show {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 767px) {
  .common_footer__pagetop {
    bottom: 72px;
  }
}

.common_footer__pagetop::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}
