/* ═══════════════════════════════════════════════════════
   SAFARI — Shared Navigation Styles
   ═══════════════════════════════════════════════════════ */

/* ── HEADER BAR ── */
.safari-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 60px;
  background: transparent;
  border-bottom: 1px solid rgba(179,147,82, 0);
  transition:
    padding 0.5s cubic-bezier(0.4,0,0.2,1),
    background 0.6s cubic-bezier(0.4,0,0.2,1),
    border-color 0.6s cubic-bezier(0.4,0,0.2,1),
    backdrop-filter 0.6s cubic-bezier(0.4,0,0.2,1);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
}

.safari-nav.scrolled {
  padding: 16px 60px;
  background: rgba(253,252,240, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(179,147,82, 0.14);
}

/* ── LOGO ── */
.safari-nav .nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.safari-nav .nav-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(16%) sepia(10%) saturate(1200%) hue-rotate(340deg) brightness(95%);
  transition: filter 0.4s;
}

/* ── HIERARCHY INDICATOR (Root / Trunk / Branch) ── */
.nav-hierarchy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 28px;
  flex-shrink: 0;
}

.nav-hi-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #7A5C5C;
  opacity: 0.35;
  transition: opacity 0.6s, color 0.6s;
  position: relative;
}

.nav-hi-item .hi-icon {
  width: 16px;
  height: 16px;
  transition: filter 0.6s;
}

/* Active glow effect */
.nav-hi-item.active {
  opacity: 1;
  color: #B39352;
}

.nav-hi-item.active .hi-icon {
  filter: drop-shadow(0 0 4px rgba(179,147,82, 0.5));
}

.nav-hi-sep {
  color: #E2D0A8;
  font-size: 10px;
  opacity: 0.5;
  user-select: none;
}

/* ── NAV LINKS (Desktop) ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  flex-shrink: 0;
}

.nav-menu a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #3C2F2F;
  text-decoration: none;
  opacity: 0.6;
  padding: 8px 10px;
  white-space: nowrap;
  transition: opacity 1s cubic-bezier(0.4,0,0.2,1), color 1s cubic-bezier(0.4,0,0.2,1);
}

.nav-menu a:hover {
  opacity: 1;
  color: #B39352;
}

.nav-menu a.current {
  opacity: 1;
  color: #B39352;
}

/* ── CTA GHOST BUTTON ── */
.nav-cta {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: #B39352;
  text-decoration: none;
  border: 1px solid rgba(179,147,82, 0.5);
  padding: 8px 22px;
  margin-left: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: color 0.8s cubic-bezier(0.4,0,0.2,1), border-color 0.8s cubic-bezier(0.4,0,0.2,1);
  z-index: 1;
}

.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(179,147,82,0.12), rgba(201,170,110,0.18));
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4,0,0.2,1);
  z-index: -1;
}

.nav-cta:hover {
  color: #3C2F2F;
  border-color: #B39352;
}

.nav-cta:hover::before {
  opacity: 1;
}

/* ── HAMBURGER (Mobile) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1010;
  position: relative;
}

.nav-hamburger .hb-line {
  display: block;
  width: 28px;
  height: 1px;
  background: #3C2F2F;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.4s;
  transform-origin: center;
}

/* Hamburger → X */
.nav-hamburger.open .hb-line:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-hamburger.open .hb-line:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ── MOBILE DRAWER ── */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(253,252,240, 0.97);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), visibility 0.6s;
}

.nav-drawer.open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.nav-drawer-links li {
  overflow: hidden;
}

.nav-drawer-links a {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: #3C2F2F;
  text-decoration: none;
  padding: 14px 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1), transform 0.5s cubic-bezier(0.4,0,0.2,1), color 1s;
}

.nav-drawer.open .nav-drawer-links a {
  opacity: 0.7;
  transform: translateY(0);
}

.nav-drawer.open .nav-drawer-links li:nth-child(1) a { transition-delay: 0.1s; }
.nav-drawer.open .nav-drawer-links li:nth-child(2) a { transition-delay: 0.18s; }
.nav-drawer.open .nav-drawer-links li:nth-child(3) a { transition-delay: 0.26s; }
.nav-drawer.open .nav-drawer-links li:nth-child(4) a { transition-delay: 0.34s; }
.nav-drawer.open .nav-drawer-links li:nth-child(5) a { transition-delay: 0.42s; }
.nav-drawer.open .nav-drawer-links li:nth-child(6) a { transition-delay: 0.50s; }

.nav-drawer-links a.current {
  opacity: 1;
  color: #B39352;
}

.nav-drawer-links a:hover {
  color: #B39352;
  opacity: 1;
}

/* Drawer CTA */
.nav-drawer-cta {
  margin-top: 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s 0.56s, transform 0.5s 0.56s;
}

.nav-drawer.open .nav-drawer-cta {
  opacity: 1;
  transform: translateY(0);
}

.nav-drawer-cta a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #B39352;
  text-decoration: none;
  border: 1px solid rgba(179,147,82, 0.5);
  padding: 14px 36px;
  position: relative;
  overflow: hidden;
  transition: color 0.8s, border-color 0.8s;
}

.nav-drawer-cta a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(179,147,82,0.12), rgba(201,170,110,0.18));
  opacity: 0;
  transition: opacity 0.8s;
}

.nav-drawer-cta a:hover { color: #3C2F2F; border-color: #B39352; }
.nav-drawer-cta a:hover::before { opacity: 1; }

/* Drawer hierarchy */
.nav-drawer-hierarchy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.nav-drawer-hierarchy .nav-hi-item {
  font-size: 12px;
}

.nav-drawer-hierarchy .hi-icon {
  width: 20px;
  height: 20px;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .safari-nav {
    padding: 20px 24px;
  }

  .safari-nav.scrolled {
    padding: 14px 24px;
  }

  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .nav-hierarchy {
    display: none;
  }

  .nav-drawer-links a {
    font-size: 16px;
    padding: 12px 32px;
  }
}
