/* ── Shared Nav + Footer Styles ────────────────────────────────────────────── */

/* ── NAV ─────────────────────────────────────────────────────────────────── */

.sl-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.sl-nav--scrolled {
  background: rgba(0, 0, 0, 0.98);
  border-bottom-color: rgba(0, 255, 136, 0.12);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

/* Brand */
.sl-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.sl-nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sl-mandelbrot {
  flex-shrink: 0;
  vertical-align: middle;
  animation: sl-icon-pulse 777ms ease-in-out infinite;
}

.sl-mandelbrot-img {
  flex-shrink: 0;
  border-radius: 5px;
  vertical-align: middle;
  display: block;
  mix-blend-mode: screen;
}

.sl-nav-logo-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #00ff88);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
  animation: sl-pulse 777ms ease-in-out infinite;
  vertical-align: middle;
  margin: 0 3px;
  flex-shrink: 0;
}

@keyframes sl-pulse {
  0%, 100% { opacity: 0.55; box-shadow: 0 0 6px rgba(0, 255, 136, 0.5); }
  50% { opacity: 1; box-shadow: 0 0 14px rgba(0, 255, 136, 0.9); }
}

@keyframes sl-icon-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(0, 255, 136, 0.4)); opacity: 0.7; }
  50% { filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.9)); opacity: 1; }
}

/* Center nav group */
.sl-nav-center {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
  list-style: none;
}

.sl-nav-center > li {
  position: relative;
}

.sl-nav-center > li > a,
.sl-nav-center > li > button {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.70);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.sl-nav-center > li > a:hover,
.sl-nav-center > li > button:hover {
  color: var(--accent, #00ff88);
  background: rgba(0, 255, 136, 0.05);
}

.sl-nav-center > li > a.sl-active,
.sl-nav-center > li > a.active {
  color: var(--accent, #00ff88);
}

.sl-nav-chevron {
  font-size: 0.65rem;
  opacity: 0.6;
  transition: transform 0.15s;
}

/* Dropdown */
.sl-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  min-width: 180px;
  padding: 0.4rem;
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 300;
}

.sl-nav-center > li.sl-open .sl-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.sl-nav-center > li.sl-open .sl-nav-chevron {
  transform: rotate(180deg);
}

.sl-dropdown a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}

