:root {
  --bg: #0b0f1a;
  --bg-soft: #10182b;
  --text: #e5ecff;
  --muted: #9aa7c7;
  --purple: #7c3aed;
  --cyan: #00d4ff;
  --magenta: #db2777;
  --glass: rgba(18, 27, 46, 0.58);
  --border: rgba(124, 58, 237, 0.42);
  --shadow-neon: 0 0 22px rgba(0, 212, 255, 0.24), 0 0 40px rgba(124, 58, 237, 0.22);
  --radius: 16px;
  --radius-sm: 12px;
  --container: min(1120px, 92vw);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 10%, rgba(124, 58, 237, 0.18), transparent 45%),
              radial-gradient(circle at 85% 22%, rgba(0, 212, 255, 0.16), transparent 40%),
              var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

/* ===== Background tech animado ===== */
.bg-grid,
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
  animation: gridShift 18s linear infinite;
}

.bg-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.25), transparent 65%);
  z-index: -1;
  animation: glowDrift 9s ease-in-out infinite alternate;
}

@keyframes gridShift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(48px, 48px, 0); }
}

@keyframes glowDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate3d(0, 10px, 0) scale(1.08); opacity: 1; }
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  padding: 84px 0;
  position: relative;
}

.section-title {
  font-size: clamp(1.45rem, 1.1rem + 1.25vw, 2.2rem);
  margin: 0 0 30px;
  letter-spacing: 0.2px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  background-size: 220% 100%;
  animation: sectionLine 3.4s linear infinite;
  opacity: 0.72;
}

@keyframes sectionLine {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

/* ===== Navbar fixa ===== */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 40;
  transition: background-color 220ms ease, backdrop-filter 220ms ease, border-color 220ms ease;
  border-bottom: 1px solid transparent;
}

.topbar.scrolled {
  background: rgba(11, 15, 26, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: rgba(124, 58, 237, 0.3);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--cyan), var(--purple));
  box-shadow: 0 0 14px var(--cyan);
  animation: dotPulse 1.8s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px var(--cyan); }
  50% { transform: scale(1.2); box-shadow: 0 0 18px var(--cyan), 0 0 26px rgba(124, 58, 237, 0.35); }
}

.menu-toggle {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  font-weight: 600;
}

.menu {
  list-style: none;
  display: none;
  margin: 0;
  padding: 0;
  gap: 18px;
}

.menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 150ms ease;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0.2);
  opacity: 0;
  transform-origin: left;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--cyan);
}

