/*
 * Qadra Header — Premium dark glass aesthetic
 * With Dribbble-level staggered entrance animations on mobile overlay
 */



:root {
  --qh-void: #050311;
  --qh-surface: rgba(8, 6, 28, 0.82);
  --qh-glass: rgba(255, 255, 255, 0.04);
  --qh-accent: #4961ff;
  --qh-accent-glow: rgba(73, 97, 255, 0.25);
  --qh-accent-soft: rgba(73, 97, 255, 0.08);
  --qh-white: #f0f0f5;
  --qh-muted: rgba(240, 240, 245, 0.5);
  --qh-dim: rgba(240, 240, 245, 0.25);
  --qh-rule: rgba(255, 255, 255, 0.07);
  --qh-font-display: 'Qadra Sans', system-ui, sans-serif;
  --qh-font-body: 'Qadra Sans', system-ui, sans-serif;
  --qh-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== RESET ===== */
.qadra-header, .qadra-header *, .qadra-header *::before, .qadra-header *::after,
.qh-mobile-overlay, .qh-mobile-overlay *, .qh-mobile-overlay *::before, .qh-mobile-overlay *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.qadra-header a, .qh-mobile-overlay a { text-decoration: none; color: inherit; }
.qadra-header ul, .qadra-header li, .qh-mobile-overlay ul, .qh-mobile-overlay li { list-style: none; }
.qadra-header button, .qh-mobile-overlay button {
  font-family: inherit; background: none; border: none; cursor: pointer; color: inherit;
}
.qadra-header img, .qh-mobile-overlay img { display: block; max-width: 100%; height: auto; }

/* ===== HEADER SHELL ===== */
.qadra-header {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  width: 100vw !important; max-width: 100vw !important;
  z-index: 2147483646 !important;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  font-family: var(--qh-font-body);
  color: var(--qh-white);
  display: block !important;
  transition: background 0.4s var(--qh-ease),
              backdrop-filter 0.4s var(--qh-ease),
              -webkit-backdrop-filter 0.4s var(--qh-ease),
              border-color 0.4s var(--qh-ease);
}

/* Scrolled state — JS adds this class */
.qadra-header.qh-scrolled {
  position: fixed !important;
  background: var(--qh-surface);
  backdrop-filter: saturate(140%) blur(20px);
  -webkit-backdrop-filter: saturate(140%) blur(20px);
  border-bottom-color: var(--qh-rule);
}

/* ===== TOPBAR — scrolls away, not part of sticky ===== */
.qh-topbar { border-bottom: 1px solid var(--qh-rule); }
.qh-scrolled .qh-topbar { display: none; }
.qh-topbar-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1440px; margin: 0 auto; padding: 7px 48px;
}
.qh-topbar-left { display: flex; align-items: center; }
.qh-topbar-text, .qh-topbar-text a {
  font-size: 11px; letter-spacing: 0.04em; color: var(--qh-muted);
  font-family: var(--qh-font-body); transition: none;
}
.qh-topbar-right { display: flex; align-items: center; gap: 28px; }
.qh-topbar-contact { font-size: 11px; letter-spacing: 0.02em; color: var(--qh-muted); }
.qh-topbar-contact a { color: var(--qh-muted); transition: color 0.2s; }
.qh-topbar-contact a:hover { color: var(--qh-accent); }

/* ===== MAIN BAR ===== */
.qh-main-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1440px; margin: 0 auto; padding: 18px 48px; gap: 32px;
}

/* ===== LOGO ===== */
.qh-logo-block { display: flex; align-items: center; flex-shrink: 0; }
.qh-logo { display: inline-flex; transition: opacity 0.3s; }
.qh-logo:hover { opacity: 0.8; }
.qh-logo img { height: 38px; width: auto; }

/* ===== NAV ===== */
.qh-nav-block { display: flex; align-items: center; justify-content: center; flex: 1; }
.qh-nav { display: flex; align-items: center; }
.qh-nav-items { display: flex; align-items: center; gap: 32px; }
.qh-nav-items .menu-item a, .qh-dropdown .brx-submenu-toggle span {
  font-family: var(--qh-font-display);
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--qh-muted); transition: color 0.25s var(--qh-ease); cursor: pointer;
}
.qh-nav-items .menu-item a:hover, .qh-dropdown:hover .brx-submenu-toggle span { color: var(--qh-white); }

