/* ==========================================
   APPLE LIQUID GLASS UI — OPTICAL REFRACTION
   ========================================== */

.liquid-glass-nav {
  --glass-mx: 50%;
  --glass-my: 50%;
  --glass-Pointer-opacity: 0;
  position: relative;
  isolation: isolate;
  border-radius: 9999px;
  background: transparent;
  /* 3D Curved Meniscus Rim, Fresnel Specular Highlights & Inner Volume */
  box-shadow:
    /* Outer floating elevation shadow */
    0 20px 48px -10px rgba(0, 0, 0, 0.65),
    0 6px 16px -2px rgba(0, 0, 0, 0.42),
    /* Crisp outer glass boundary */
    0 0 0 0.75px rgba(255, 255, 255, 0.32),
    /* Intense top-left Apple Liquid Glass specular rim reflection */
    inset 0 2px 1.25px 0 rgba(255, 255, 255, 0.8),
    /* Bottom internal bounce reflection */
    inset 0 -1.75px 1.25px 0 rgba(255, 255, 255, 0.36),
    /* Left & right curved meniscus caustic glow */
    inset 4px 0 8px -1px rgba(186, 230, 253, 0.38),
    inset -4px 0 8px -1px rgba(244, 114, 182, 0.24),
    /* Inner curved bevel thickness */
    inset 0 8px 18px -4px rgba(255, 255, 255, 0.2),
    inset 0 -10px 20px -6px rgba(30, 64, 175, 0.25);
  transition:
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Outer capsule clip for the real SVG optical refraction plane */
.liquid-glass-refraction-clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background-color: #0a0a0a;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Plane where SVG <feDisplacementMap> + <feImage> optical lens filter executes */
.liquid-glass-refraction-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0a0a0a;
  filter: url(#apple-liquid-glass);
  -webkit-filter: url(#apple-liquid-glass);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* Keep the filter in the normal paint pipeline; forced filter promotion can
     reuse an old child texture while the page has already scrolled. */
}

/* Live-synced GPU-composited world inside the refraction plane */
.liquid-glass-refraction-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform !important;
}

/* Prevent nested GPU backdrop-filter / filter / compositor sub-layers inside the cloned world
   from caching stale textures ("debris") inside the parent SVG filter buffer during scroll */
.liquid-glass-refraction-world * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  will-change: auto !important;
  transition: none !important;
  animation: none !important;
}

/* Subtle liquid glass surface tint & pointer caustic overlay above the refracted plane */
.liquid-glass-surface-tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(
      300px circle at var(--glass-mx) var(--glass-my),
      rgba(255, 255, 255, calc(0.18 * var(--glass-Pointer-opacity))),
      rgba(147, 197, 253, calc(0.08 * var(--glass-Pointer-opacity))) 45%,
      transparent 70%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.015) 45%,
      rgba(15, 23, 42, 0.12) 100%
    );
  box-shadow:
    inset 0 2px 1.25px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1.75px 1.25px 0 rgba(255, 255, 255, 0.34),
    inset 4px 0 8px -1px rgba(186, 230, 253, 0.35),
    inset -4px 0 8px -1px rgba(244, 114, 182, 0.22),
    inset 0 8px 18px -6px rgba(255, 255, 255, 0.18);
}

/* Curved lens edge specular ring */
.liquid-glass-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.25px;
  background: linear-gradient(
    172deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(191, 219, 254, 0.42) 24%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(165, 243, 252, 0.3) 76%,
    rgba(255, 255, 255, 0.65) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* Top specular caustic sheen & dynamic pointer-following rim reflection */
.liquid-glass-nav::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(
      200px 70px at var(--glass-mx) 0%,
      rgba(255, 255, 255, calc(0.55 * var(--glass-Pointer-opacity))),
      transparent 75%
    ),
    radial-gradient(
      200px 70px at var(--glass-mx) 100%,
      rgba(147, 197, 253, calc(0.35 * var(--glass-Pointer-opacity))),
      transparent 75%
    ),
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.24) 0%,
      rgba(255, 255, 255, 0.02) 22%,
      transparent 50%,
      rgba(255, 255, 255, 0.06) 100%
    );
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}

