/* ===================================================================
   VTE — Vector Tensor Engine · landing page
   Efeitos estilo MagicUI recriados em CSS puro (MagicUI é React+Tailwind,
   não tem bundle vanilla via CDN — aqui replicamos as assinaturas:
   retro grid, dot pattern, gradient text, shimmer button, border beam,
   meteors, bento grid, marquee, number ticker).
   Paleta oficial do VTE (vte/ui/theme.py).
   =================================================================== */

:root {
  --bg: #030303;
  --panel: #0a0b0c;
  --border: #141618;
  --green: #32f08c;
  --blue: #00d2ff;
  --purple: #8a2be2;
  --red: #e06c75;
  --text: #d1d4e0;
  --muted: #5c6370;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

::selection { background: rgba(50, 240, 140, 0.3); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2024; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

code {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.9em;
  color: var(--green);
  background: rgba(50, 240, 140, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ===================== Fundo: dot pattern ===================== */
.dot-pattern {
  background-image: radial-gradient(rgba(92, 99, 112, 0.15) 1px, transparent 1px);
  background-size: 26px 26px;
  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%);
}

/* ===================== Retro grid (piso em perspectiva) ===================== */
.retro-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.5;
  perspective: 200px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 90%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 90%);
}
.retro-grid::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 300%;
  transform: rotateX(65deg);
  background-image:
    linear-gradient(to right, rgba(50, 240, 140, 0.25) 1px, transparent 0),
    linear-gradient(to bottom, rgba(50, 240, 140, 0.25) 1px, transparent 0);
  background-size: 60px 60px;
  background-repeat: repeat;
  animation: grid-scroll 20s linear infinite;
}
@keyframes grid-scroll {
  0% { transform: rotateX(65deg) translateY(0); }
  100% { transform: rotateX(65deg) translateY(60px); }
}

/* Vinheta do hero pra dar profundidade ao 3D */
.hero-vignette {
  background: radial-gradient(ellipse 60% 50% at 50% 45%, transparent 30%, var(--bg) 90%);
}

/* ===================== Gradient text (animado) ===================== */
.gradient-text {
  background: linear-gradient(110deg, var(--green), #b8ffdd 35%, #1bbd6d 55%, var(--green) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-move 6s linear infinite;
}
@keyframes gradient-move {
  0% { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

/* ===================== Shimmer button ===================== */
.shimmer-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 0.85rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #041a10;
  background: var(--green);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 0 rgba(50, 240, 140, 0);
}
.shimmer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(50, 240, 140, 0.35);
}
.shimmer-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shimmer 3.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 60% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

/* ===================== Reveal on scroll ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== Stat chips (hero) ===================== */
.stat-chip {
  padding: 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(10, 11, 12, 0.6);
  backdrop-filter: blur(6px);
}
.stat-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}
.stat-label {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================== Seções ===================== */
.section-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--green);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1.5rem;
  max-width: 40ch;
}
.section-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 65ch;
}

/* ===================== Feature cards ===================== */
.feature-card {
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 11, 12, 0.8), rgba(3, 3, 3, 0.4));
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(50, 240, 140, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.feature-icon {
  font-size: 1.6rem;
  color: var(--green);
  margin-bottom: 0.85rem;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.5rem; }
.feature-card p { font-size: 0.92rem; line-height: 1.6; color: var(--muted); margin: 0; }

/* ===================== Meteors ===================== */
.meteors {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.meteor {
  position: absolute;
  top: -10%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px 1px rgba(50, 240, 140, 0.6);
}
.meteor::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, rgba(50, 240, 140, 0.6), transparent);
}
@keyframes meteor-fall {
  0% { transform: translate(0, 0) rotate(215deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(-350px, 350px) rotate(215deg); opacity: 0; }
}

/* ===================== Benchmark ===================== */
.bench-card {
  padding: 1.6rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(10, 11, 12, 0.7);
}
.ratio-badge {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--green);
  background: rgba(50, 240, 140, 0.1);
  border: 1px solid rgba(50, 240, 140, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 0.5rem;
}
.ratio-badge.lead {
  color: var(--blue);
  background: rgba(0, 210, 255, 0.1);
  border-color: rgba(0, 210, 255, 0.3);
}
.bench-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.bench-label { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--muted); }
.bench-track {
  height: 10px;
  border-radius: 999px;
  background: #121417;
  overflow: hidden;
}
.bench-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.bench-fill.is-animated { width: var(--w); }
.bench-fill.vte { background: linear-gradient(90deg, #1bbd6d, var(--green)); }
.bench-fill.ref { background: #2a2f36; }
.bench-val { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--text); white-space: nowrap; }
.bench-val em { color: var(--muted); font-style: normal; font-size: 0.7rem; }

/* ===================== Pipeline ===================== */
.pipeline {
  margin-top: 3rem;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pipe-step {
  flex: 1 1 180px;
  padding: 1.25rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(10, 11, 12, 0.6);
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.pipe-step:hover { border-color: rgba(50, 240, 140, 0.4); transform: translateY(-3px); }
.pipe-idx {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--green);
}
.pipe-step h4 { margin: 0.4rem 0 0.4rem; font-size: 1rem; font-weight: 700; }
.pipe-step p { margin: 0; font-size: 0.82rem; line-height: 1.55; color: var(--muted); }
.pipe-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 1.3rem;
}
@media (max-width: 720px) { .pipe-arrow { display: none; } }

/* ===================== Bento grid ===================== */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.bento-item {
  padding: 1.6rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 11, 12, 0.85), rgba(3, 3, 3, 0.3));
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.bento-item:hover { transform: translateY(-3px); border-color: rgba(50, 240, 140, 0.4); }
.bento-item.col-span-2 { grid-column: span 2; }
.bento-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--green);
  margin-bottom: 0.6rem;
}
.bento-item h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 700; }
.bento-item p { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--muted); }
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; }
  .bento-item.col-span-2 { grid-column: span 1; }
}