/* ===== DROPDOWN ===== */
.qh-dropdown { position: relative; }
.qh-dropdown .brx-submenu-toggle { display: flex; align-items: center; gap: 5px; }
.qh-dropdown .brx-submenu-toggle button {
  display: inline-flex; align-items: center; padding: 0; color: var(--qh-dim);
  transition: color 0.25s, transform 0.3s var(--qh-ease);
}
.qh-dropdown:hover .brx-submenu-toggle button { color: var(--qh-white); transform: rotate(180deg); }
.qh-dropdown .brx-submenu-toggle button svg { width: 10px; height: 10px; }

/* ===== MEGAMENU ===== */
/* Invisible bridge so cursor can travel from nav item to dropdown */
.qh-dropdown::after {
  content: '';
  position: absolute; top: 100%; left: -200px; right: -200px;
  height: 40px;
  display: none;
}
.qh-dropdown:hover::after { display: block; }

.qh-dropdown-content {
  display: none;
  position: fixed;
  top: auto; left: 50% !important; right: auto !important;
  transform: translateX(-50%) translateY(10px);
  width: 92vw; max-width: 1100px;
  padding: 0;
  background: var(--qh-void);
  border: 1px solid rgba(73, 97, 255, 0.1);
  border-radius: 20px;
  z-index: 2147483645 !important;
  flex-wrap: nowrap; gap: 0;
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(73, 97, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.35s var(--qh-ease), transform 0.35s var(--qh-ease);
  overflow: hidden;
}
.qh-dropdown:hover .qh-dropdown-content,
.qh-dropdown:focus-within .qh-dropdown-content {
  display: flex; opacity: 1; transform: translateX(-50%) translateY(0);
}
/* Intro is the first "column" in the 4-column row */
.qh-dropdown-intro {
  flex: 0 0 240px; padding: 28px 24px;
  border-right: 1px solid var(--qh-rule);
  background: rgba(73, 97, 255, 0.03);
  display: flex; flex-direction: column; justify-content: center;
}
.qh-dropdown-heading {
  font-family: var(--qh-font-display); font-size: 17px; font-weight: 700;
  color: var(--qh-white); margin-bottom: 8px;
  background: linear-gradient(135deg, var(--qh-white) 0%, var(--qh-accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.qh-dropdown-desc { font-size: 13px; color: var(--qh-muted); line-height: 1.6; text-transform: none; }
.qh-menu-block {
  display: flex; flex-direction: column; gap: 0; flex: 1; min-width: 160px;
  padding: 16px 8px;
}
.qh-menu-link {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 16px;
  border-radius: 12px; position: relative;
  transition: background 0.25s var(--qh-ease), transform 0.25s var(--qh-ease);
}
.qh-menu-link:hover {
  background: var(--qh-accent-soft);
  transform: translateX(4px);
}
.qh-menu-service {
  font-family: var(--qh-font-display); font-size: 12px; letter-spacing: 0.06em;
  color: var(--qh-white); font-weight: 600; text-transform: uppercase;
  transition: color 0.2s;
}
.qh-menu-link:hover .qh-menu-service { color: var(--qh-accent); }
.qh-menu-subdesc {
  font-size: 11px; color: var(--qh-dim); text-transform: none; line-height: 1.45;
  transition: color 0.2s;
}
.qh-menu-link:hover .qh-menu-subdesc { color: var(--qh-muted); }

/* ===== HAMBURGER ===== */
.qh-hamburger {
  display: none; padding: 6px; width: 44px; height: 44px;
  align-items: center; justify-content: center; border-radius: 10px;
  transition: background 0.2s;
}
.qh-hamburger:hover { background: var(--qh-glass); }
.qh-hamburger svg { width: 22px; height: 22px; }

/* ===== CTA ===== */
.qh-cta-block { display: flex; align-items: center; flex-shrink: 0; }
.qh-cta-btn {
  font-family: var(--qh-font-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--qh-white); border: 1.5px solid rgba(73,97,255,0.5); border-radius: 100px;
  background: transparent; padding: 11px 26px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--qh-ease); white-space: nowrap;
  position: relative; overflow: hidden;
}
.qh-cta-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--qh-accent); border-radius: inherit;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--qh-ease); z-index: -1;
}
.qh-cta-btn:hover { border-color: var(--qh-accent); color: #fff; }
.qh-cta-btn:hover::before { transform: scaleX(1); transform-origin: left; }

/* ===== SPACER — hidden by default, shown when header becomes fixed ===== */
.qh-spacer { display: none; height: 110px; }
.qh-spacer.qh-spacer-active { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1199px) {
  .qh-topbar { display: none; }
  .qh-main-container { padding: 14px 32px; }
  .qh-nav-items { gap: 22px; }
  .qh-nav-items .menu-item a, .qh-dropdown .brx-submenu-toggle span { font-size: 12px; }
  .qh-spacer.qh-spacer-active { height: 72px; }
}
@media (max-width: 991px) {
  .qh-main-container { padding: 12px 24px; }
  .qh-nav-items { gap: 14px; }
  .qh-cta-btn { padding: 9px 18px; font-size: 11px; }
}
@media (max-width: 767px) {
  .qh-nav { display: none !important; }
  .qh-hamburger { display: flex !important; }
  .qh-cta-block { display: none !important; }
  .qh-main-container { padding: 12px 20px; }
  .qh-nav-block { justify-content: flex-end !important; flex: 0 0 auto !important; }
  .qh-spacer.qh-spacer-active { height: 66px; }
  .qh-logo img { height: 32px; }
}

/* ============================================================
   MOBILE OVERLAY — Staggered cinematic entrance
   ============================================================ */

.qh-mobile-overlay {
  position: fixed !important; inset: 0 !important;
  z-index: 2147483647 !important;
  background: var(--qh-void);
  display: flex; flex-direction: column;
  padding: 0; overflow-y: auto; overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--qh-ease), visibility 0s 0.4s;
  font-family: var(--qh-font-body);
  color: var(--qh-white);
}

