/* ==========================================================================
   Site Header — Japan Documented (Mockup Alignment)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.logo-mark {
  display: block;
  height: 38px;
  width: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.logo-wordmark {
  font-family: var(--font-body-en), var(--font-body-ja);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav a {
  padding: 12px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color .22s ease, background-color .22s ease, transform .22s ease;
  color: rgba(17, 17, 17, 0.86);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--brand-hover);
  background: rgba(22, 94, 131, 0.06);
  transform: translateY(-1px);
}

.nav a.shop-link {
  position: relative;
  background: transparent !important;
  color: var(--brand-deep) !important;
  font-size: 14px !important;
  padding-inline: 18px !important;
  box-shadow: none;
  border-radius: 0 !important;
}

.nav a.shop-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg,
      rgba(22, 94, 131, 0.12) 0%,
      rgba(22, 94, 131, 0.30) 22%,
      rgba(12, 65, 91, 0.52) 50%,
      rgba(22, 94, 131, 0.30) 78%,
      rgba(22, 94, 131, 0.12) 100%);
  filter: blur(2px);
  transition: background .22s ease, transform .22s ease, opacity .22s ease;
  opacity: 1;
}

.nav a.shop-link:hover {
  background: transparent !important;
  color: var(--brand) !important;
  transform: translateY(-1px);
}

.nav a.shop-link:hover::after {
  background: rgba(22, 94, 131, 0.20);
  transform: scaleX(1.03);
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(17, 17, 17, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  margin-left: 6px;
}

.lang-switch__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(17, 17, 17, 0.6);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}

.lang-switch__pill:hover {
  color: var(--text);
  background: rgba(17, 17, 17, 0.04);
  transform: none;
}

.lang-switch__pill.is-active {
  background: var(--text);
  color: #fff;
}

.lang-switch__pill.is-active:hover {
  background: var(--text);
  color: #fff;
}

.menu-toggle {
  display: none;
}

.menu-button,
.menu-backdrop {
  display: none;
}

.menu-button {
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 1px;
  min-height: 1px;
  flex: 0 0 1px;
  background: #111111;
  border-radius: 999px;
  transform-origin: center;
  transition: transform .28s ease, opacity .28s ease;
}

/* ---------- 1180px ---------- */
@media (max-width: 1180px) {
  .header-inner {
    min-height: 56px;
  }

  .nav {
    gap: 6px;
  }

  .nav a {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* ---------- 900px ---------- */
@media (max-width: 900px) {
  .header-inner {
    min-height: 52px;
    justify-content: center;
    padding: 10px 0;
  }

  .logo {
    min-width: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    text-align: center;
    width: -moz-max-content;
    width: max-content;
    max-width: calc(100% - 96px);
  }

  .logo-mark {
    height: 32px;
  }

  .logo-wordmark {
    font-size: 15px;
  }

  .menu-button {
    display: inline-flex;
    position: fixed;
    top: 16px;
    right: 14px;
    z-index: 80;
  }

  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    z-index: 68;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(60vw, 340px);
    height: 100dvh;
    padding: 88px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    overflow-y: auto;
    background: #f1f1f1;
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 72;
  }

  .nav a {
    width: 100%;
    padding: 14px 14px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: transparent;
  }

  .nav a.shop-link {
    margin-top: 8px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 6px !important;
  }

  .lang-switch {
    align-self: center;
    margin: 8px 0 4px;
  }

  .lang-switch__pill {
    width: auto;
    padding: 0 14px;
  }

  .menu-toggle:checked ~ .nav {
    transform: translateX(0);
  }

  .menu-toggle:checked ~ .menu-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle:checked + .menu-button span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .menu-toggle:checked + .menu-button span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked + .menu-button span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

/* ---------- 640px ---------- */
@media (max-width: 640px) {
  .logo-mark {
    height: 32px;
  }

  .logo-wordmark {
    font-size: 15px;
  }

  .nav a {
    font-size: 15px;
    padding: 10px 12px;
  }

  .nav a.shop-link {
    margin-top: 8px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 4px !important;
  }
}
