/* =========================================================
   JK Nexus — Deep Black AI Automation Landing Page
   ========================================================= */

* {
  scroll-behavior: smooth;
}

html, body {
  background: #000000;
  overflow-x: hidden;
}

::selection {
  background: rgba(79, 157, 255, 0.35);
  color: #fff;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #050505;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4f9dff, #a855f7);
  border-radius: 999px;
  border: 2px solid #050505;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6cb0ff, #c084fc);
}
* {
  scrollbar-width: thin;
  scrollbar-color: #4f9dff #050505;
}

/* =========================================================
   Background: grid + glow blobs
   ========================================================= */
#grid-bg {
  position: fixed;
  inset: 0;
  z-index: -20;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
}

.bg-glow {
  position: fixed;
  z-index: -10;
  width: 42rem;
  height: 42rem;
  border-radius: 9999px;
  filter: blur(140px);
  opacity: 0.16;
  pointer-events: none;
}
.bg-glow-blue {
  top: -10rem;
  left: -10rem;
  background: #4f9dff;
}
.bg-glow-purple {
  top: 8rem;
  right: -14rem;
  background: #a855f7;
}

/* =========================================================
   Header / Nav
   ========================================================= */
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  transition: color 0.25s ease, background 0.25s ease;
}
.nav-link i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  transition: color 0.25s ease;
}
.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.nav-link:hover i,
.nav-link.active i {
  color: #4f9dff;
}

.nav-link-mobile {
  text-align: left;
  padding: 12px 8px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-link-mobile:hover { color: #fff; }

#mobile-nav.flex { display: flex; }

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary-neon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  background: linear-gradient(90deg, #4f9dff, #a855f7);
  box-shadow: 0 0 25px rgba(79,157,255,0.35), 0 0 50px rgba(168,85,247,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-primary-neon:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 35px rgba(79,157,255,0.5), 0 0 70px rgba(168,85,247,0.25);
}

.btn-outline-neon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 27px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.16);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
  cursor: pointer;
}
.btn-outline-neon:hover {
  border-color: rgba(79,157,255,0.6);
  box-shadow: 0 0 20px rgba(79,157,255,0.25);
  background: rgba(79,157,255,0.06);
  transform: translateY(-2px);
}

/* =========================================================
   Hero
   ========================================================= */
.pulse-dot {
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,232,164,0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(16,232,164,0); }
}

.hero-content h1 {
  animation: fade-up 1s cubic-bezier(0.16,1,0.3,1) both;
}
.hero-content > *:nth-child(1) { animation: fade-up 0.8s cubic-bezier(0.16,1,0.3,1) both; }
.hero-content > *:nth-child(3) { animation: fade-up 1s cubic-bezier(0.16,1,0.3,1) 0.15s both; }
.hero-content > *:nth-child(4) { animation: fade-up 1s cubic-bezier(0.16,1,0.3,1) 0.3s both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

#network-field {
  z-index: 10;
}
.hero-content {
  z-index: 30;
}

#network-svg line {
  stroke-linecap: round;
}