.qh-mobile-overlay.qh-mobile-open {
  opacity: 1; visibility: visible;
  transition: opacity 0.4s var(--qh-ease), visibility 0s 0s;
}

/* --- Ambient glow that breathes --- */
.qh-mobile-overlay::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, var(--qh-accent-glow) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
  opacity: 0; filter: blur(40px);
  transition: opacity 0.8s 0.2s var(--qh-ease);
}
.qh-mobile-overlay.qh-mobile-open::before { opacity: 0.7; }

/* Noise texture for depth */
.qh-mobile-overlay::after {
  content: '';
  position: fixed; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
  opacity: 0;
  transition: opacity 0.6s 0.3s;
}
.qh-mobile-overlay.qh-mobile-open::after { opacity: 1; }

/* --- Header row: logo + close --- */
.qh-mobile-overlay-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--qh-rule);
  position: relative; z-index: 1;
  opacity: 0; transform: translateY(-10px);
  transition: opacity 0.4s 0.1s var(--qh-ease), transform 0.4s 0.1s var(--qh-ease);
}
.qh-mobile-open .qh-mobile-overlay-header {
  opacity: 1; transform: translateY(0);
}

.qh-mobile-close {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--qh-muted);
  transition: background 0.2s, color 0.2s, transform 0.3s var(--qh-ease);
}
.qh-mobile-close:hover { background: var(--qh-glass); color: var(--qh-white); transform: rotate(90deg); }
.qh-mobile-close svg { width: 20px; height: 20px; }

/* --- Nav container --- */
.qh-mobile-nav {
  display: flex; flex-direction: column;
  padding: 8px 24px; flex: 1;
  position: relative; z-index: 1;
}

/* --- Each nav item: staggered entrance via CSS custom property --- */
.qh-mobile-link,
.qh-mobile-dropdown {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.5s var(--qh-ease), transform 0.5s var(--qh-ease);
  transition-delay: var(--qh-stagger, 0s);
}
.qh-mobile-open .qh-mobile-link,
.qh-mobile-open .qh-mobile-dropdown {
  opacity: 1; transform: translateX(0);
}

.qh-mobile-link {
  display: flex; align-items: center;
  padding: 20px 0;
  font-family: var(--qh-font-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--qh-white);
  border-bottom: 1px solid var(--qh-rule);
  position: relative;
  transition: color 0.2s, opacity 0.5s var(--qh-ease), transform 0.5s var(--qh-ease);
  transition-delay: var(--qh-stagger, 0s);
}

/* Accent line on hover */
.qh-mobile-link::after {
  content: '';
  position: absolute; left: 0; bottom: -1px;
  width: 0; height: 2px;
  background: var(--qh-accent);
  transition: width 0.4s var(--qh-ease);
}
.qh-mobile-link:hover { color: var(--qh-accent); }
.qh-mobile-link:hover::after { width: 100%; }