.liquid-glass-nav.is-scrolled {
  box-shadow:
    0 22px 52px -10px rgba(0, 0, 0, 0.72),
    0 6px 20px -4px rgba(0, 0, 0, 0.45),
    0 0 0 0.75px rgba(255, 255, 255, 0.34),
    inset 0 2px 1.25px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1.75px 1.25px 0 rgba(255, 255, 255, 0.38),
    inset 3.5px 0 8px -1px rgba(147, 197, 253, 0.38),
    inset -3.5px 0 8px -1px rgba(244, 114, 182, 0.25),
    inset 0 8px 18px -6px rgba(255, 255, 255, 0.22),
    inset 0 -10px 18px -8px rgba(30, 64, 175, 0.28);
}

/* Liquid Glass sub-capsule for nav items and CTA */
.liquid-glass-pill {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.35),
    inset 0 -1px 0.5px rgba(255, 255, 255, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.2);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
}

.liquid-nav-link {
  position: relative;
  font-weight: 600;
  transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
}

.liquid-nav-link:hover {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.liquid-nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 100%);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.45),
    inset 0 -0.5px 0.5px rgba(255, 255, 255, 0.12),
    0 4px 12px -2px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: -1;
}

.liquid-nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================
   MOBILE MENU TOGGLE BUTTON & ARCHITECTURAL DRAWER
   ========================================== */
.omnix-mobile-menu-btn {
  position: relative;
  cursor: pointer;
}

.omnix-menu-bars {
  position: relative;
  width: 15px;
  height: 11px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.omnix-menu-bar {
  display: block;
  width: 100%;
  height: 1.6px;
  border-radius: 9999px;
  background-color: #ffffff;
  transform-origin: center;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.omnix-menu-bar-2 {
  width: 72%;
  margin-left: auto;
}

.omnix-mobile-menu-btn.is-open .omnix-menu-bar-1 {
  transform: translateY(4.7px) rotate(45deg);
}

.omnix-mobile-menu-btn.is-open .omnix-menu-bar-2 {
  opacity: 0;
  transform: translateX(4px);
}

.omnix-mobile-menu-btn.is-open .omnix-menu-bar-3 {
  transform: translateY(-4.7px) rotate(-45deg);
}

/* Backdrop Dimmer */
.omnix-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 6, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.34s;
}

.omnix-mobile-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Floating Glassmorphic Mobile Drawer */
.omnix-mobile-drawer {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, -10px, 0) scale(0.975);
  transform-origin: top center;
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.38s;
}

.omnix-mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.omnix-mobile-drawer-inner {
  border-radius: 20px;
  padding: 10px;
  background-color: #0e1015;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.75);
}

.omnix-mobile-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #d4d4d8;
  background: transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.omnix-mobile-link:hover,
.omnix-mobile-link:active {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}



/* Dark polished capsule over the cobalt hero. */
#liquid-glass-navbar {
  background: linear-gradient(180deg, #45464f 0%, #202129 24%, #15161e 74%, #292e3a 100%);
}
#liquid-glass-navbar .liquid-glass-refraction-clip { opacity: .22; }

/* Current page in the shared header (aria-current="page" on that page's link) */
.liquid-nav-link[aria-current="page"] { color: #ffffff; }
.liquid-nav-link[aria-current="page"]::before { opacity: 1; transform: scale(1); }
.omnix-mobile-link[aria-current="page"] { color: #ffffff; background-color: rgba(255, 255, 255, 0.06); }

/* Mobile menu layering: the header is GPU-transformed (entrance animation), which
   makes it the containing block for position:fixed children. Size the dimmer to the
   viewport explicitly, and lift the nav capsule (with its close button) above it so
   only the page behind is dimmed — never the menu or the header. */
.omnix-mobile-backdrop {
  inset: auto;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
#liquid-glass-navbar { z-index: 45; }