.menu a:hover::after,
.menu a:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.menu.open {
  display: grid;
  position: absolute;
  top: 68px;
  left: 4vw;
  right: 4vw;
  background: rgba(12, 17, 32, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

/* ===== Hero ===== */
.hero {
  padding-top: 132px;
}

.hero-grid {
  display: grid;
  gap: 26px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(1.95rem, 1.3rem + 2.2vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 16px;
  background: linear-gradient(95deg, #dfe7ff 0%, #b5e8ff 45%, #d7c3ff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: headingShine 6s linear infinite;
}

.glitch-title {
  position: relative;
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.glitch-title::before {
  color: rgba(0, 212, 255, 0.7);
  transform: translate3d(1px, 0, 0);
  clip-path: polygon(0 2%, 100% 0, 100% 33%, 0 36%);
  animation: glitchA 2.8s infinite steps(2, end);
}

.glitch-title::after {
  color: rgba(219, 39, 119, 0.68);
  transform: translate3d(-1px, 0, 0);
  clip-path: polygon(0 65%, 100% 60%, 100% 100%, 0 100%);
  animation: glitchB 2.2s infinite steps(2, end);
}

@keyframes headingShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes glitchA {
  0%, 88%, 100% { transform: translate3d(1px, 0, 0); opacity: 0.45; }
  89% { transform: translate3d(-3px, 1px, 0); opacity: 0.85; }
  92% { transform: translate3d(4px, -1px, 0); opacity: 0.8; }
}

@keyframes glitchB {
  0%, 82%, 100% { transform: translate3d(-1px, 0, 0); opacity: 0.42; }
  83% { transform: translate3d(3px, -1px, 0); opacity: 0.82; }
  87% { transform: translate3d(-4px, 1px, 0); opacity: 0.78; }
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-140%);
  transition: transform 420ms ease;
  pointer-events: none;
}

.btn::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  left: var(--bx, -999px);
  top: var(--by, -999px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.btn:hover::before {
  transform: translateX(140%);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  color: #08131d;
  background: linear-gradient(100deg, var(--cyan), #6be7ff);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(124, 58, 237, 0.64);
  background: rgba(124, 58, 237, 0.15);
}

.btn-cta {
  color: #04101d;
  background: linear-gradient(110deg, var(--magenta), var(--cyan));
  box-shadow: 0 0 20px rgba(219, 39, 119, 0.42), 0 0 30px rgba(0, 212, 255, 0.28);
  animation: pulseGlow 2s ease-in-out infinite, ctaGlitch 4.5s steps(2, end) infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(219, 39, 119, 0.36), 0 0 28px rgba(0, 212, 255, 0.22); }
  50% { box-shadow: 0 0 28px rgba(219, 39, 119, 0.56), 0 0 42px rgba(0, 212, 255, 0.34); }
}

@keyframes ctaGlitch {
  0%, 93%, 100% { filter: hue-rotate(0deg) saturate(1); }
  94% { filter: hue-rotate(10deg) saturate(1.2); transform: translateY(-2px) skewX(-1deg); }
  96% { filter: hue-rotate(-8deg) saturate(1.25); transform: translateY(-1px) skewX(1deg); }
}

.hero-mockup {
  border-radius: var(--radius);
  background: linear-gradient(140deg, rgba(124, 58, 237, 0.18), rgba(0, 212, 255, 0.1));
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: var(--shadow-neon);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.mockup-head {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(11, 15, 26, 0.6);
}

.mockup-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(154, 167, 199, 0.45);
}

.mockup-head span:first-child { background: #ff5f56; }
.mockup-head span:nth-child(2) { background: #ffbd2e; }
.mockup-head span:nth-child(3) { background: #27c93f; }

.mockup-body {
  padding: 14px;
}

.terminal-line {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: #c8dcff;
  margin-bottom: 8px;
  position: relative;
}

.terminal-line::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1em;
  margin-left: 6px;
  vertical-align: -2px;
  background: rgba(0, 212, 255, 0.75);
  animation: blinkCursor 1s steps(2, end) infinite;
}

.terminal-line:nth-child(2)::after,
.terminal-line:nth-child(3)::after {
  display: none;
}

@keyframes blinkCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.label { color: var(--cyan); }

.progress-wrap {
  height: 9px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 10px;
}

.progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  background-size: 220% 100%;
  animation: progressFlow 2.8s linear infinite;
}

@keyframes progressFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.result-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.86rem;
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(9, 13, 24, 0.62);
  animation: rowPulse 4.5s ease-in-out infinite;
}

.result-list li:nth-child(2) { animation-delay: 0.4s; }
.result-list li:nth-child(3) { animation-delay: 0.8s; }

@keyframes rowPulse {
  0%, 100% { border-color: rgba(124, 58, 237, 0.28); }
  50% { border-color: rgba(0, 212, 255, 0.5); }
}

.result-list em {
  color: var(--cyan);
  font-style: normal;
}

/* ===== Cards ===== */
.grid {
  display: grid;
  gap: 14px;
}

.problema-subtitle {
  margin: -10px 0 0;
  color: var(--muted);
  max-width: 72ch;
}

.problema-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 14px;
}

.problema-points {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  color: #cfe0ff;
}

.problema-points li {
  border: 1px solid rgba(0, 212, 255, 0.28);
  background: rgba(9, 13, 24, 0.62);
  border-radius: 10px;
  padding: 9px 12px;
  animation: pointWave 3.8s ease-in-out infinite;
}

.problema-points li:nth-child(2) { animation-delay: 0.4s; }
.problema-points li:nth-child(3) { animation-delay: 0.8s; }

@keyframes pointWave {
  0%, 100% { border-color: rgba(0, 212, 255, 0.28); box-shadow: 0 0 0 rgba(0, 212, 255, 0); }
  50% { border-color: rgba(124, 58, 237, 0.55); box-shadow: 0 0 16px rgba(124, 58, 237, 0.24); }
}

.krin-merchan {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(14, 20, 38, 0.82), rgba(9, 13, 24, 0.84));
  box-shadow: var(--shadow-neon);
}

.krin-merchan .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.krin-merchan .section-title {
  margin-bottom: 12px;
}

.krin-merchan p {
  margin: 0 auto;
  max-width: 62ch;
}

.krin-merchan .btn {
  margin-top: 18px;
}

.card,
.step,
.security-box {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 58, 237, 0.35);
  padding: 18px;
  overflow: hidden;
  animation: surfaceBreath 5.2s ease-in-out infinite;
}

.card:nth-child(2),
.step:nth-child(2) {
  animation-delay: 0.35s;
}

.card:nth-child(3),
.step:nth-child(3) {
  animation-delay: 0.7s;
}

.card:nth-child(4),
.step:nth-child(4) {
  animation-delay: 1.05s;
}

@keyframes surfaceBreath {
  0%, 100% { box-shadow: 0 0 0 rgba(0, 212, 255, 0); }
  50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.16), 0 0 28px rgba(124, 58, 237, 0.14); }
}

