:root {
  --bg: #0e0e12;
  --surface: #17171c;
  --line: #2a2a33;
  --text: #ececf1;
  --muted: #9a9aa8;
  --violet: #7c5cff;
  --violet-d: #6a47f5;
  --title: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

h1, h2, h3 { font-family: var(--title); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 12px; }
h2 + .grid { margin-top: 32px; }
h3 { font-size: 1.05rem; }
section { padding: 56px 0; }
.sub { color: var(--muted); margin: 0 0 36px; max-width: 60ch; }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 10; background: rgba(14, 14, 18, 0.85); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--title); font-weight: 600; font-size: 1.3rem; }
.bar nav { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; color: var(--muted); }
.bar nav a { text-decoration: none; }
.bar nav a:hover { color: var(--text); }

/* Botões */
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; background: var(--violet); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; transition: background 0.15s; }
.btn:hover { background: var(--violet-d); }
.btn.small { padding: 8px 16px; font-size: 0.85rem; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text) !important; }
.btn.ghost:hover { background: var(--surface); }
.btn.light { background: var(--text); color: var(--bg) !important; }
.btn.light:hover { background: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }

/* Herói */
.hero { text-align: center; padding-top: 64px; }
.hero .actions { justify-content: center; }
.pill-wrap { position: relative; display: inline-block; margin: 0 0 22px; }
.pill { display: inline-block; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 0.78rem; }
.lead { max-width: 56ch; margin: 22px auto 0; color: var(--muted); font-size: 1.1rem; }
.shot { margin: 56px 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 80px rgba(124, 92, 255, 0.16); }
.shot img { display: block; width: 100%; border-radius: 10px; }

/* Marcas de anotação, como as do editor */
.loop { position: absolute; left: -14px; right: -14px; top: -9px; bottom: -9px; width: calc(100% + 28px); height: calc(100% + 18px); overflow: visible; fill: none; stroke: #ff4d6d; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; animation: draw 0.9s 0.3s ease-out both; }
.pointer { position: relative; display: inline-block; }
.arrow { position: absolute; right: calc(100% + 4px); top: -30px; width: 84px; height: 52px; overflow: visible; fill: none; stroke: #ffd60a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: draw 0.8s 1.2s ease-out both; }
.arrow .head { animation: draw 0.3s 1.9s ease-out both; }
.hl { color: inherit; background: linear-gradient(transparent 52%, rgba(255, 214, 10, 0.38) 52% 92%, transparent 92%) no-repeat; background-size: 0% 100%; padding: 0 3px; margin: 0 -3px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; animation: mark 0.8s 0.9s ease-out forwards; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mark { to { background-size: 100% 100%; } }

/* Cartões */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }
.card.plain { background: transparent; }
.ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 9px; background: #231f3d; color: var(--violet); }
.ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Teclado */
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 40px; margin-block: 24px; }
.keys .sub { margin-bottom: 0; }
dl { margin: 0; display: grid; gap: 12px; }
dl > div { display: flex; align-items: center; gap: 14px; }
dt { min-width: 120px; flex-shrink: 0; display: flex; gap: 6px; }
dd { margin: 0; color: var(--muted); font-size: 0.92rem; }
kbd { font: 0.78rem var(--mono); padding: 3px 9px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--bg); color: var(--text); }

/* Instalar */
pre { margin: 14px 0 0; padding: 14px; overflow-x: auto; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
code { font-family: var(--mono); font-size: 0.85rem; }
p code { background: var(--bg); padding: 1px 6px; border-radius: 5px; }
.note { margin-top: 22px; color: var(--muted); font-size: 0.88rem; max-width: 75ch; }
.note a { color: var(--text); }

/* Faixa final */
.band { padding: 44px; border-radius: 18px; background: var(--violet); }
.band p { max-width: 62ch; margin: 14px 0 0; color: #f0ecff; }
.band .actions { margin-bottom: 0; }
.band .btn.ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff !important; }
.band .btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* Rodapé */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 32px 0 48px; color: var(--muted); font-size: 0.82rem; }
.foot img { vertical-align: -3px; margin-right: 4px; }
.foot a { text-decoration-color: var(--line); }

@media (max-width: 760px) {
  .bar nav a:not(.btn) { display: none; }
  .grid, .keys { grid-template-columns: minmax(0, 1fr); }
  .keys, .band { padding: 26px; }
  section { padding: 40px 0; }
  .hero { padding-top: 40px; }
  .shot { margin-top: 36px; padding: 8px; border-radius: 14px; }
  .brand { font-size: 1.15rem; gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
}
@media (max-width: 420px) {
  dl > div { flex-direction: column; align-items: flex-start; gap: 4px; }
  dt { min-width: 0; }
  .keys, .band { padding: 20px; }
  .card { padding: 18px; }
}
@media (max-width: 900px) { .arrow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loop, .arrow, .arrow .head { animation: none; stroke-dashoffset: 0; }
  .hl { animation: none; background-size: 100% 100%; }
}
