/* リセット */

/* ハンバーガーメニュー */
.hamburger {
	position: relative;
 	width: 30px;
	height: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	cursor: pointer;
	z-index: 1100;
}

.hamburger span {
	display: block;
	width: 100%;
	height: 3px;
	background: #FFF;
	border-radius: 2px;
	transition: 0.4s;
	position: absolute;
	transform-origin: center;
}

/* 各線の位置 */
.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

/* バツアイコンへの変化 */
.hamburger.active span {
  background: #FFF;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 50%;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 50%;
  bottom: auto;
}

/* ナビゲーションメニュー（ふわっと出現） */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: #444;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  padding-top: 5rem;
  z-index: 1000;
}

.nav.active {
  opacity: 1;
  pointer-events: auto;
}

/* メニューリストのスタイル */
.nav ul {
  list-style: none;
}

.nav li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  border-bottom: 1px solid #666;
  text-align: center;
}

.nav.active li {
  opacity: 1;
  transform: translateY(0);
}

/* ふわっと順番に出る */
.nav.active li:nth-child(1) { transition-delay: 0.1s; }
.nav.active li:nth-child(2) { transition-delay: 0.2s; }
.nav.active li:nth-child(3) { transition-delay: 0.3s; }
.nav.active li:nth-child(4) { transition-delay: 0.4s; }

/* リンクの見た目 */
.nav a {
  display: block;
  padding: 1rem;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.nav a:hover {
  background: #555;
}