.card h3,
.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.card p,
.step p,
.security-box p {
  margin: 0;
  color: var(--muted);
}

.neon-card {
  background: linear-gradient(180deg, rgba(12, 17, 32, 0.75), rgba(7, 11, 23, 0.85));
}

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.6), rgba(0, 212, 255, 0.55), rgba(219, 39, 119, 0.55));
  background-size: 200% 200%;
  animation: borderFlow 5s linear infinite;
  opacity: 0.48;
}

.glow-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: var(--mx, -999px);
  top: var(--my, -999px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 212, 255, 0.23), transparent 68%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
}

.glow-card:hover::after {
  opacity: 1;
}

.glow-card:hover {
  filter: saturate(1.14) hue-rotate(4deg);
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ===== Terminal hacker ===== */
.terminal {
  position: relative;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  background: rgba(8, 11, 20, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.26);
  border-radius: 14px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.22), var(--shadow-neon);
  animation: terminalGlitch 6s steps(2, end) infinite;
}

@keyframes terminalGlitch {
  0%, 95%, 100% { transform: translate3d(0, 0, 0); }
  96% { transform: translate3d(-1px, 0, 0); }
  97% { transform: translate3d(1px, 0, 0); }
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.terminal::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 24%;
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  animation: terminalSweep 4.2s linear infinite;
  pointer-events: none;
}

@keyframes terminalSweep {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(520%); opacity: 0; }
}

.terminal p {
  margin: 0 0 8px;
  color: #cbe1ff;
}

.prompt {
  color: var(--magenta);
  margin-right: 8px;
}

/* ===== Steps ===== */
.steps {
  position: relative;
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.step {
  z-index: 1;
  background: rgba(18, 26, 44, 0.62);
}

.steps-line {
  display: none;
  position: absolute;
  top: 30px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  background-size: 220% 100%;
  animation: runLine 2.6s linear infinite;
  opacity: 0.72;
  z-index: 0;
  pointer-events: none;
}

@keyframes runLine {
  0% { background-position: 0 0; }
  100% { background-position: 220% 0; }
}

.step-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: linear-gradient(120deg, var(--purple), var(--cyan));
  color: #07111d;
  margin-bottom: 10px;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.36);
  animation: stepPulse 2.2s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
  50% { transform: scale(1.08); box-shadow: 0 0 18px rgba(124, 58, 237, 0.45); }
}

.steps-cta {
  margin-top: 22px;
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.steps-cta p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

/* ===== Segurança + CTA ===== */
.small {
  max-width: 820px;
}

.security-box {
  background: rgba(10, 14, 25, 0.74);
  box-shadow: var(--shadow-neon);
}

.security-box p + p {
  margin-top: 8px;
}

.cta h2 {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.25rem);
}

.cta {
  position: relative;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 18% 0 auto;
  height: 120px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22), transparent 70%);
  filter: blur(16px);
  animation: ctaAura 5.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes ctaAura {
  0% { transform: scale(0.95); opacity: 0.45; }
  100% { transform: scale(1.08); opacity: 0.9; }
}

.cta p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 60ch;
}

.footer {
  padding: 24px 0 34px;
  border-top: 1px solid rgba(124, 58, 237, 0.3);
  color: var(--muted);
  font-size: 0.92rem;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  background-size: 240% 100%;
  animation: footerLine 4.4s linear infinite;
}

@keyframes footerLine {
  0% { background-position: 0% 50%; }
  100% { background-position: 240% 50%; }
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== Responsividade ===== */
@media (min-width: 768px) {
  .menu-toggle { display: none; }

  .menu {
    display: flex;
    position: static;
  }

  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: center;
    gap: 28px;
  }

  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps-line {
    display: block;
  }
}

@media (min-width: 1024px) {
  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cards-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .section {
    padding: 96px 0;
  }
}

@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;
  }
}
