/* ==========================================================================
   ComicanaaPixel - Ultra-Luxury Floating Capsule Navigation System
   Design: Dark Obsidian Frosted Glass Pill, Glowing Amber Neon Trim & Glass Mega Menus
   Mobile: Zero-Delay Sliding Touch Drawer with High Z-Index & Backdrop Overlay
   ========================================================================== */

/* Floating Island Header Container */
.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none; /* Allows click-through around the floating island */
  display: flex;
  justify-content: center;
  padding: 0 16px;
  transition: all var(--trans-medium);
}

/* Central Floating Capsule Pill */
.header-inner-island {
  pointer-events: auto;
  width: auto;
  max-width: 95vw;
  margin: 0 auto;
  padding: 6px 10px 6px 18px;
  background: rgba(14, 17, 24, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  box-shadow: 0 16px 48px -6px rgba(0, 0, 0, 0.85), 
              0 0 0 1px rgba(255, 255, 255, 0.05),
              inset 0 1px 1px rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--trans-medium);
}

.site-header.scrolled .header-inner-island {
  background: rgba(10, 12, 18, 0.96);
  border-color: rgba(230, 96, 5, 0.45);
  box-shadow: 0 20px 50px -8px rgba(0, 0, 0, 0.95), 
              0 0 24px rgba(230, 96, 5, 0.2),
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
  padding-top: 5px;
  padding-bottom: 5px;
}

/* Brand Logo */
.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FAF8F5;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--trans-fast);
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1C202C 0%, #0D0F14 100%);
  border: 1px solid rgba(230, 96, 5, 0.4);
  box-shadow: 0 0 14px rgba(230, 96, 5, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.brand-icon::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E66005;
  box-shadow: 0 0 8px #E66005;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.brand-text {
  font-weight: 700;
  color: #FFFFFF;
}

.brand-text span {
  color: var(--accent-amber);
  text-shadow: 0 0 12px rgba(230, 96, 5, 0.4);
}

/* Desktop Nav Menu Items */
.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 0.835rem;
  font-weight: 500;
  color: #A6ADBB;
  border-radius: var(--radius-pill);
  transition: all var(--trans-fast);
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover, 
.nav-item.is-open .nav-link, 
.nav-item.is-active .nav-link,
.nav-link.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--accent-amber);
}

.nav-caret {
  width: 9px;
  height: 9px;
  transition: transform var(--trans-fast);
  opacity: 0.6;
}

.nav-item:hover .nav-caret,
.nav-item.is-open .nav-caret {
  transform: rotate(180deg);
  opacity: 1;
  color: var(--accent-amber);
}

/* Nav Actions & Cmd+K Trigger */
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cmd-k-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #8E98A8;
  background: rgba(22, 26, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--trans-fast);
}

.cmd-k-trigger:hover {
  border-color: rgba(230, 96, 5, 0.5);
  color: #FFFFFF;
  background: rgba(230, 96, 5, 0.12);
  box-shadow: 0 0 16px rgba(230, 96, 5, 0.2);
}

.cmd-k-key {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  color: #FAF8F5;
}

/* --------------------------------------------------------------------------
   OBSIDIAN GLASS MEGA-MENUS
   -------------------------------------------------------------------------- */
.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(13, 16, 22, 0.96);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 72px -8px rgba(0, 0, 0, 0.95), 
              0 0 32px rgba(230, 96, 5, 0.15),
              inset 0 1px 0 rgba(230, 96, 5, 0.6);
  padding: var(--space-6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--trans-medium);
  z-index: 1001;
}

.nav-item:hover .mega-menu,
.nav-item.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-menu-workforce { width: 880px; }
.mega-menu-solutions { width: 700px; }
.mega-menu-platform { width: 640px; }
.mega-menu-company { width: 500px; }

