/**
 * ProductComposer - Header Navigation Styles
 */

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  background: rgba(10, 13, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(10, 13, 20, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  user-select: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7952b3 0%, #c026d3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(121, 82, 179, 0.45);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.brand-logo:hover .brand-icon {
  transform: rotate(5deg) scale(1.05);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.brand-name {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: #c084fc;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.8rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.4rem 0.2rem;
  position: relative;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent-magenta));
  border-radius: 2px;
  transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.demo-link {
  color: var(--text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color var(--transition-fast);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
}

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

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.mobile-toggle svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Mobile Drawer Overlay */
.mobile-drawer {
  display: none;
}

@media (max-width: 991px) {
  .main-nav {
    display: none;
  }
  
  .header-actions .demo-link {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(13, 17, 26, 0.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass-hover);
    padding: 1.5rem 2rem 2.5rem;
    gap: 1.2rem;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0s linear 0.35s;
    z-index: 99;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }
  
  .mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  }
  
  .mobile-nav-link {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .mobile-drawer .btn {
    margin-top: 1rem;
    width: 100%;
  }
}

/* Narrow phones: keep logo and menu button inside the viewport */
.brand-logo {
  min-width: 0;
}

@media (max-width: 520px) {
  #headerCtaBtn {
    display: none; /* the drawer carries the same call to action */
  }

  .site-header .brand-tag {
    display: none;
  }

  .header-actions {
    gap: 0.5rem;
  }
}
