:root {
  --bg: #05070b;
  --ink: #f4f7ff;
  --muted: #9ea8bf;
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(14, 20, 34, 0.72);
  --teal: #29e0c0;
  --orange: #ff8a3c;
  --blue: #63adff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 20% 10%, #1a2c4d, transparent 36%),
    radial-gradient(circle at 85% 0%, #4a2228, transparent 28%),
    linear-gradient(160deg, #05070b 0%, #0a1120 64%, #05070b 100%);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

.bg-orb {
  position: fixed;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  filter: blur(72px);
  z-index: -2;
}

.orb-a {
  top: -14vw;
  left: -10vw;
  background: rgba(42, 227, 198, 0.32);
  animation: driftA 14s ease-in-out infinite;
}

.orb-b {
  right: -9vw;
  bottom: -12vw;
  background: rgba(255, 136, 62, 0.28);
  animation: driftB 16s ease-in-out infinite;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1200px, 94vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(9px);
  background: rgba(5, 8, 14, 0.62);
}

.brand {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
}

nav {
  justify-self: end;
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

main,
.footer {
  width: min(1200px, 94vw);
  margin: 0 auto;
}

section {
  margin: 5.2rem 0;
}

.hero {
  min-height: 84vh;
  display: grid;
  align-content: center;
  gap: 1.2rem;
}

.badge {
  width: fit-content;
  border: 1px solid rgba(41, 224, 192, 0.45);
  color: var(--teal);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 1.02;
  max-width: 13ch;
}

h2 {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.7rem, 4.8vw, 3rem);
  margin-bottom: 0.8rem;
}

.hero-copy,
.section-copy {
  max-width: 68ch;
  color: var(--muted);
}

.hero-cta,
.actions-row,
.stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.72rem 1.08rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #071116;
  background: linear-gradient(90deg, var(--teal), #3df1d3 42%, var(--orange));
  box-shadow: 0 12px 24px rgba(42, 226, 195, 0.28);
}

.btn-ghost {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.btn-small {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  width: min(760px, 100%);
}

.hero-metrics article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
}

.hero-metrics strong {
  display: block;
  font-size: 1.3rem;
}

.hero-metrics span {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-code {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  width: min(820px, 100%);
  background: rgba(0, 0, 0, 0.36);
}

.hero-code pre {
  margin: 0;
  padding: 1rem;
  overflow: auto;
}

.hero-code code {
  font-family: "IBM Plex Mono", monospace;
  color: #d6e1f8;
  font-size: 0.9rem;
}

.features .grid,
.demo-grid,
.download-grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.card,
.demo-panel,
.infinite-box,
.download-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  backdrop-filter: blur(8px);
  padding: 1rem;
}

.card p,
.demo-panel p,
.download-card p,
.footer p,
.muted,
small {
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

input[type="text"],
input[type="number"],
input[type="range"],
input:not([type]) {
  width: 100%;
}

input[type="text"],
input[type="number"],
input:not([type]) {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  padding: 0.62rem;
}

input[type="range"] {
  accent-color: var(--teal);
}

.stack-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.stack-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.03);
}

.stack-list.compact li {
  padding: 0.45rem 0.6rem;
}

.muted-list li {
  color: #95a4c8;
}

.price-box {
  margin-top: 0.8rem;
  border: 1px solid rgba(42, 225, 193, 0.35);
  border-radius: 12px;
  padding: 0.8rem;
  background: rgba(33, 88, 113, 0.18);
}

.price-box strong {
  display: block;
  font-size: 1.5rem;
}

.log {
  max-height: 190px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.66rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.infinite-box {
  margin-top: 1rem;
}

.infinite-list {
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  max-height: 280px;
  overflow: auto;
}

.feed-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.62rem;
  margin-bottom: 0.52rem;
}

#load-more {
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  padding: 0.7rem;
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 1.2rem 0 2.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.partner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.partner img {
  border-radius: 6px;
}

.manual-wrap {
  width: min(1240px, 94vw);
  margin: 2rem auto 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.1rem;
}

.manual-main {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 14, 26, 0.88);
  padding: 1.25rem;
}

.manual-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.8rem;
}

.manual-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.manual-aside {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 14, 26, 0.82);
  padding: 1rem;
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 94px);
  overflow: auto;
}

.manual-aside h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.manual-aside ul {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.42rem;
}

.manual-aside a {
  color: #dce5f9;
  font-size: 0.9rem;
}

.manual-prose {
  color: #d8e2f7;
}

.manual-prose h1,
.manual-prose h2,
.manual-prose h3,
.manual-prose h4 {
  font-family: "Syne", sans-serif;
  line-height: 1.2;
  margin-top: 1.4rem;
}

.manual-prose h1 {
  margin-top: 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
}

.manual-prose h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.9rem;
}

.manual-prose p,
.manual-prose li {
  line-height: 1.6;
  color: #d0dbf2;
}

.manual-prose ul,
.manual-prose ol {
  padding-left: 1.25rem;
}

.manual-prose pre {
  margin: 0.8rem 0;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  overflow: auto;
}

.manual-prose code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
}

.manual-prose :not(pre) > code {
  background: rgba(93, 138, 223, 0.18);
  border: 1px solid rgba(110, 152, 231, 0.25);
  border-radius: 7px;
  padding: 0.1rem 0.35rem;
}

.scroll-top {
  position: fixed;
  right: 26px;
  bottom: 28px;
  z-index: 45;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(17, 30, 53, 0.9), rgba(8, 14, 25, 0.92));
  color: #dce8ff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
}

/* Evita “segunda barra” visual na home mantendo os containers roláveis. */
.hero-code pre,
.log,
.infinite-list,
.manual-aside,
.manual-prose pre {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hero-code pre::-webkit-scrollbar,
.log::-webkit-scrollbar,
.infinite-list::-webkit-scrollbar,
.manual-aside::-webkit-scrollbar,
.manual-prose pre::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(22px) scale(0.99);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

@keyframes driftA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(6vw, 3vw);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-5vw, -3vw);
  }
}

@media (max-width: 980px) {
  .features .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .manual-wrap {
    grid-template-columns: 1fr;
  }

  .manual-aside {
    position: relative;
    top: 0;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto auto;
    width: 94vw;
    gap: 0.6rem;
  }

  .menu-btn {
    display: inline-flex;
    justify-self: end;
  }

  nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: none;
    flex-direction: column;
    gap: 0.6rem;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
  }

  nav.nav-open {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 1rem;
  }

  .hero-metrics,
  .features .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    align-items: start;
  }

  .scroll-top {
    right: 18px;
    bottom: 20px;
  }
}