.logo-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--node-color, #fff);
  font-size: 18px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  will-change: transform;
  opacity: 0;
}
.logo-node[data-ring="inner"] {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  font-size: 21px;
}
.logo-node.mounted {
  opacity: 1;
  transition: opacity 0.8s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.logo-node:hover {
  border-color: var(--node-color, #fff);
  box-shadow: 0 0 28px -2px var(--node-color, #fff);
  background: rgba(255,255,255,0.1);
  z-index: 5;
}
.logo-node .node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 4px;
}

/* pulsing ping ring behind each node */
.logo-node::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9999px;
  border: 1px solid var(--node-color, #fff);
  opacity: 0;
  pointer-events: none;
  animation: node-ping 4s ease-out infinite;
}
.logo-node:nth-child(3n)::before { animation-delay: 0.6s; }
.logo-node:nth-child(3n+1)::before { animation-delay: 1.4s; }
.logo-node:nth-child(4n)::before { animation-delay: 2.4s; }
@keyframes node-ping {
  0% { transform: scale(1); opacity: 0.35; }
  70% { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}

#network-svg .flow-line {
  stroke-dasharray: 3 7;
  animation: dash-flow 3.2s linear infinite;
}
@keyframes dash-flow {
  to { stroke-dashoffset: -40; }
}

@media (max-width: 767px) {
  .logo-node { display: none; }
  .logo-node[data-mobile="1"] {
    display: flex;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    font-size: 16px;
  }
  .logo-node[data-mobile="1"][data-ring="inner"] {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    font-size: 18px;
  }
  .logo-node .node-label { font-size: 9px; }
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  animation: bounce-y 2.2s ease-in-out infinite;
}
@keyframes bounce-y {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* =========================================================
   Showcase cards
   ========================================================= */
.showcase-card {
  position: relative;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.showcase-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 40px -12px var(--accent);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-bar .dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  opacity: 0.85;
}

.card-body {
  padding: 28px 26px 26px;
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 18px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}
.feature-list li i {
  color: var(--accent);
  margin-top: 2px;
  font-size: 12px;
  flex-shrink: 0;
}

.terminal-log {
  background: #000;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
}
.blink-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.25s ease;
}
.card-cta:hover {
  gap: 12px;
}

/* =========================================================
   Pricing
   ========================================================= */
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008));
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.18);
}
.pricing-card-highlight {
  border-color: rgba(168,85,247,0.5);
  background: linear-gradient(180deg, rgba(168,85,247,0.08), rgba(79,157,255,0.02));
  box-shadow: 0 0 50px -18px rgba(168,85,247,0.5);
}
.pricing-card-highlight:hover {
  border-color: rgba(168,85,247,0.8);
  box-shadow: 0 0 60px -14px rgba(168,85,247,0.6);
}
.pricing-badge {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #000;
  background: linear-gradient(90deg, #4f9dff, #a855f7);
}
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  flex: 1;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
}
.pricing-features li i {
  color: #10e8a4;
  margin-top: 3px;
  font-size: 11px;
  flex-shrink: 0;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.faq-item.open {
  border-color: rgba(79,157,255,0.35);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}
.faq-question i {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-question i {
  transform: rotate(180deg);
  color: #4f9dff;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-answer p {
  padding: 0 20px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.showcase-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.showcase-card.reveal:nth-child(3) { transition-delay: 0.2s; }
.pricing-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.pricing-card.reveal:nth-child(3) { transition-delay: 0.2s; }

/* =========================================================
   Auth Modal
   ========================================================= */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-modal.hidden { display: none; }

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
}

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(10,10,12,0.75);
  backdrop-filter: blur(24px);
  box-shadow: 0 0 60px -10px rgba(79,157,255,0.25), 0 20px 60px rgba(0,0,0,0.6);
  padding: 32px 28px 28px;
  animation: modal-in 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.auth-close:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  transform: rotate(90deg);
}

.auth-tabs {
  position: relative;
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 9px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  border-radius: 9px;
  transition: color 0.3s ease;
}
.auth-tab.active { color: #000; }
.auth-tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 9px;
  background: linear-gradient(90deg, #4f9dff, #a855f7);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  z-index: 1;
}
.auth-tabs[data-active="signup"] .auth-tab-indicator {
  transform: translateX(100%);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.auth-field span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}
.auth-field input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.auth-field input::placeholder { color: rgba(255,255,255,0.25); }
.auth-field input:focus {
  border-color: #4f9dff;
  box-shadow: 0 0 0 3px rgba(79,157,255,0.15);
}

.auth-switch {
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
}
.auth-switch a {
  color: #4f9dff;
  font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-message {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  text-align: center;
  background: rgba(16,232,164,0.08);
  border: 1px solid rgba(16,232,164,0.25);
  color: #10e8a4;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
