/* ============================================================
   DEFBOTS — Design System (v2 — Premium Tech)
   Site estático: HTML + Tailwind (CDN) + JS puro.
   Aqui ficam: tokens, tipografia, componentes visuais,
   animações e microinterações.
   Nenhuma lógica de negócio vive neste arquivo.
   ============================================================ */

/* ---------- Tokens de tema ---------- */
:root {
  --background: #07080d;
  --surface: #0b0d15;
  --foreground: #f4f5f8;
  --card: #0d0f18;
  --card-foreground: #f4f5f8;
  --popover: #0d0f18;
  --popover-foreground: #f4f5f8;

  --primary: #8b5cf6;       /* Roxo principal */
  --primary-soft: #a78bfa;  /* Lilás/Roxo suave */
  --primary-foreground: #ffffff;

  --accent: #c084fc;       /* Roxo de destaque */
  --accent-foreground: #1e0933;

  --secondary: #131622;
  --secondary-foreground: #e6e8ef;
  --muted: #12141d;
  --muted-foreground: #8b90a3;

  --success: #34d399;
  --warning: #fbbf24;
  --destructive: #f87171;
  --destructive-foreground: #ffffff;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --input: rgba(255, 255, 255, 0.08);
  --ring: #8b5cf6;          /* Anel de foco acompanhando o roxo */

  --radius: 1rem;

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Space Grotesk", "Inter", sans-serif;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 28px 60px -24px rgba(0, 0, 0, 0.85);
  --shadow-primary: 0 12px 36px -12px rgba(88, 28, 135, 0.55);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  border-color: var(--border);
}

html {
  background-color: var(--background);
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: rgba(88, 28, 135, 0.35);
  color: #fff;
}

/* Scrollbar discreta */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--background);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  border: 3px solid var(--background);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(88, 28, 135, 0.6);
}

/* ---------- Tipografia ---------- */
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

.font-mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: linear-gradient(100deg, #d8b4fe 0%, #6b21a8 45%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--primary-soft);
  background: rgba(88, 28, 135, 0.09);
  border: 1px solid rgba(88, 28, 135, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.eyebrow--accent {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.22);
}
.eyebrow--success {
  color: var(--success);
  background: rgba(52, 211, 153, 0.08);
  border-color: rgba(52, 211, 153, 0.22);
}

/* ---------- Fundos ---------- */
.bg-aurora {
  background:
    radial-gradient(60rem 32rem at 50% -12rem, rgba(88, 28, 135, 0.22), transparent 70%),
    radial-gradient(40rem 26rem at 85% 8rem, rgba(168, 85, 247, 0.1), transparent 70%);
}

.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 35%, #000 10%, transparent 78%);
}

.bg-fade-top {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.025), transparent 45%);
}

.glow-soft {
  position: absolute;
  border-radius: 999px;
  filter: blur(120px);
  pointer-events: none;
}

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

