/* ━━━━━━━━━━━━━━━━━━━━━━━━
   PREMIUM CINEMATIC NAV
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav {
  position: fixed;
  top: 0;
  left: 50%;

  transform: translateX(-50%) translateY(0) scale(1);

  z-index: 100;
  height: var(--nav-h);

  width: fit-content;
  min-width: 1040px;

  margin-top: 26px;
  padding: 0;

  isolation: isolate;
  overflow: visible;

  /* DARK GLASS BASE */
  background:
    linear-gradient(
      180deg,
      rgba(18,22,30,0.34) 0%,
      rgba(18,22,30,0.18) 100%
    );

  border: 1px solid rgba(255,255,255,0.10);

  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);

  border-radius: 22px;
  border-radius: 14px;

  /* DEPTH */
  box-shadow:
    0 10px 30px rgba(0,0,0,0.10),
    0 30px 80px rgba(0,0,0,0.20),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(255,255,255,0.03);

  /* GPU OPTIMIZATION */
  will-change:
    width,
    border-radius,
    transform,
    background,
    backdrop-filter,
    box-shadow;

  transform-style: preserve-3d;

  /* ULTRA SMOOTH TRANSITION */
  transition:
    width 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    min-width 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 950ms cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 950ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 950ms cubic-bezier(0.16, 1, 0.3, 1),
    background 650ms ease,
    border-color 650ms ease,
    backdrop-filter 650ms ease,
    box-shadow 750ms ease;
}


/* SOFT LIGHT LAYER */
.nav::before {
  content: "";

  position: absolute;
  inset: 0;

  border-radius: inherit;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.10),
      transparent 42%,
      transparent 58%,
      rgba(255,255,255,0.04)
    );

  opacity: 1;

  pointer-events: none;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   SCROLLED STATE
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav.scrolled {
  /* width: calc(100% - 34px);
  min-width: 0;

  margin-top: 10px; */

  transform: translateX(-50%) translateY(0) scale(1);

  /* border-radius: 30px;
  border-radius: 14px; */

  /* NOT PURE WHITE */
  background:
    linear-gradient(
      180deg,
      rgba(245,247,250,0.82) 0%,
      rgba(236,240,245,0.72) 100%
    );

  border: 1px solid rgba(255,255,255,0.55);

  backdrop-filter: blur(30px) saturate(220%);
  -webkit-backdrop-filter: blur(30px) saturate(220%);

  box-shadow:
    0 8px 24px rgba(15,23,42,0.05),
    0 20px 60px rgba(15,23,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.70),
    inset 0 -1px 0 rgba(255,255,255,0.18);
  width: 100%;
  margin: 0px;
  border-radius: 0px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   NAV INNER
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav-inner {
  position: relative;
  z-index: 2;

  max-width: var(--max-w);

  margin: 0 auto;
  padding: 0 var(--gutter);

  height: 100%;

  display: flex;
  align-items: center;
  gap: var(--sp-6);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   LOGO
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;

  flex-shrink: 0;
  text-decoration: none;

  transition:
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}


.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;

  letter-spacing: 0.01em;

  color: var(--ink);

  transition:
    color 0.4s ease,
    transform 0.4s ease;
}

.logo-sub {
  margin-top: 3px;

  font-family: var(--font-mono);
  font-size: 8px;

  letter-spacing: 0.24em;
  text-transform: uppercase;

  color: var(--ink-40);

  transition: color 0.4s ease;
}


/* HERO MODE */
.nav.hero-mode .logo-name {
  color: #fff;
}

.nav.hero-mode .logo-sub {
  color: rgba(255,255,255,0.58);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   NAV LINKS
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;

  flex: 1;
}

.nav-link {
  position: relative;

  display: flex;
  align-items: center;
  gap: 4px;

  padding: 8px 14px;

  border-radius: 12px;

  font-size: 13.5px;
  font-weight: 500;

  letter-spacing: 0.01em;

  cursor: pointer;
  user-select: none;

  color: var(--ink-80);

  transition:
    color 0.3s ease,
    background 0.3s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.nav-link:hover {
  transform: translateY(-1px);

  background: rgba(255,255,255,0.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link:active {
  transform: scale(0.97);
}

.nav-link .material-icons-round {
  font-size: 14px;

  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.3s ease;
}

.nav-link.active-dd .material-icons-round {
  transform: rotate(180deg);
}


/* HERO LINKS */
.nav.hero-mode .nav-link {
  color: rgba(255,255,255,0.82);
}

.nav.hero-mode .nav-link .material-icons-round {
  color: rgba(255,255,255,0.38);
}

.nav.hero-mode .nav-link:hover {
  color: #fff;

  background: rgba(255,255,255,0.08);
}


/* SCROLLED LINKS */
.nav.scrolled .nav-link {
  color: rgba(15,23,42,0.76);
}

.nav.scrolled .nav-link:hover {
  color: #0f172a;

  background: rgba(15,23,42,0.045);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   ACTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);

  margin-left: auto;
}


/* SEARCH BUTTON */
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 9px;

  padding: 8px 15px;

  border-radius: 14px;

  background: rgba(255,255,255,0.08);

  border: 1px solid rgba(255,255,255,0.10);

  color: rgba(255,255,255,0.68);

  cursor: pointer;

  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    color 0.3s ease;
}

.nav-search-btn:hover {
  transform: translateY(-1px);

  background: rgba(255,255,255,0.12);

  border-color: rgba(255,255,255,0.16);

  color: #fff;

  box-shadow:
    0 10px 20px rgba(0,0,0,0.10);
}

.nav-search-btn .material-icons-round {
  font-size: 15px;
}

.nav-search-btn .kbd {
  padding: 2px 6px;

  border-radius: 6px;

  font-size: 9px;

  background: rgba(255,255,255,0.08);

  border: 1px solid rgba(255,255,255,0.08);

  color: rgba(255,255,255,0.35);
  background-color: #000;
  color: #fff;
  padding: 5px;
}


/* SCROLLED SEARCH */
.nav.scrolled .nav-search-btn {
  background: rgba(15,23,42,0.03);

  border-color: rgba(15,23,42,0.06);

  color: rgba(15,23,42,0.62);
}

.nav.scrolled .nav-search-btn:hover {
  background: rgba(15,23,42,0.05);

  color: #0f172a;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.menu-toggle {
  width: 40px;
  height: 40px;

  display: none;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: var(--ink-60);

  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.08);

  transform: translateY(-1px);
}

.menu-toggle .material-icons-round {
  font-size: 22px;
  color: #fff;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 860px) {

  .nav {
    width: calc(100% - 20px);
    min-width: unset;

    border-radius: 18px;
  }

  /* .nav.scrolled {
    width: calc(100% - 12px);

    border-radius: 12px;
  } */
  .nav.scrolled .menu-toggle .material-icons-round {
    color: var(--ink-60);
  }

  .nav-links {
    display: none;
  }

  .nav-search-btn .search-text,
  .nav-search-btn .kbd {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}