:root {
  --bg: #0a0e14;
  --bg-alt: #10151d;
  --bg-card: #131a24;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf3;
  --text-dim: #8b98ab;
  --accent: #00e5ff;
  --accent-2: #b46bff;
  --ok: #4ade80;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 14px;
  --wrap: 1120px;
}

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


body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

#matrixRain {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.14;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}

/* CRT scanline sweep */
.scanline {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 229, 255, 0.06) 50%,
    transparent 100%
  );
  height: 140px;
  animation: scan-sweep 9s linear infinite;
  mix-blend-mode: screen;
}

@keyframes scan-sweep {
  0% { transform: translateY(-140px); }
  100% { transform: translateY(100vh); }
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--delay, 0) * 0.12s);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Terminal typewriter cursor */
.term-cursor {
  display: inline-block;
  color: var(--accent);
  animation: cursor-blink 1s step-end infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Glitch text (logo + hero highlight) */
[data-glitch] {
  position: relative;
  display: inline-block;
}
[data-glitch].glitch-active::before,
[data-glitch].glitch-active::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  background: inherit;
}
[data-glitch].glitch-active::before {
  color: var(--accent);
  clip-path: inset(0 0 60% 0);
  transform: translate(-2px, -1px);
  animation: glitch-shift 0.35s steps(2, end) 1;
}
[data-glitch].glitch-active::after {
  color: var(--accent-2);
  clip-path: inset(60% 0 0 0);
  transform: translate(2px, 1px);
  animation: glitch-shift 0.35s steps(2, end) 1 reverse;
}
@keyframes glitch-shift {
  0% { transform: translate(-2px, -1px); }
  50% { transform: translate(2px, 1px); }
  100% { transform: translate(-1px, 0); }
}

/* Button scan sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
}
.btn:hover::after { left: 130%; }

/* Nav link underline sweep */
.nav a:not(.nav-cta) {
  position: relative;
}
.nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav a:not(.nav-cta):hover::after { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .scanline { display: none; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .term-cursor { animation: none; }
  [data-glitch].glitch-active::before,
  [data-glitch].glitch-active::after { animation: none; content: none; }
  #matrixRain { display: none; }
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { color: var(--text-dim); margin: 0 0 16px; }
.lead { font-size: 1.1rem; max-width: 46ch; }

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(10, 14, 20, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}
.logo span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--bg) !important;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 500;
}
.nav-cta:hover { color: var(--bg) !important; opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

/* Hero */
.hero { padding: 96px 0 80px; position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #05070a;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.25);
}
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.btn-ghost:hover { border-color: var(--accent); }

.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.08);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.panel-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.panel-body {
  margin: 0;
  padding: 22px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.9;
  white-space: pre-wrap;
}
.c-dim { color: var(--text-dim); }
.c-accent { color: var(--accent); }
.c-ok { color: var(--ok); }

/* Sections */
section { position: relative; z-index: 1; padding: 72px 0; }
.servicos, .como-trabalho { border-top: 1px solid var(--border); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-tag {
  font-family: var(--font-mono);
  color: var(--accent-2);
  font-size: 0.85rem;
}
.card p { margin-bottom: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.step p { margin-bottom: 0; }

.contato { border-top: 1px solid var(--border); text-align: center; }
.contato-inner { display: flex; flex-direction: column; align-items: center; }
.contato .hero-actions { justify-content: center; }
.fine-print {
  margin-top: 18px;
  font-size: 0.78rem;
  color: rgba(139, 152, 171, 0.6);
}

.site-footer { border-top: 1px solid var(--border); padding: 28px 0; position: relative; z-index: 1; }
.footer-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-dim { font-family: var(--font-mono); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .cards, .steps { grid-template-columns: 1fr; }
  .nav { position: fixed; inset: 68px 0 0 0; background: var(--bg); flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: 32px 24px; gap: 22px; transform: translateX(100%); transition: transform 0.25s ease; }
  .nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
}
