/* =====================================================
   common.css — 全ページ共通コンポーネント（標準シェル）
   header / nav / フローティングハンバーガー / ドロワー / footer
   ここを直せば index.html / contact.html / privacy.html すべてに反映される。
   各ページの <style> には共通部分を書かないこと。

   トーンは Internnect の既存デザイン（青ブランドカラー・pillナビ・
   薄グレーフッター）をそのまま維持し、構造（固定ヘッダー化・
   ハンバーガー・ドロワー・レスポンシブBP）のみ標準に整流する。
   参照: skills/design/hp-build/references/components.md

   modifier:
   - body.subpage      … サブページ用（ヘッダーは常設・非固定の白背景）
   - body.is-scrolled   … トップページでスクロール後、ハンバーガー色などを調整
   ===================================================== */

/* ── HEADER：固定・常時追従 ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 0 0 30px;
  background: transparent;
  transform: translateY(0);
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease, transform .3s ease;
}
/* 下スクロール時：ヘッダーを上に隠す */
body.is-scroll-down .site-header {
  transform: translateY(-100%);
}
/* トップページ：スクロール後もヘッダー背景は透明のまま維持 */
body.is-scrolled .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.brand { display: inline-flex; align-items: center; height: 100%; }
.brand-logo { width: 188px; height: auto; display: block; }

.global-nav {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 39px;
  height: 36px;
  padding: 0 24px;
  font-size: 10px;
  font-weight: 900;
}
.global-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px 0 0 18px;
}
.global-nav a,
.header-cta {
  position: relative;
  z-index: 1;
  transition: color 0.2s ease;
}
.global-nav a:hover, .global-nav a:focus-visible,
.header-cta:hover, .header-cta:focus-visible {
  color: var(--blue);
}

/* ── フローティングハンバーガー（≤1100px で表示） ── */
.floating-menu-btn {
  position: fixed;
  top: 14px; right: 20px;
  z-index: 200;
  width: 40px; height: 40px;
  border: none;
  border-radius: var(--r-sub, 8px);
  background: transparent;
  cursor: pointer;
  display: none;
  place-items: center;
  padding: 0;
}
.floating-menu-btn > span:not(.close-mark) {
  grid-area: 1/1;
  display: block;
  width: 20px; height: 1px;
  background: #000;
  transform-origin: center;
  transition: transform .22s ease, opacity .22s ease, background-color .2s ease;
  position: relative;
  z-index: 10;
}
.floating-menu-btn span:nth-child(1) { transform: translateY(-6px); }
.floating-menu-btn span:nth-child(3) { transform: translateY(6px); }
body.menu-open .floating-menu-btn span:not(.close-mark) { opacity: 0; }
body.menu-open .floating-menu-btn { z-index: 1001; }
.floating-menu-btn .close-mark {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  font: 300 26px/1 var(--font-en);
  color: #fff;
}
body.menu-open .floating-menu-btn .close-mark { display: flex; }


/* ── ドロワーメニュー（clip-path 円形展開・ダーク） ── */
body.menu-open { overflow: hidden; }
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 9, 21, .45);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
body.menu-open .menu-overlay { opacity: 1; pointer-events: auto; }

