/* ============================================
   xaviera.tech — Prime / Next Level Layer
   ============================================ */

/* ---- Custom cursor ---- */
@media (min-width: 1025px) and (pointer: fine) {
  .dev-theme.prime-cursor,
  .dev-theme.prime-cursor * {
    cursor: none !important;
  }

  .prime-cursor-ring {
    position: fixed;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(26, 143, 224, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10005;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    mix-blend-mode: difference;
  }

  .prime-cursor-ring.hover {
    width: 48px;
    height: 48px;
    border-color: var(--code-green, #3dd68c);
  }

  .prime-cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--brand-light, #4db3f5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10006;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--brand-light);
  }
}

/* ---- Hero tagline typewriter ---- */
.dev-hero-content h1.prime-typing #hero-tagline-text::after {
  content: '|';
  color: var(--brand-light);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
}

.dev-hero-content h1.prime-done #hero-tagline-text::after {
  display: none;
}

.dev-hero-content h1.prime-typing .highlight {
  opacity: 0;
  animation: none;
}

/* Shimmer on highlight */
.dev-hero-content h1 .highlight {
  background-size: 200% auto;
  animation: taglineShimmer 4s linear infinite;
}

@keyframes taglineShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---- Electric buttons ---- */
.dev-theme .btn-glow,
.dev-theme .btn-primary:not(.nav-cta) {
  position: relative;
  isolation: isolate;
}

.dev-theme .btn-glow::after,
.dev-theme .btn-primary:not(.nav-cta)::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #6366f1, var(--code-green), var(--brand));
  background-size: 300% 100%;
  z-index: -1;
  animation: electricBorder 3s linear infinite;
  opacity: 0.6;
  filter: blur(4px);
}

@keyframes electricBorder {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* ---- AI Copilot panel ---- */
.prime-copilot {
  position: fixed;
  top: var(--header-height, 88px);
  right: 0;
  bottom: var(--statusbar-h, 26px);
  width: min(380px, 92vw);
  z-index: 9995;
  background: #020406;
  border-left: 1px solid var(--ide-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.prime-copilot.open {
  transform: translateX(0);
}

.prime-copilot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #030508;
  border-bottom: 1px solid var(--ide-border);
}

.prime-copilot-head h3 {
  font-family: var(--mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.prime-copilot-head .ai-pulse {
  width: 8px; height: 8px;
  background: var(--code-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--code-green);
  animation: pulse 1.5s infinite;
}

.prime-copilot-close {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.prime-copilot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prime-copilot-msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.6;
}

.prime-copilot-msg.bot {
  align-self: flex-start;
  background: var(--ide-bg);
  border: 1px solid var(--ide-border);
  color: var(--text-secondary);
  font-family: var(--mono, monospace);
  font-size: 0.75rem;
}

.prime-copilot-msg.user {
  align-self: flex-end;
  background: rgba(26, 143, 224, 0.15);
  border: 1px solid rgba(26, 143, 224, 0.25);
  color: var(--text-primary);
}

.prime-copilot-msg.bot .msg-label {
  font-size: 0.5625rem;
  color: var(--brand-light);
  margin-bottom: 6px;
  display: block;
}

.prime-copilot-input-wrap {
  padding: 12px;
  border-top: 1px solid var(--ide-border);
  background: #030508;
}

.prime-copilot-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ide-bg);
  border: 1px solid var(--ide-border);
  border-radius: 8px;
}

.prime-copilot-input-row:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 143, 224, 0.1);
}

.prime-copilot-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--mono, monospace);
  font-size: 0.75rem;
  color: var(--text-primary);
}

.prime-copilot-send {
  background: var(--brand);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.prime-copilot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.prime-copilot-suggestions button {
  font-family: var(--mono, monospace);
  font-size: 0.5625rem;
  padding: 4px 8px;
  background: rgba(26, 143, 224, 0.08);
  border: 1px solid rgba(26, 143, 224, 0.15);
  border-radius: 4px;
  color: var(--brand-light);
  cursor: pointer;
}

.prime-copilot-suggestions button:hover {
  background: rgba(26, 143, 224, 0.15);
}

/* ---- Git graph ---- */
.prime-git-graph {
  margin-top: 48px;
  padding: 24px;
  background: var(--ide-bg);
  border: 1px solid var(--ide-border);
  border-radius: 12px;
  overflow: hidden;
}

.prime-git-graph-head {
  font-family: var(--mono, monospace);
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prime-git-graph-head::before {
  content: '⎇';
  color: var(--code-green);
}

.prime-git-graph svg {
  width: 100%;
  height: auto;
  display: block;
}

.prime-git-graph .graph-line {
  stroke: var(--brand);
  stroke-width: 2;
  fill: none;
  opacity: 0.4;
}

.prime-git-graph .graph-commit {
  fill: var(--ide-bg);
  stroke: var(--brand-light);
  stroke-width: 2;
}

.prime-git-graph .graph-commit.active {
  fill: var(--brand);
  filter: drop-shadow(0 0 6px var(--brand-glow));
}

.prime-git-graph .graph-label {
  font-family: var(--mono, monospace);
  font-size: 9px;
  fill: var(--text-muted);
}

/* ---- Scroll reveal prime ---- */
.prime-reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}

.prime-reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ---- Click particles ---- */
.prime-particle {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10004;
  background: var(--brand-light);
}

/* ---- FAB copilot ---- */
.dev-fab[data-action="copilot"] {
  font-size: 0.875rem;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .prime-cursor-ring,
  .prime-cursor-dot { display: none !important; }
  .dev-theme.prime-cursor,
  .dev-theme.prime-cursor * { cursor: auto !important; }
  .prime-reveal { opacity: 1; transform: none; filter: none; }
  .dev-hero-content h1 .highlight { animation: none; }
  .dev-theme .btn-glow::after { animation: none; }
}

@media (max-width: 1024px) {
  .prime-copilot { top: 56px; }
}
