@charset "UTF-8";

/* ==========================================================================
   サイト共通ヘッダー（全ページ）
   Figma: PC 168:686 / ドロップダウン 168:203・168:427・168:633
          SP 168:1946 / ドロワー 168:3194（閉）・168:3224（開）

   - 旧ヘッダー（.l-header-wrapper / .l-drawer）とはクラス名を分けている
   - PC（1096px〜）はグローバルナビ、〜1095px はハンバーガー
   - デザイン幅 1440px。1096〜1440px は clamp() で余白・文字サイズを縮める
   ========================================================================== */

/* ヘッダーとドロワーで共通のトークン */
.l-gheader,
.l-gdrawer {
  --gh-text: #282420;
  --gh-accent: #e50a11;
  --gh-line: #e4e4e4;
  --gh-line-2: #c8c7c6;
}

.l-gheader {
  /* 1440px でデザイン値、1096px まで滑らかに縮める */
  --gh-pad: clamp(12px, 2.2222vw, 32px);
  --gh-side-gap: clamp(12px, 1.6667vw, 24px);
  --gh-nav-gap: clamp(12px, 2.2222vw, 32px);
  --gh-nav-fz: clamp(12px, 1.0417vw, 15px);
  --gh-logo-w: clamp(90px, 8.3333vw, 120px);
  --gh-btn-fz: clamp(13px, 1.1111vw, 16px);
  --gh-btn-pad: clamp(12px, 1.6667vw, 24px);

  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 90px;
  background-color: #fff;
  border-bottom: 1px solid var(--gh-line);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  color: var(--gh-text);
}

.l-gheader__inner {
  width: 100%;
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gh-pad);
  display: flex;
  align-items: center;
  gap: var(--gh-side-gap);
}

/* 読み上げ専用テキスト */
.l-gheader__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   ロゴ
   -------------------------------------------------------------------------- */
.l-gheader__logo {
  flex: 0 0 auto;
  margin: 0;
  line-height: 0;
}

.l-gheader__logo a {
  display: block;
  transition: opacity 0.3s ease;
}

.l-gheader__logo a:hover {
  opacity: 0.8;
}

.l-gheader__logo img {
  display: block;
  width: var(--gh-logo-w);
  height: calc(var(--gh-logo-w) * 5 / 12);
}

/* --------------------------------------------------------------------------
   PC グローバルナビ
   -------------------------------------------------------------------------- */
.l-gheader__nav {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

.l-gheader__nav-list {
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: var(--gh-nav-gap);
}

.l-gheader__nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.l-gheader__nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--gh-text);
  font-size: var(--gh-nav-fz);
  line-height: 16px;
  letter-spacing: 0.64px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.l-gheader__nav-link:hover,
.l-gheader__nav-link:focus-visible {
  color: var(--gh-accent);
}

/* 下向き矢印（Figma weui:arrow-filled をマスクで着色。currentColor に追従する） */
.l-gheader__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 10px;
}

.l-gheader__arrow i {
  display: block;
  width: 10px;
  height: 20px;
  background-color: currentColor;
  transform: rotate(90deg);
  transition: transform 0.3s ease;
  -webkit-mask: url(../images/top/header/arrow.svg) no-repeat center / 10px 20px;
  mask: url(../images/top/header/arrow.svg) no-repeat center / 10px 20px;
}

/* --------------------------------------------------------------------------
   PC ドロップダウン
   -------------------------------------------------------------------------- */
.l-gheader__dropdown {
  position: absolute;
  /* ナビ項目はヘッダー高さいっぱいに伸ばしているので、項目上端＝ヘッダー上端 */
  top: 82px;
  left: -76px;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.l-gheader__nav-item--menu:hover > .l-gheader__dropdown,
.l-gheader__nav-item--menu:focus-within > .l-gheader__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.l-gheader__dropdown-inner {
  background-color: #fff;
  border-radius: 4px;
  padding: 24px 20px;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.15));
}

.l-gheader__dropdown--about {
  width: 667px;
  max-width: calc(100vw - 40px);
}