/* ===================== Border beam card (Por que AMD) ===================== */
.border-beam-card {
  position: relative;
  margin-top: 2.5rem;
  padding: 2.5rem;
  border-radius: 1.25rem;
  background: rgba(10, 11, 12, 0.7);
  border: 1px solid var(--border);
  overflow: hidden;
}
.border-beam-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--angle, 0deg), transparent 55%, #1bbd6d, var(--green), #b8ffdd, transparent 85%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: beam-rotate 6s linear infinite;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes beam-rotate {
  to { --angle: 360deg; }
}

/* ===================== Marquee ===================== */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 1.5rem;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  color: var(--muted);
  animation: marquee 30s linear infinite;
}
.marquee-track span:not(:only-child) { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===================== Spotlight nos cards (segue o mouse) ===================== */
/* Aplicado em .feature-card, .bento-item, .bench-card via JS que seta --mx/--my */
.feature-card, .bento-item, .bench-card {
  position: relative;
  isolation: isolate;
}
.feature-card::after, .bento-item::after, .bench-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(50, 240, 140, 0.14),
    transparent 45%
  );
}
.feature-card:hover::after, .bento-item:hover::after, .bench-card:hover::after { opacity: 1; }

/* ===================== Terminal "ao vivo" (stream de tokens) ===================== */
.live-terminal {
  margin-top: 3.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #060708, #030303);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; background: #222; }
.term-dot.g { background: #2a3b32; }
.term-title {
  margin-left: 0.6rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}
.term-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--green);
}
.term-live .rec { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: rec-blink 1.2s steps(1) infinite; }
@keyframes rec-blink { 50% { opacity: 0.25; } }

.term-body {
  padding: 1.1rem 1.3rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  min-height: 190px;
}
.term-prompt { color: var(--muted); }
.term-prompt .caret-dollar { color: var(--green); }
.term-cmd { color: var(--text); }
.term-out { color: var(--green); }
.term-meta { color: var(--muted); }
.term-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: var(--green);
  margin-left: 2px;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.term-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.8rem 1.3rem;
  border-top: 1px solid var(--border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}
.term-stats b { color: var(--green); font-weight: 700; }
.term-stats span { color: var(--muted); }

/* ===================== Botão magnético ===================== */
.shimmer-btn { will-change: transform; }

/* ===================== Cursor luminoso ===================== */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 380px; height: 380px;
  margin: -190px 0 0 -190px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(circle, rgba(50, 240, 140, 0.06), transparent 60%);
  transition: opacity 0.3s ease;
  mix-blend-mode: screen;
}

/* ===================== Divisor "scanline" entre seções ===================== */
.scan-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.35;
  position: relative;
  overflow: visible;
}
.scan-divider::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 120px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  filter: blur(1px);
  animation: scan 5s linear infinite;
}
@keyframes scan { 0% { left: -120px; } 100% { left: 100%; } }

/* Números do scramble com leve glow enquanto embaralham */
.scramble.scrambling { color: var(--green); }

/* ===================== Placa RX 7600 (exploded, scroll-driven) ===================== */
.gpu-section {
  position: relative;
  /* altura extra dá "trilho" de scroll pra desmontar (5 passos) */
  height: 420vh;
}
.gpu-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#gpu-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gpu-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 5vw, 4rem);
}
.gpu-heading {
  max-width: 34ch;
}
.gpu-heading .section-eyebrow { opacity: 1; }
.gpu-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

/* card de info do componente ativo */
.gpu-info {
  align-self: flex-end;
  max-width: 380px;
  padding: 1.5rem 1.6rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(6, 7, 8, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.gpu-info .gpu-step {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--green);
  letter-spacing: 0.08em;
}
.gpu-info h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.gpu-info p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}
.gpu-info .gpu-swap { transition: opacity 0.35s ease, transform 0.35s ease; }
.gpu-info .gpu-swap.out { opacity: 0; transform: translateY(8px); }

/* progresso lateral (dots) */
.gpu-progress {
  position: absolute;
  right: clamp(1rem, 3vw, 2.2rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  pointer-events: none;
}
.gpu-progress i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c2024;
  transition: all 0.3s ease;
}
.gpu-progress i.on {
  background: var(--green);
  box-shadow: 0 0 12px rgba(50, 240, 140, 0.7);
  transform: scale(1.4);
}
.gpu-hint {
  align-self: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.gpu-hint .down { animation: hint-bounce 1.6s ease-in-out infinite; }
@keyframes hint-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 720px) {
  .gpu-overlay {
    justify-content: flex-end;
    padding-bottom: clamp(1rem, 4vw, 2rem);
  }
  .gpu-heading {
    position: absolute;
    top: clamp(1rem, 4vw, 1.5rem);
    left: clamp(1rem, 4vw, 1.5rem);
    right: clamp(1rem, 4vw, 1.5rem);
  }
  .gpu-info { 
    max-width: 100%; 
    align-self: stretch;
    background: rgba(6, 7, 8, 0.88);
    backdrop-filter: blur(8px);
  }
  .gpu-progress { display: none; }
}

/* ===================== Acessibilidade ===================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