.site-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: clamp(260px, 46vw, 420px);
  z-index: 1000;
  background: rgba(4, 9, 21, .9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  visibility: hidden;
  clip-path: circle(0% at 100% 0%);
  transition: clip-path .52s cubic-bezier(.4,0,.2,1), visibility .52s;
}
body.menu-open .site-menu { visibility: visible; clip-path: circle(150% at 100% 0%); }
.site-menu__inner {
  min-height: 100%;
  padding: 96px 32px 32px;
  display: flex;
  flex-direction: column;
}
.site-menu__nav { display: flex; flex-direction: column; }
.site-menu__nav a {
  padding: 16px 4px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.86);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .48s cubic-bezier(.22,.61,.36,1), transform .48s cubic-bezier(.22,.61,.36,1), color .2s ease, padding-left .2s ease;
}
body.menu-open .site-menu__nav a { opacity: 1; transform: translateX(0); }
body.menu-open .site-menu__nav a:nth-child(1) { transition-delay: .18s; }
body.menu-open .site-menu__nav a:nth-child(2) { transition-delay: .24s; }
body.menu-open .site-menu__nav a:nth-child(3) { transition-delay: .30s; }
body.menu-open .site-menu__nav a:nth-child(4) { transition-delay: .36s; }
body.menu-open .site-menu__nav a:nth-child(5) { transition-delay: .42s; }
body.menu-open .site-menu__nav a:nth-child(6) { transition-delay: .48s; }
body.menu-open .site-menu__nav a:nth-child(7) { transition-delay: .54s; }
.site-menu__nav a:hover { color: #fff; padding-left: 12px; }

/* ===== FOOTER (トーンは既存の薄グレー基調を維持) ===== */
.footer {
  padding: 72px 67px 0;
  background: #f4f4f2;
}
.footer__main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 64px;
}
.footer__logo {
  display: inline-block;
  margin-bottom: 14px;
  margin-left: -10px;
}
.footer__meta {
  margin: 10px 0 6px;
  color: #6b7280;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.footer__tagline {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.footer__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.footer__stats li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 18px;
  border-left: 1px solid rgba(33, 60, 219, 0.18);
  color: #6b7280;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.footer__stats li:first-child {
  padding-left: 0;
  border-left: 0;
}
.footer__stats strong {
  color: #6b7280;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}
.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.footer__nav a {
  display: block;
  padding: 7px 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer__nav a:hover { color: var(--ink); }
.footer__groups-title {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.footer__groups {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-bottom: 48px;
}
.footer__group-cat { flex: 0 0 auto; }
.footer__group-label {
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  color: #6b7280;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.footer__groups ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer__groups li {
  color: #6b7280;
  font-size: 11px;
}
.footer__info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 48px;
}
.footer__company { font-style: normal; }
.footer__company p {
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
}
.footer__offices {
  display: flex;
  gap: 32px;
  margin-top: 20px;
}
.footer__office,
.footer__hq { line-height: 1.7; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line);
}
.footer__privacy {
  color: #6b7280;
  font-size: 11px;
  transition: color 0.2s;
}
.footer__privacy:hover { color: var(--ink); }
.copyright {
  color: #6b7280;
  font-size: 10px;
}

/* ── RESPONSIVE：標準BP 1100 / 900(中間) / 540 ── */
@media (max-width: 1100px) {
  .global-nav { display: none; }
  .floating-menu-btn { display: grid; }
  .brand-logo { width: 156px; }
  .site-header { padding-left: 24px; }
}
@media (min-width: 541px) and (max-width: 900px) {
  .site-header { height: 58px; padding-left: 20px; }
  .brand-logo { width: 138px; }
  .floating-menu-btn { top: 11px; right: 16px; }
  .site-menu { width: min(360px, 56vw); }
}
@media (max-width: 900px) {
  .footer { padding: 48px 22px 0; }
  .footer__main { flex-direction: column; gap: 40px; padding-bottom: 40px; }
  .footer__nav { align-items: flex-start; }
  .footer__groups { flex-wrap: wrap; row-gap: 32px; column-gap: 24px; padding-bottom: 40px; }
  .footer__group-cat { flex: 1 1 calc(50% - 12px); min-width: 0; }
  .footer__info { flex-direction: column; gap: 32px; align-items: flex-start; padding-bottom: 32px; }
  .footer__bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 540px) {
  .site-header { height: 52px; padding-left: 20px; }
  .brand-logo { width: 118px; }
  .floating-menu-btn {
    top: 10px; right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #fff;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  body.is-scrolled .floating-menu-btn {
    background: #fff;
    border-color: #fff;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .site-menu { width: min(86vw, 320px); }
  .footer {
    padding: 44px 20px 0;
  }
  .footer__main {
    gap: 28px;
    padding-bottom: 32px;
  }
  .footer__stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .footer__stats li {
    padding: 0;
    border-left: 0;
  }
  .footer__groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer__group-cat { flex: 1 1 100%; }
  .footer__offices {
    flex-direction: column;
    gap: 12px;
  }
  .footer__company p,
  .footer__groups li,
  .footer__nav a {
    line-height: 1.75;
  }
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-menu, .site-menu__nav a, .menu-overlay,
  .floating-menu-btn > span:not(.close-mark) { transition: none; }
}