.l-gheader__dropdown--fund,
.l-gheader__dropdown--company {
  width: 242px;
}

.l-gdropdown__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.l-gdropdown__item {
  padding: 16px 0;
  line-height: 16px;
  border-bottom: 1px solid var(--gh-line-2);
}

.l-gdropdown__item:first-child {
  padding-top: 0;
}

.l-gdropdown__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* サムネイル一覧が後ろに続くときは最後の項目にも下余白を残す（Figma 168:203） */
.l-gdropdown__list:not(:last-child) > .l-gdropdown__item:last-child {
  padding-bottom: 16px;
}

.l-gdropdown__link {
  display: block;
  color: var(--gh-text);
  font-size: 15px;
  line-height: 16px;
  letter-spacing: 0.64px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.l-gdropdown__link:hover,
.l-gdropdown__link:focus-visible {
  color: var(--gh-accent);
}

/* 代表からのご挨拶の顔写真 */
.l-gdropdown__photo {
  display: block;
  position: relative;
  width: 80px;
  height: 54px;
  margin-top: 16px;
  overflow: hidden;
}

.l-gdropdown__photo img {
  position: absolute;
  top: -5.63%;
  left: 0;
  width: 100%;
  height: 225%;
  max-width: none;
  object-fit: cover;
}

/* rengaゼミ カテゴリー（3列 x 2段） */
.l-gdropdown__thumbs {
  margin: 0;
  padding: 0 20px 0 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  column-gap: 20px;
  row-gap: 10px;
}

.l-gdropdown__thumb-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--gh-text);
  transition: color 0.3s ease;
}

.l-gdropdown__thumb-link:hover,
.l-gdropdown__thumb-link:focus-visible {
  color: var(--gh-accent);
}

.l-gdropdown__thumb {
  flex: 0 0 auto;
  display: block;
  position: relative;
  width: 80px;
  height: 54px;
  overflow: hidden;
}

.l-gdropdown__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.l-gdropdown__thumb-label {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.64px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   ボタン（ログイン / 口座開設）
   -------------------------------------------------------------------------- */
.l-gheader__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.l-gheader__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px var(--gh-btn-pad);
  border-radius: 4px;
  color: #fff;
  font-size: var(--gh-btn-fz);
  font-weight: 700;
  letter-spacing: 0.64px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

/* 旧CSSの `.fw a { color: var(--color_text) }` に負けないよう a 要素付きで指定する */
.fw a.l-gheader__btn {
  color: #fff;
}

.l-gheader__btn--login {
  background-color: var(--gh-text);
  line-height: 24px;
}

/* 注記フレーム 168:642「マウスオーバーで赤に」（黒ボタン → 赤ボタン） */
.l-gheader__btn--login:hover,
.l-gheader__btn--login:focus-visible {
  background-color: var(--gh-accent);
}

.l-gheader__btn--cv {
  background-color: var(--gh-accent);
  line-height: 28px;
}

.l-gheader__btn--cv:hover,
.l-gheader__btn--cv:focus-visible {
  opacity: 0.8;
}

/* --------------------------------------------------------------------------
   ハンバーガーボタン（〜1095px）
   -------------------------------------------------------------------------- */
.l-gheader__toggle {
  display: none;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 4px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  appearance: none;
}

.l-gheader__toggle img {
  display: block;
  width: 40px;
  height: 40px;
}

/* --------------------------------------------------------------------------
   タブレット・SP（共通〜1023px / 下層ページは1095pxまで）
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1023px) {
  .l-gheader {
    height: 60px;
  }

  .l-gheader__inner {
    padding: 0 11px 0 16px;
    gap: 16px;
    justify-content: space-between;
  }

  .l-gheader__logo img {
    width: 100px;
    height: 42px;
  }

  .l-gheader__nav,
  .l-gheader__actions {
    display: none;
  }

  .l-gheader__toggle {
    display: block;
  }
}

/* 下層ページは従来のヘッダー境界を維持する。トップのPC指定とは重ならない。 */
@media screen and (min-width: 1024px) and (max-width: 1095px) {
  :where(body:not(.p-home)) .l-gheader {
    height: 60px;
  }

  :where(body:not(.p-home)) .l-gheader__inner {
    padding: 0 11px 0 16px;
    gap: 16px;
    justify-content: space-between;
  }

  :where(body:not(.p-home)) .l-gheader__logo img {
    width: 100px;
    height: 42px;
  }

  :where(body:not(.p-home)) .l-gheader__nav,
  :where(body:not(.p-home)) .l-gheader__actions {
    display: none;
  }

  :where(body:not(.p-home)) .l-gheader__toggle {
    display: block;
  }
}

/* ==========================================================================
   SP ドロワー（ハンバーガーメニュー）
   ========================================================================== */
.l-gdrawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-weight: 500;
  color: #282420;
}