/* ---------- Superfícies / Cards ---------- */
.surface {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.016) 100%);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.4s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.4s var(--ease),
    background 0.3s var(--ease);
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(88, 28, 135, 0.42);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(88, 28, 135, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* Brilho que segue o mouse (definido via JS: --mx / --my) */
.card-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(18rem 18rem at var(--mx, 50%) var(--my, 0%), rgba(88, 28, 135, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.card-spot:hover::after {
  opacity: 1;
}

.card-featured {
  border-color: rgba(88, 28, 135, 0.35);
  background:
    linear-gradient(180deg, rgba(88, 28, 135, 0.12) 0%, rgba(88, 28, 135, 0.02) 55%, rgba(255, 255, 255, 0.015) 100%);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgba(88, 28, 135, 0.12);
}

/* Ícone em "tile" */
.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: rgba(88, 28, 135, 0.12);
  border: 1px solid rgba(88, 28, 135, 0.2);
  color: var(--primary-soft);
  transition: transform 0.35s var(--ease), background 0.3s var(--ease);
}
.group:hover .icon-tile {
  transform: translateY(-2px) scale(1.05);
  background: rgba(88, 28, 135, 0.2);
}
.icon-tile--accent {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}
.group:hover .icon-tile--accent {
  background: rgba(168, 85, 247, 0.18);
}
.icon-tile--success {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
  color: var(--success);
}
.group:hover .icon-tile--success {
  background: rgba(52, 211, 153, 0.18);
}
.icon-tile--warning {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
  color: var(--warning);
}
.group:hover .icon-tile--warning {
  background: rgba(251, 191, 36, 0.18);
}

/* Chips / tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease),
    background 0.25s var(--ease);
}
.chip:hover {
  color: var(--foreground);
  border-color: rgba(88, 28, 135, 0.35);
  background: rgba(88, 28, 135, 0.08);
  transform: translateY(-2px);
}
.chip--success:hover {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.badge-pop {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(120deg, #6b21a8, #a855f7);
  border-radius: 999px;
  box-shadow: var(--shadow-primary);
}

/* ---------- Botões ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease);
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
}
.btn:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.08s;
}
.btn:focus-visible {
  outline: 2px solid var(--primary-soft);
  outline-offset: 3px;
}

/* Varredura de brilho no hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}
.btn:hover::before {
  transform: translateX(120%);
}

.btn i,
.btn svg {
  transition: transform 0.3s var(--ease);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-primary {
  color: var(--primary-foreground);
  background: linear-gradient(120deg, #6b21a8 0%, #581c87 55%, #3b0764 100%);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  box-shadow: 0 16px 44px -12px rgba(88, 28, 135, 0.75);
}

.btn-accent {
  color: #04121a;
  background: linear-gradient(120deg, #c084fc 0%, #a855f7 60%, #9333ea 100%);
  box-shadow: 0 12px 36px -12px rgba(168, 85, 247, 0.5);
}
.btn-accent:hover {
  box-shadow: 0 16px 44px -12px rgba(168, 85, 247, 0.7);
}

.btn-success {
  color: #04140d;
  background: linear-gradient(120deg, #6ee7b7 0%, #34d399 60%, #10b981 100%);
  box-shadow: 0 12px 36px -12px rgba(52, 211, 153, 0.5);
}
.btn-success:hover {
  box-shadow: 0 16px 44px -12px rgba(52, 211, 153, 0.7);
}

.btn-ghost {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: rgba(88, 28, 135, 0.1);
  border-color: rgba(88, 28, 135, 0.4);
}

.btn-lg {
  padding: 1rem 1.9rem;
  font-size: 1rem;
  border-radius: 1rem;
}
.btn-block {
  width: 100%;
}

/* Ondulação ao clicar (criada pelo JS) */
.btn .ripple {
  position: absolute;
  border-radius: 999px;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.35);
  animation: ripple 0.6s var(--ease) forwards;
  pointer-events: none;
  z-index: -1;
}
@keyframes ripple {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Link de navegação */
.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 1.5px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.32s var(--ease);
}
.nav-link:hover {
  color: var(--foreground);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link-mobile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav-link-mobile:hover,
.nav-link-mobile:active {
  color: var(--foreground);
  background: rgba(88, 28, 135, 0.1);
  transform: translateX(3px);
}

/* Barra de navegação */
.nav-shell {
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: rgba(11, 13, 21, 0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.is-scrolled .nav-shell {
  background: rgba(9, 11, 18, 0.86);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}

/* ---------- Animações ---------- */
@keyframes float-soft {
  0%,
  100% {
    transform: translateY(6px);
  }
  50% {
    transform: translateY(-6px);
  }
}
.animate-float {
  animation: float-soft 7s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, -3%, 0) scale(1.06);
  }
}
.animate-drift {
  animation: drift 16s ease-in-out infinite;
}

@keyframes ping-slow {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  75%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}
.animate-ping-slow {
  animation: ping-slow 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes sheen {
  0% {
    background-position: -160% 0;
  }
  100% {
    background-position: 260% 0;
  }
}
.text-sheen {
  background-image: linear-gradient(100deg, #d8b4fe 0%, #6b21a8 35%, #c084fc 55%, #6b21a8 75%, #d8b4fe 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 7s linear infinite;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nav-in {
  animation: nav-in 0.6s var(--ease) both;
}

@keyframes fab-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.fab-in {
  animation: fab-in 0.6s var(--ease) 0.6s both;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.menu-in {
  animation: menu-in 0.28s var(--ease) both;
}

/* Reveal ao rolar (mantém o comportamento do data-reveal) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal="left"] {
  transform: translateX(-32px);
}
[data-reveal="right"] {
  transform: translateX(32px);
}
[data-reveal="scale"] {
  transform: scale(0.96);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Terminal decorativo */
.terminal {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #0c0e17 0%, #090b12 100%);
  box-shadow: var(--shadow-lift);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
}

/* Acessibilidade: respeita preferência por menos movimento */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
