/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRIMAL — Design System
   Portado de primal-tracking/app/globals.css
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
  /* Tracking tokens */
  --bg:           #0a0a10;
  --bg-soft:      #111118;
  --purple:       #6b2fa0;
  --purple-light: #8b4fcf;
  --yellow:       #f2c529;

  /* Tokens legados (compatibilidade com estilos de página) */
  --primary:        #6B2FA0;
  --primary-dark:   #4A1D73;
  --primary-light:  #8B4FCF;
  --accent:         #F2C529;
  --accent-dark:    #D4A843;
  --bg-primary:     #111118;
  --bg-secondary:   #1C1C24;
  --bg-tertiary:    #26263A;
  --bg-hover:       #2E2E48;
  --text-primary:   #F5F5F5;
  --text-secondary: #B8B8CC;
  --text-muted:     #8888AA;
  --border:         #2E2E48;
  --shadow-card:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-elevated:0 8px 48px rgba(0,0,0,0.6);
  --glow-purple:    0 0 40px rgba(107,47,160,0.25);
  --font-display:  'Montserrat', sans-serif;
  --font-body:     'Inter', sans-serif;
  --transition:    200ms ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
a { text-decoration: none; color: inherit; }

html, body {
  background: var(--bg);
  color: #ededf2;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* ── Fundo global: grid roxa + glows ambiente ───────────────────── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(139, 79, 207, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 79, 207, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(50% 40% at 15% 0%, rgba(107, 47, 160, 0.28), transparent 70%),
    radial-gradient(40% 32% at 88% 8%, rgba(242, 197, 41, 0.10), transparent 70%),
    radial-gradient(60% 50% at 50% 110%, rgba(139, 79, 207, 0.20), transparent 70%);
  pointer-events: none;
}

/* ── Texto ──────────────────────────────────────────────────────── */
.neon-gradient-text {
  background: linear-gradient(100deg, #a673e0 0%, #8b4fcf 35%, #f2c529 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
}

.neon-text {
  color: #b388e8;
  text-shadow: 0 0 8px rgba(139,79,207,0.7), 0 0 22px rgba(139,79,207,0.4);
}

.gold-text {
  color: #f7d65a;
  text-shadow: 0 0 8px rgba(242,197,41,0.6), 0 0 20px rgba(242,197,41,0.35);
}

/* ── Cards de vidro ─────────────────────────────────────────────── */
.glass {
  background: linear-gradient(160deg, rgba(28,28,36,0.85), rgba(17,17,24,0.65));
  border: 1px solid rgba(139,79,207,0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-hover {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.glass-hover:hover {
  border-color: rgba(139,79,207,0.5);
  box-shadow: 0 0 0 1px rgba(139,79,207,0.25), 0 0 40px -10px rgba(139,79,207,0.55);
  transform: translateY(-3px);
}

/* ── Moldura neon ───────────────────────────────────────────────── */
.neon-frame {
  position: relative;
  border: 1px solid rgba(139,79,207,0.35);
  box-shadow: 0 0 0 1px rgba(139,79,207,0.1), inset 0 0 40px -20px rgba(139,79,207,0.5);
}

/* ── Botões ─────────────────────────────────────────────────────── */
.btn-neon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(100deg, #8b4fcf 0%, #6b2fa0 45%, #f2c529 120%);
  background-size: 200% auto;
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 18px -2px rgba(139,79,207,0.65), 0 0 40px -12px rgba(242,197,41,0.35);
  transition: background-position 0.4s, box-shadow 0.3s, transform 0.15s;
}
.btn-neon:hover {
  background-position: right center;
  box-shadow: 0 0 26px 0 rgba(139,79,207,0.75), 0 0 60px -10px rgba(242,197,41,0.5);
}
.btn-neon:active { transform: translateY(1px); }
.btn-neon:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(139,79,207,0.4);
  color: #d9c4f2;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn-ghost-neon:hover {
  border-color: rgba(139,79,207,0.85);
  background: rgba(139,79,207,0.1);
  box-shadow: 0 0 24px -8px rgba(139,79,207,0.75);
}

/* ── Divisória neon ─────────────────────────────────────────────── */
.neon-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,79,207,0.6), rgba(242,197,41,0.4), transparent);
}

/* ── Pill / badge ───────────────────────────────────────────────── */
.neon-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.4;
  border: 1px solid rgba(139,79,207,0.45);
  background: rgba(139,79,207,0.1);
  color: #c4a3ec;
  box-shadow: inset 0 0 18px -10px rgba(139,79,207,0.9);
}

/* ── Cantos estilo frame ────────────────────────────────────────── */
.corner-marks::before,
.corner-marks::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #f2c529;
  pointer-events: none;
}
.corner-marks::before {
  top: -1px; left: -1px;
  border-top: 2px solid; border-left: 2px solid;
}
.corner-marks::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid; border-right: 2px solid;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Cursor neon PRIMAL — três camadas: glow, anel, garra
   Ativado apenas em dispositivos com mouse fino (pointer: fine)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (pointer: fine) {
  html.cursor-glow-on,
  html.cursor-glow-on * {
    cursor: none !important;
  }
}

.cursor-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
html.cursor-active .cursor-layer { opacity: 1; }

.cursor-claw,
.cursor-ring,
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  will-change: transform;
}

.cursor-claw {
  width: 22px;
  height: 27px;
  filter:
    drop-shadow(0 0 4px rgba(242,197,41,0.45))
    drop-shadow(0 0 9px rgba(139,79,207,0.35));
  transition: filter 0.18s ease;
}
.cursor-claw svg {
  display: block;
  transition: transform 0.18s ease;
}

.cursor-ring {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  border: 1.5px solid rgba(139,79,207,0.35);
  box-shadow: 0 0 14px -2px rgba(139,79,207,0.35), inset 0 0 10px -4px rgba(139,79,207,0.3);
  transition: width 0.22s ease, height 0.22s ease, border-color 0.22s ease;
}

.cursor-glow {
  width: 420px;
  height: 420px;
  border-radius: 9999px;
  background: radial-gradient(
    circle,
    rgba(139,79,207,0.09) 0%,
    rgba(139,79,207,0.04) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
}

html.cursor-hover .cursor-ring {
  width: 34px;
  height: 34px;
  border-color: rgba(242,197,41,0.425);
}
html.cursor-hover .cursor-claw {
  filter:
    drop-shadow(0 0 6px rgba(242,197,41,0.6))
    drop-shadow(0 0 14px rgba(139,79,207,0.45));
}
html.cursor-hover .cursor-claw svg { transform: scale(1.15); }
html.cursor-hover .cursor-glow {
  background: radial-gradient(
    circle,
    rgba(242,197,41,0.08) 0%,
    rgba(139,79,207,0.07) 40%,
    transparent 70%
  );
}

html.cursor-down .cursor-ring { width: 26px; height: 26px; }
html.cursor-down .cursor-claw {
  filter:
    drop-shadow(0 0 3px rgba(242,197,41,0.3))
    drop-shadow(0 0 6px rgba(139,79,207,0.2));
}
html.cursor-down .cursor-claw svg { transform: scale(0.85); }

/* ── Foco de inputs ─────────────────────────────────────────────── */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(139,79,207,0.6), 0 0 22px -6px rgba(139,79,207,0.6);
}

/* ── Scrollbar roxo → amarelo ───────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #111118; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#8b4fcf, #f2c529);
  border-radius: 8px;
  border: 2px solid #111118;
}