.mega-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mega-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.mega-header {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8E98A8;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-link-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(22, 26, 36, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  transition: all var(--trans-fast);
}

.mega-link-card:hover {
  background: rgba(28, 33, 46, 0.95);
  border-color: rgba(230, 96, 5, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(230, 96, 5, 0.2);
}

.mega-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(14, 17, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-amber);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all var(--trans-fast);
}

.mega-link-card:hover .mega-icon-box {
  background: rgba(230, 96, 5, 0.18);
  border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(230, 96, 5, 0.4);
}

.mega-link-title {
  font-size: 0.885rem;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.mega-link-desc {
  font-size: 0.75rem;
  color: #8E98A8;
  line-height: 1.4;
}

.mega-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #8E98A8;
}

.mega-footer a {
  color: var(--accent-amber);
  font-weight: 600;
  text-decoration: none;
}

.mega-footer a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   MOBILE NAVIGATION TOGGLE & SLIDE-OUT DRAWER
   -------------------------------------------------------------------------- */
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
  z-index: 1002;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-toggle:hover, .mobile-toggle:active {
  background: rgba(230, 96, 5, 0.3);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

/* Fullscreen Backdrop Overlay */
.mobile-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 99998 !important;
  display: none;
}

.mobile-drawer-backdrop.is-open,
.mobile-drawer-backdrop.is-active,
body.drawer-open .mobile-drawer-backdrop {
  display: block !important;
}

/* Slide-Out Drawer Panel */
.mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 88% !important;
  max-width: 380px !important;
  height: 100vh !important;
  background: #0E1118 !important;
  border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: -16px 0 60px rgba(0, 0, 0, 0.98) !important;
  padding: 24px 20px 80px 24px !important;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  display: flex !important;
  flex-direction: column !important;
}

.mobile-drawer.is-open,
.mobile-drawer.is-active,
body.drawer-open .mobile-drawer {
  transform: translateX(0) !important;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.mobile-drawer-close:hover, .mobile-drawer-close:active {
  background: rgba(230, 96, 5, 0.3);
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.mobile-nav-group {
  margin-bottom: var(--space-6);
}

.mobile-nav-title {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-amber);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: #A6ADBB;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: all var(--trans-fast);
}

.mobile-nav-link:hover, .mobile-nav-link:active {
  color: #FFFFFF;
  padding-left: 6px;
}

/* Sticky Mobile Bottom CTA Bar */
.mobile-sticky-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 12, 17, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  z-index: 998;
  gap: 10px;
  align-items: center;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8);
}

/* Command Palette Modal */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--trans-medium);
}

.cmd-palette-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cmd-palette-modal {
  width: 100%;
  max-width: 640px;
  background: #12151E;
  border: 1px solid rgba(230, 96, 5, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.95), 0 0 32px rgba(230, 96, 5, 0.25);
  overflow: hidden;
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-palette-header svg {
  width: 20px;
  height: 20px;
  color: var(--accent-amber);
}

.cmd-palette-input {
  width: 100%;
  background: none;
  border: none;
  color: #FAF8F5;
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
}

.cmd-palette-input::placeholder {
  color: #717A8C;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #A6ADBB;
  font-size: 0.885rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--trans-fast);
}

.cmd-item:hover, .cmd-item.is-selected {
  background: rgba(230, 96, 5, 0.15);
  color: #FFFFFF;
}

.cmd-palette-footer {
  padding: 10px 20px;
  background: rgba(8, 10, 14, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #717A8C;
}

/* --------------------------------------------------------------------------
   RESPONSIVE NAVIGATION BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .site-header {
    top: 10px;
    padding: 0 10px;
  }
  .header-inner-island {
    width: 100%;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .main-nav { 
    display: none !important; 
  }
  .cmd-k-trigger { 
    display: none !important; 
  }
  .nav-actions .btn { 
    display: none !important; 
  }
  .mobile-toggle { 
    display: inline-flex !important; 
  }
  .mobile-sticky-cta-bar { 
    display: flex !important; 
  }
}