.l-gdrawer.is-open {
  opacity: 1;
  visibility: visible;
}

.l-gdrawer__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(40, 36, 32, 0.4);
}

.l-gdrawer__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.l-gdrawer__body {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 20px 24px 48px;
}

/* ロゴ + 閉じるボタン */
.l-gdrawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px;
}

.l-gdrawer__logo {
  margin: 0;
  line-height: 0;
}

.l-gdrawer__logo img {
  display: block;
  width: 79px;
  height: 33px;
}

.l-gdrawer__close {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  appearance: none;
  transition: opacity 0.3s ease;
}

.l-gdrawer__close:hover {
  opacity: 0.8;
}

.l-gdrawer__close img {
  display: block;
  width: 20px;
  height: 20px;
}

/* ナビ */
.l-gdrawer__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.l-gdrawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0 0 20px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #c8c7c6;
  border-radius: 0;
  background: none;
  color: #282420;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.64px;
  text-align: left;
  text-decoration: none;
  appearance: none;
  transition: color 0.3s ease;
}

.l-gdrawer__row--toggle {
  cursor: pointer;
}

.l-gdrawer__row:hover,
.l-gdrawer__row:focus-visible {
  color: var(--gh-accent);
}

/* 開いているときは矢印を上向きに */
.l-gdrawer__row[aria-expanded="true"] .l-gheader__arrow i {
  transform: rotate(-90deg);
}

.l-gdrawer__accordion {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.l-gdrawer__accordion[hidden] {
  display: none;
}

.l-gdrawer__sub {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.l-gdrawer__sub-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.l-gdrawer__sub-link {
  display: inline-block;
  color: #282420;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: 0.64px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.l-gdrawer__sub-link:hover,
.l-gdrawer__sub-link:focus-visible {
  color: var(--gh-accent);
}

.l-gdrawer__thumbs {
  margin: 0;
  padding: 0 20px 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* SP のサムネイル・顔写真は 90 x 60 */
.l-gdrawer .l-gdropdown__thumb,
.l-gdrawer .l-gdropdown__photo {
  width: 90px;
  height: 60px;
}

.l-gdrawer .l-gdropdown__photo {
  margin-top: 0;
}

.l-gdrawer .l-gdropdown__thumb-link {
  gap: 16px;
}

/* ボタン */
.l-gdrawer__btns {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.l-gdrawer__btns .l-gheader__btn {
  width: 100%;
  padding: 10px 24px;
  font-size: 16px;
}

/* 下部のイラスト（Figma 168:3222） */
.l-gdrawer__figure {
  position: relative;
  width: 100%;
  height: 73px;
  margin: auto 0 0;
  overflow: hidden;
  flex: 0 0 auto;
}

.l-gdrawer__figure img {
  position: absolute;
  top: 1px;
  left: 50%;
  width: 652px;
  height: 163px;
  max-width: none;
  transform: translateX(-50%);
}

/* ドロワーを開いている間は背面をスクロールさせない */
body.is-gdrawer-open {
  overflow: hidden;
}

/* PC ではドロワーを使わない */
@media screen and (min-width: 1096px) {
  :where(body:not(.p-home)) .l-gdrawer {
    display: none;
  }
}
