/* layout.css */

/* ===== ヘッダー外側の縦3本線（画面左端・高さ100vh・固定） ===== */
.sidebar-stripes--outside {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px; /* 太さ（要件：60px） */
    height: 100vh; /* 画面高さ */
    background: linear-gradient(
      to right,
      #B32222 0 33.3%,
      #F9FAFB 33.3% 66.6%,
      #4A6C4F 66.6% 100%
    );
    pointer-events: none; /* クリックに干渉しない */
    z-index: 0; /* 背面に固定 */
  }
  
  /* サイドバーのラッパ（特に指定がなければ相対でOK） */
  .sidebar-wrap {
    position: relative;
  }
  
  /* 縦線ぶん、全体を右にオフセット */
  .layout {
    margin-left: 60px; /* 要件：60px */
    position: relative;
    z-index: 1; /* 縦線より前に */
  }


/* ====== Layout ====== */
.layout {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: var(--sidebar-w);
  min-height: 100dvh;
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 6vmin, 160px);
  background: transparent;
}

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

nav.menu {
  margin-top: 8px;
}
.menu__list {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 6vh, 56px);
  list-style: none;
  padding: 8px 0 0 0;
  margin: 0;
}
.menu__en {
  display: block;
  font-size: 2.12rem;
  font-weight: 700;
  line-height: 1.2;
}
.menu__ja {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-sub);
  margin-top: 2px;
}

.content {
  flex: 1;
  min-width: 0;
}
.container {
  max-width: var(--content-max);
  padding: 0 6vw;
  margin: 0 auto;
}

.section__title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 10px;
}
.section__lead {
  font-size: 1rem;
  color: var(--ink-sub);
}

/* Company Profile */
.profile {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px 24px;
}
.profile dt {
  font-weight: 700;
  color: #333;
}
.profile dd {
  margin: 0;
}

/* Contact */
.contact p {
  margin: 0 0 10px;
}

/* Mobile */
@media (max-width: 920px) {
  :root {
    --sidebar-w: 100%;
  }
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    min-height: auto;
    border-right: none;
  }
  .menu__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .menu__link {
    padding: 8px 10px;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .menu__en {
    font-size: 1.92rem; /* 約2倍 */
  }
  .menu__ja {
    font-size: 1.44rem; /* 約2倍 */
  }
  section {
    padding-block: 32px;
  }
}

/* --- Force hide stripes on mobile (override) --- */
@media (max-width: 920px) {
  .sidebar-stripes--outside { display: none !important; }
  .layout { margin-left: 0 !important; }
}

/* ===== Hamburger (mobile) ===== */
.hamburger { display: none; }
.nav-toggle { display: none; }

@media (max-width: 920px) {
  /* デスクトップ構造の調整 */
  .layout { margin-left: 0 !important; }
  .sidebar-stripes--outside { display: none !important; }

  /* サイドバーをデフォルト非表示に */
  .sidebar { display: none; }

  /* ハンバーガーボタン */
  .hamburger {
    display: inline-flex;
    position: fixed;
    top: 14px;
    left: 14px;
    width: 34px;
    height: 26px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 1100; /* サイドバーより前 */
    cursor: pointer;
  }
  .hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
  }

  /* チェック時にメニュー表示（スライドイン） */
  .nav-toggle:checked ~ .sidebar-wrap .sidebar {
    display: block;
    position: fixed;
    inset: 0 auto 0 0; /* top:0; right:auto; bottom:0; left:0; */
    width: min(80vw, 320px);
    max-width: 90vw;
    height: 100dvh;
    overflow: auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(2px);
    box-shadow: 2px 0 16px rgba(0,0,0,.12);
    padding: 24px 20px 32px;
    z-index: 1000;
  }

  /* メニュー開閉時のボタン状態（×風にしたければ追加可能） */
  .nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* 変化をスムーズに */
  .hamburger span { transition: transform .2s ease, opacity .2s ease; }
}

/* === Full-screen sections (desktop) === */
.content > .container > section {
    min-height: 100vh;         /* 1画面フィット */
    display: flex;
    flex-direction: column;
    justify-content: center;   /* 縦中央寄せ（お好みで） */
  }
  

/* スマホは通常スクロールなので特別な指定なし（上の min-height はそのままでOK） */

/* === Desktop: overscroll を抑止して微振動を防ぐ === */
@media (min-width: 921px) {
    html, body {
      overscroll-behavior: none; /* ラバーバンド/バウンスを防止 */
      scroll-behavior: auto;     /* アンカーのネイティブスムースを無効化 */
    }
  }

  /* ==== Full screen sections (desktop only) ==== */
@media (min-width: 921px) {
    /* 各セクションを1画面にフィットさせる */
    .content > .container > section {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center; /* 中央寄せ。不要なら削除 */
    }
  
    /* ブラウザのオーバースクロールやネイティブsmoothを抑止して“半端スクロール”を防ぐ */
    html, body {
      overscroll-behavior: none;
      scroll-behavior: auto;
    }
  }
  

  
/* ===== Mobile-only header (three stripes + centered logo) ===== */
.mobile-header { display: none; }

@media (max-width: 920px) {
  .mobile-header {
    display: block;
    position: sticky; /* 常に最上部で表示（スクロールしても上に貼り付く） */
    top: 0;
    z-index: 1200;
    background: transparent;
  }
  .mobile-header .mobile-stripes {
    display: grid;
    grid-template-rows: repeat(3, 8px);
    width: 100%;
  }
  .mobile-header .mobile-stripes .stripe { display: block; width: 100%; height: 100%; }
  .mobile-header .mobile-stripes .stripe--red   { background: #B32222; }
  .mobile-header .mobile-stripes .stripe--white { background: #F9FAFB; }
  .mobile-header .mobile-stripes .stripe--green { background: #4A6C4F; }

  .mobile-header .mobile-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 12px;
  }
  .mobile-header .mobile-logo img {
    height: 44px; /* ロゴサイズ（調整可） */
    width: auto;
    display: block;
  }
}