/* ============================================================
   VULONE — Scroll-reactive navbar (composio.dev style)
   ------------------------------------------------------------
   Top of page (scroll = 0): transparent, full-width, no chrome —
   just logo + links + CTA floating over the hero.

   After scrolling (~80px): condenses into a floating pill —
   dark translucent, backdrop-blur, thin border, soft shadow,
   rounded, centered with a max-width and detached from the edges.
   ============================================================ */

:root {
  --nav-bg: rgba(14, 14, 14, 0.72);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --nav-radius: 14px;
  --nav-max: 1240px;
  --nav-offset: 12px;      /* top margin / side inset when pill */
  --nav-accent: #0ea5e9;
}

#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;

  /* Top state: invisible chrome, full width */
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: none;

  /* Explicit start state so the hide slide interpolates cleanly */
  transform: translateY(0);
  will-change: transform, opacity;

  /* One smooth, non-jumpy transition for everything */
  transition:
    border-color 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    margin 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Blurred/translucent pill background lives on its own layer so the
   transform slide on #navbar stays smooth (backdrop-filter + transform on
   the same element can snap/jump in some browsers). */
#navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: -1;
  transition:
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-backdrop-filter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hidden: slides up & fades out (scroll down past midpoint) */
#navbar.nav-hidden {
  transform: translateY(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}

/* Scrolled: floating pill */
#navbar.nav-scrolled {
  border-color: var(--nav-border);
  border-radius: var(--nav-radius);
  max-width: min(var(--nav-max), calc(100% - (var(--nav-offset) * 2)));
  margin: var(--nav-offset) auto 0;
  box-shadow: var(--nav-shadow);
}

#navbar.nav-scrolled::before {
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

/* --- Accessible focus / active states --- */
#navbar a:focus-visible,
#navbar button:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 2px;
  border-radius: 6px;
}

#navbar a[aria-current="page"] {
  color: #ffffff;
}
