﻿@charset "utf-8";

.section-nav {
  position: fixed;
  top: 50%;
  right: var(--nav-right);
  z-index: var(--nav-z);
  transform: translateY(-50%);
  pointer-events: none;
}

.section-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--nav-gap);
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: flex-end;
}

.section-nav__button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  pointer-events: auto;
  opacity: 0.82;
  transition: opacity var(--dur-fast) ease;
}

.section-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  transition:
    transform var(--dur-fast) var(--ease-main),
    background-color var(--dur-fast) ease;
}

.section-nav__button.is-active .section-nav__dot {
  transform: scale(1.5);
  background: rgba(255, 255, 255, 1.0);
}

.section-nav__label {
  min-width: 54px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  transform: translateX(4px);
  opacity: 0;
  transition:
    transform var(--dur-fast) var(--ease-main),
    opacity var(--dur-fast) ease;
}

.section-nav__button.is-active .section-nav__label,
.section-nav__button:hover .section-nav__label {
  opacity: 1;
  transform: translateX(0);
}



/* =========================
   Modal Button
========================= */
.modalbtn{
  position: fixed;
  top: 43px;
  right: 70px;
  width: 56px;
  height: 44px;
  z-index: 9999;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.modalbtn p{
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  align-items: flex-end; /* 右揃えがポイント */
}

/* ライン */
.modalbtn span{
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--menu-line, #fff);
  transform-origin: right center;
  transition:
    transform 260ms ease,
    width 260ms ease,
    opacity 260ms ease,
    background-color 200ms ease;
}

/* 上 → 下で短く */
.modalbtn span:nth-child(1){ width: 46px; }
.modalbtn span:nth-child(2){ width: 32px; }
.modalbtn span:nth-child(3){ width: 20px; }

/* アニメーション完全停止 */
.modalbtn span{
  animation: none !important;
}

/* =========================
   OPEN時：右矢印
========================= */

.modalbtn.is-open{
  --menu-line: #000;
}

.modalbtn.is-open span{
  transition: none !important;
  transform-origin: right center;
}

/* 上ライン＝横棒 */
.modalbtn.is-open span:nth-child(1){
  width: 30px;
}

/* 中ライン消す */
.modalbtn.is-open span:nth-child(2){
  opacity: 0;
  width: 0;
}

/* 下ライン＝矢印 */
.modalbtn.is-open span:nth-child(3){
  width: 10px;
  position: relative;
  transform: rotate(45deg);
  top: -9px;
  right: -2px;
}

/* 矢尻 */
.modalbtn.is-open span:nth-child(3)::before{
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--menu-line, #000);
  transform-origin: right center;
  transform: rotate(-90deg);
}

/* 初期状態：オープニング中は線を隠す */
.modalbtn span {
  opacity: 0;
  transform: translateX(26px);
}

/* オープニング完了後、右から1本ずつ入る */
body.is-opening-finished .modalbtn:not(.is-open) span {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 520ms ease,
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1),
    width 260ms ease,
    background-color 200ms ease;
}

body.is-opening-finished .modalbtn:not(.is-open) span:nth-child(1) {
  transition-delay: 100ms;
}

body.is-opening-finished .modalbtn:not(.is-open) span:nth-child(2) {
  transition-delay: 220ms;
}

body.is-opening-finished .modalbtn:not(.is-open) span:nth-child(3) {
  transition-delay: 340ms;
}

/* 開いている時は既存の矢印形状を優先 */
.modalbtn.is-open span {
  opacity: 1;
  transition: none !important;
}

/* ===============================
   Header Actions（右上テキストリンク）
================================ */

.header-actions {
  position: fixed;
  top: 58px;
  right: 155px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 28px;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-opening-finished .header-actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}

.header-action-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.45);
  transform: scaleX(0.6);
  transform-origin: left;
  transition:
    transform 360ms var(--ease-main),
    background-color 360ms ease;
}

.header-action-btn:hover {
  color: #fff;
}

.header-action-btn:hover::after {
  transform: scaleX(1);
  background: rgba(255,255,255,0.9);
}

.header-action-icon {
  position: relative;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
}

/* mail */
.header-action-icon--mail {
  width: 13px;
  height: 9px;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 2px;
}

.header-action-icon--mail::before,
.header-action-icon--mail::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 7px;
  height: 1px;
  background: rgba(255,255,255,0.82);
}

