/* 2026-04-21 00:00:00 */
/* header.css — ヘッダー・デスクトップ/モバイルナビ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 5%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 0px));
  border-bottom: 1px solid rgba(0, 168, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(0, 168, 255, 0.08),
    0 0 40px rgba(0, 168, 255, 0.04);
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease;
}

/* Scanline overlay */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 168, 255, 0.02) 2px, rgba(0, 168, 255, 0.02) 4px);
  pointer-events: none;
  z-index: 2;
}

/* Neon border accent (bottom) */
.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--purple), var(--blue), transparent);
  box-shadow:
    0 0 8px rgba(0, 168, 255, 0.4),
    0 0 20px rgba(224, 64, 251, 0.2);
  opacity: 0.7;
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow:
    0 1px 0 rgba(0, 168, 255, 0.06),
    0 0 60px rgba(0, 168, 255, 0.06),
    0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Knight Rider Scan Line */
@keyframes knightRider {
  0% {
    left: -30%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.header.scrolled::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00a8ff, transparent);
  animation: knightRider 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* Header inner layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.logo-svg {
  height: 24px;
  width: auto;
  filter: drop-shadow(0 0 12px var(--blue-glow));
}

/* Desktop Nav */
.nav-desktop {
  display: flex;
  flex: 1;
  justify-content: flex-end;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(224, 224, 224, 0.7);
  letter-spacing: 0.04em;
  position: relative;
  padding: 8px 14px;
  transition:
    color 0.3s ease,
    text-shadow 0.3s ease;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.nav-desktop a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.08), rgba(224, 64, 251, 0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  box-shadow: 0 0 6px var(--blue-glow);
  transform: scaleX(0);
  transition: transform 0.4s ease-in-out;
}

.nav-desktop a:hover {
  color: var(--white);
  animation: nav-glitch 0.35s ease-in-out 1;
  will-change: text-shadow;
}

.nav-desktop a:hover::before {
  opacity: 1;
}

.nav-desktop a:hover::after {
  transform: scaleX(1);
}

.nav-desktop a.current {
  color: var(--blue);
}

.nav-desktop a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

@keyframes nav-glitch {
  0%,
  100% {
    text-shadow:
      0 0 8px var(--blue-glow),
      0 0 16px rgba(0, 168, 255, 0.3);
  }
  25% {
    text-shadow:
      -2px 0 var(--purple),
      2px 0 var(--blue),
      0 0 12px var(--blue-glow);
  }
  50% {
    text-shadow:
      2px 0 var(--blue),
      -2px 0 var(--purple),
      0 0 20px var(--purple-glow);
  }
  75% {
    text-shadow:
      0 0 10px var(--purple-glow),
      0 0 20px rgba(224, 64, 251, 0.3);
  }
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
  box-shadow: 0 0 4px var(--blue-glow);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px);
  z-index: 1001;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  border: 1px solid rgba(0, 168, 255, 0.1);
  box-shadow: 0 0 100px rgba(0, 168, 255, 0.06) inset;
}

.nav-mobile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 168, 255, 0.015) 2px, rgba(0, 168, 255, 0.015) 4px);
  pointer-events: none;
}

.nav-mobile::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(0, 168, 255, 0.06);
  clip-path: polygon(0 0, 30px 0, 0 30px, 0 0, 100% 100%, calc(100% - 30px) 100%, 100% calc(100% - 30px), 100% 100%);
  pointer-events: none;
}

.nav-mobile.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.nav-mobile a {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.06em;
  padding: 14px 32px;
  transition:
    color 0.25s ease,
    text-shadow 0.25s ease;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.nav-mobile a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.06), rgba(224, 64, 251, 0.03));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.nav-mobile a:hover::before {
  opacity: 1;
}

.nav-mobile a:hover {
  color: var(--blue);
  text-shadow: 0 0 12px var(--blue-glow);
}

.nav-mobile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: none;
  border: 1px solid var(--blue-glow);
  border-radius: 0;
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s,
    text-shadow 0.3s;
  z-index: 10;
}

.nav-mobile-close:hover {
  background: rgba(0, 128, 255, 0.15);
  color: #fff;
  text-shadow: 0 0 12px var(--blue-glow);
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}