.sl-dropdown a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.sl-dropdown a.sl-active,
.sl-dropdown a.active {
  color: var(--accent, #00ff88);
}

/* Right rail */
.sl-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.sl-open-science {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent, #00ff88);
  text-decoration: none;
  border: 1px solid rgba(0, 255, 136, 0.35);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.sl-open-science:hover { opacity: 1; text-decoration: none; }

.sl-zeqond {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: rgba(0, 255, 136, 0.45);
  white-space: nowrap;
}

.sl-zeqond span { color: rgba(0, 255, 136, 0.65); }

.sl-nav-cta {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  border: 1px solid #00ff88;
  color: #000;
  background: #00ff88;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sl-nav-cta:hover {
  background: #00ff88;
  color: #000;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.35);
  text-decoration: none;
}

/* Hamburger */
.sl-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.sl-hamburger span {
  display: block;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.sl-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sl-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sl-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav */
.sl-mobile-menu {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 15, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 199;
  padding: 1rem 1.5rem 1.5rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* Use --real-vh (set by JS) for correct height on Android with dynamic address bar */
  max-height: calc(var(--real-vh, 1vh) * 100 - 56px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sl-mobile-menu.sl-open {
  display: block;
}

.sl-mobile-section {
  margin-bottom: 1.25rem;
}

.sl-mobile-section-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 255, 136, 0.45);
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sl-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sl-mobile-links a {
  display: block;
  padding: 0.6rem 0.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color 0.12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sl-mobile-links a:hover,
.sl-mobile-links a.sl-active,
.sl-mobile-links a.active {
  color: var(--accent, #00ff88);
}

.sl-mobile-bottom {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .sl-nav-center {
    display: none;
  }
  .sl-hamburger {
    display: flex !important;
    flex-shrink: 0;
    order: 99;
  }
  .sl-zeqond {
    display: none;
  }
  /* Hide CTA from top bar on mobile — it lives in the mobile menu */
  .sl-nav .sl-nav-right .sl-nav-cta,
  nav.sl-nav a.sl-nav-cta {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .sl-nav {
    padding: 0 1rem;
  }
  .sl-open-science {
    display: none;
  }
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */

.sl-footer {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 1.5rem 0;
  margin-top: 0;
}

.sl-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
}

/* Brand block */
.sl-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sl-footer-logo {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.92rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 0.25rem;
  gap: 6px;
}

.sl-footer-logo-sep {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #00ff88);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
  animation: sl-pulse 777ms ease-in-out infinite;
  vertical-align: middle;
  margin: 0 3px;
}

.sl-footer-tagline {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}

.sl-footer-zeqond {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: rgba(0, 255, 136, 0.4);
  margin-top: 0.5rem;
}

.sl-footer-zeqond span { color: rgba(0, 255, 136, 0.6); }

/* Link columns */
.sl-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.sl-footer-col h4 {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.75rem;
}

.sl-footer-col a {
  display: block;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.15s;
  line-height: 1.5;
}

.sl-footer-col a:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

/* Copyright bar */
.sl-footer-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sl-footer-bar p {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
}

.sl-footer-legal {
  display: flex;
  gap: 1.25rem;
}

.sl-footer-legal a {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: color 0.15s;
}
.sl-footer-legal a:hover { color: rgba(255, 255, 255, 0.55); }

/* Footer responsive */
@media (max-width: 900px) {
  .sl-footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .sl-footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .sl-footer-cols {
    grid-template-columns: 1fr 1fr;
  }
  .sl-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}


/* ── Qore tf-header / tf-footer structural aliases ──────────────────────── */
/* These class aliases satisfy the Qore ThemeForest structural requirement   */
/* while preserving existing Zeq sl-* functionality.                         */

.tf-header { /* inherits all sl-nav styles */ }

.tf-logo { /* inherits all sl-nav-brand styles */ }

.tf-nav { /* inherits all sl-nav-center styles */ }

.tf-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.tf-btn--primary {
  background: var(--accent, #00ff88);
  color: #050a0f;
  border: 1px solid var(--accent, #00ff88);
}

.tf-btn--primary:hover {
  background: transparent;
  color: var(--accent, #00ff88);
}

.tf-footer { /* inherits all sl-footer styles */ }

.tf-footer-inner { /* inherits all sl-footer-inner styles */ }

/* ── Qore nav br-line (below header separator) ──────────────────────────── */
.qz-nav-br-line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 136, 0.18) 30%, rgba(0, 255, 136, 0.12) 70%, transparent 100%);
  width: 100%;
  position: relative;
  z-index: 199;
}

/* ── Grid-mesh stacking fix ──────────────────────────────────────────────── */
/* body::before grid is z-index:-1; all page content must form stacking      */
/* contexts so they reliably render above it on every page.                  */

#wrapper,
section,
.section-hero,
.section-problem,
.section-discovery,
.section-architecture,
.section-physics-demo,
.section-solar-demo,
.section-use-cases,
.section-pricing,
.section-testimonials,
.section-cta,
.qh-section,
.qh-hero,
.qh-ticker,
.qh-stats-bar,
.sl-footer,
.zeq-inner-page-wrap,
.zeq-inner-content {
  position: relative;
  z-index: 0;
}

/* Cards and content blocks */
.position-relative.has-hafl_plus,
.tf-grid-layout > *,
.inv-metric-card,
.paper-card,
.build-track-card,
.vision-phase-card,
.skill-card,
.demo-card,
.sec-control-card,
.analogy-card,
.cs-service-card,
.cs-why-item,
.proto-card,
.disc-card,
.fw-layer,
.plan-card,
.testimonial-card,
.qh-composer-tab,
.agent-arch-card,
.agent-use-card {
  position: relative;
  z-index: 0;
}

/* Physics demo — canvas wrap and pulse badge */
#physics-canvas-wrap,
#solar-physics-canvas {
  position: relative;
  z-index: 0;
}

/* The fixed code-viewer panel stays well above the grid */
.sp-code-viewer {
  z-index: 999;
}