.header-action-icon--mail::before {
  left: 0;
  transform: rotate(28deg);
  transform-origin: left center;
}

.header-action-icon--mail::after {
  right: 0;
  transform: rotate(-28deg);
  transform-origin: right center;
}

/* download */
.header-action-icon--download::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 1px;
  height: 8px;
  background: rgba(255,255,255,0.82);
}

.header-action-icon--download::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-right: 1px solid rgba(255,255,255,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.82);
  transform: rotate(45deg);
}

.header-action-icon--download {
  border-bottom: 1px solid rgba(255,255,255,0.82);
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }
}

/* ===============================
   共通リンク
================================ */

.header-action-btn {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding-bottom: 6px;

  color: rgba(255,255,255,0.88);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
}

/* 下線：テキスト全幅 */
.header-action-btn::after {
  content: "";
  position: absolute;
  left: 0;          /* ← 全幅に変更 */
  right: 0;
  bottom: 0;
  height: 1px;

  background: rgba(255,255,255,0.45);

  transform: scaleX(0.6);
  transform-origin: left;

  transition:
    transform 360ms var(--ease-main),
    background-color 360ms ease;
}

.header-action-btn:hover {
  color: #fff;
}

.header-action-btn:hover::after {
  transform: scaleX(1);
  background: rgba(255,255,255,0.9);
}

/* ===============================
   アイコン（シンプル線）
================================ */

/* メール */
.header-action-btn--contact::before {
  content: "";
  width: 12px;
  height: 8px;

  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 2px;

  position: relative;
}

.header-action-btn--contact::after {
  /* 封筒のフラップ */
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 8px;
  height: 1px;
  background: rgba(255,255,255,0.8);
  transform: rotate(25deg);
}

/* ダウンロード */
.header-action-btn--download::before {
  content: "";
  width: 10px;
  height: 10px;

  border-left: 1px solid rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.85);

  transform: rotate(-45deg);
  margin-top: -2px;
}

.header-action-btn--download::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 10px;
  width: 6px;
  height: 1px;
  background: rgba(255,255,255,0.85);
}

/* ===============================
   遅延（3本線と同期）
================================ */

body.is-opening-finished .header-actions .header-action-btn:nth-child(1) {
  transition-delay: 140ms;
}

body.is-opening-finished .header-actions .header-action-btn:nth-child(2) {
  transition-delay: 240ms;
}

/* SP非表示 */
@media (max-width: 768px) {
  .header-actions {
    display: none;
  }
}

/* ===============================
   Bottom Section Nav（フル幅・上透明）
================================ */

.bottom-section-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--nav-z);

  display: flex;
  align-items: flex-end; /* ← ここ追加 */
  justify-content: center;
  gap: 10px;

  height: 200px;
  padding: 30px 30px 0;

  background: transparent;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: none;
}

.bottom-section-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.62) 28%,
    rgba(0, 0, 0, 0.34) 52%,
    rgba(0, 0, 0, 0.12) 74%,
    rgba(0, 0, 0, 0) 100%
  );
}

.bottom-section-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70%;
  z-index: -1;
  pointer-events: none;

  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 48%,
    rgba(0, 0, 0, 0.45) 72%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to top,
    #000 0%,
    #000 48%,
    rgba(0, 0, 0, 0.45) 72%,
    transparent 100%
  );
}

.bottom-section-nav::-webkit-scrollbar {
  display: none;
}

.bottom-section-nav__button {
  position: relative;
  flex: 0 0 auto;

  padding: 10px 14px;
  border-radius: 999px;
  margin-bottom: 25px;

  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;

  color: rgba(255, 255, 255, 0.42);

  transition:
    color var(--dur-fast) ease,
    opacity var(--dur-fast) ease;
  
  pointer-events: auto;
}

.bottom-section-nav__button.is-active {
  color: rgba(255, 255, 255, 0.96);
}

.bottom-section-nav__button.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);

  width: 20px;
  height: 2px;

  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
}

.bottom-section-nav__button:hover {
  color: rgba(255, 255, 255, 0.8);
}

html.is-fallback-scroll .bottom-section-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-section-nav {
    justify-content: flex-start;
    height: 82px;
    padding: 20px 16px 0;
  }

  .bottom-section-nav__button {
    padding: 10px 12px;
    font-size: 10px;
  }
}