/* --- Mobile dropdown --- */
.qh-mobile-dropdown {
  border-bottom: 1px solid var(--qh-rule);
  position: relative;
}
.qh-mobile-dropdown-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 20px 0;
  font-family: var(--qh-font-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--qh-white);
  transition: color 0.2s;
}
.qh-mobile-dropdown-toggle:hover { color: var(--qh-accent); }
.qh-mobile-dropdown-toggle svg {
  color: var(--qh-dim);
  transition: transform 0.4s var(--qh-ease), color 0.2s;
}
.qh-mobile-dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg); color: var(--qh-accent);
}

.qh-mobile-submenu {
  display: flex; flex-direction: column;
  padding: 0; gap: 2px;
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s var(--qh-ease), padding 0.4s var(--qh-ease);
}
.qh-mobile-submenu.qh-sub-open {
  max-height: 600px;
  padding: 4px 0 20px 0;
}
.qh-mobile-submenu .qh-mobile-sublink {
  opacity: 0; transform: translateX(16px);
  transition: opacity 0.35s var(--qh-ease), transform 0.35s var(--qh-ease);
}
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink {
  opacity: 1; transform: translateX(0);
}
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(1) { transition-delay: 0.06s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(2) { transition-delay: 0.10s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(3) { transition-delay: 0.14s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(4) { transition-delay: 0.18s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(5) { transition-delay: 0.22s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(6) { transition-delay: 0.26s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(7) { transition-delay: 0.30s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(8) { transition-delay: 0.34s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(9) { transition-delay: 0.38s; }
.qh-mobile-submenu.qh-sub-open .qh-mobile-sublink:nth-child(10) { transition-delay: 0.42s; }

.qh-mobile-sublink {
  display: block; padding: 12px 16px;
  border-radius: 10px;
  font-family: var(--qh-font-display);
  font-size: 15px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--qh-muted);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--qh-ease);
}
.qh-mobile-sublink:hover {
  background: var(--qh-accent-soft); color: var(--qh-accent);
  transform: translateX(6px);
}

/* --- CTA + contact: staggered last --- */
.qh-mobile-cta {
  padding: 24px 24px 0;
  position: relative; z-index: 1;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s 0.55s var(--qh-ease), transform 0.5s 0.55s var(--qh-ease);
}
.qh-mobile-open .qh-mobile-cta { opacity: 1; transform: translateY(0); }

.qh-mobile-cta .qh-cta-btn {
  width: 100%; justify-content: center; display: flex;
  padding: 18px; font-size: 14px;
  background: var(--qh-accent); border-color: var(--qh-accent);
  color: #fff; font-weight: 600;
}
.qh-mobile-cta .qh-cta-btn:hover { opacity: 0.9; }
.qh-mobile-cta .qh-cta-btn::before { display: none; }

.qh-mobile-contact {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 24px 36px;
  position: relative; z-index: 1;
  opacity: 0;
  transition: opacity 0.5s 0.65s var(--qh-ease);
}
.qh-mobile-open .qh-mobile-contact { opacity: 1; }

.qh-mobile-contact a {
  font-size: 13px; color: var(--qh-dim); letter-spacing: 0.02em;
  transition: color 0.2s;
}
.qh-mobile-contact a:hover { color: var(--qh-accent); }

/* qadra-mobile-menu-label-v1 */
.qadra-header .qh-hamburger-label { display: none !important; }
@media (max-width: 767px) {
  .qadra-header .qh-hamburger {
    width: auto !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 8px 12px 8px 14px !important;
    gap: 9px !important;
    border: 1px solid rgba(240, 240, 245, .12) !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .025) !important;
  }
  .qadra-header .qh-hamburger-label {
    display: inline-block !important;
    color: rgba(240, 240, 245, .78) !important;
    font-family: 'Qadra Sans', system-ui, sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }
  .qadra-header .qh-hamburger svg {
    width: 21px !important;
    height: 21px !important;
    flex: 0 0 auto !important;
  }
}
@media (max-width: 360px) {
  .qadra-header .qh-hamburger { gap: 7px !important; padding: 8px 10px !important; }
  .qadra-header .qh-hamburger-label { font-size: 10px !important; }
}

