/* Mobile-first styling for API MIX Connect */

:root {
  --bg-body: #050816;
  --bg-section: #0b1020;
  --bg-section-alt: #050816;
  --accent: #46a6ff;
  --accent-soft: #3be4b2;
  --text-main: #f5f7fb;
  --text-muted: #a0a7c4;
  --border-soft: rgba(255, 255, 255, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top, #151c3b 0, #050816 45%, #02030a 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* Topbar - mobile first */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 8, 22, 0.96),
    rgba(5, 8, 22, 0.9)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  object-fit: cover;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text-main {
  font-size: 0.9rem;
}

.logo-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-soft);
}

/* Hamburger */

.nav-toggle {
  width: 36px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 8, 22, 0.9);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f5f7fb;
}

/* Nav - mobile */

.nav {
  position: fixed;
  inset: 56px 0 auto 0;
  background: rgba(5, 8, 22, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
  padding: 10px 4%;
  gap: 4px;
}

.nav a {
  color: var(--text-muted);
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 0.92rem;
}

.nav a:hover {
  background: rgba(70, 166, 255, 0.12);
  color: #fff;
}

.nav.nav-open {
  transform: translateY(0);
  opacity: 1;
}

/* Hero - mobile first */

.hero {
  padding: 24px 0 32px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-text h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #46a6ff, #3be4b2);
  color: #050816;
  box-shadow: 0 12px 30px rgba(70, 166, 255, 0.4);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(70, 166, 255, 0.55);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e6ff;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn.full {
  width: 100%;
}

.hero-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: #8189b0;
}

.hero-card {
  background: radial-gradient(circle at top left, #202b52, #070b18 55%);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(5, 8, 22, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: #9ba3c8;
}

.hero-card-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.hero-card-header .red {
  background: #ff5f57;
}
.hero-card-header .yellow {
  background: #febc2e;
}
.hero-card-header .green {
  background: #27c93f;
}

.hero-card-title {
  margin-left: auto;
}

.code-block {
  margin: 0;
  padding: 14px 14px 16px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  color: #e4e8ff;
  overflow-x: auto;
  background: radial-gradient(circle at top, rgba(10, 16, 40, 0.9), #050816);
}

.code-block.small {
  font-size: 0.76rem;
}

/* Sections genéricas - mobile */

.section {
  padding: 32px 0;
  background: var(--bg-section);
}

.section.alt {
  background: var(--bg-section-alt);
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Cards e grids - mobile */

.grid-3,
.grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.card {
  background: radial-gradient(circle at top, #151b38, #060916 65%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 16px 16px 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.card h3 {
  margin-top: 0;
  font-size: 1rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Integrações */

.integrations .integration-card {
  text-align: left;
}

.icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.icon-circle.wa {
  background: linear-gradient(135deg, #00e676, #00c853);
}
.icon-circle.ig {
  background: linear-gradient(135deg, #ff9800, #e91e63);
}
.icon-circle.ms {
  background: linear-gradient(135deg, #2196f3, #2962ff);
}
.icon-circle.tg {
  background: linear-gradient(135deg, #29b6f6, #0288d1);
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.step {
  background: radial-gradient(circle at top, #151b38, #050816 70%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 16px 16px 18px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #46a6ff, #3be4b2);
  color: #050816;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Docs */

.docs-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.list li {
  padding: 4px 0;
}

.docs-cta {
  margin-top: 20px;
}

.docs-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Contato */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: flex-start;
}

.contact-form {
  background: radial-gradient(circle at top, #141b3a, #050816);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-soft);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 0.86rem;
  color: #c2c7e5;
}

input,
textarea {
  background: rgba(5, 9, 26, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 9px 10px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(70, 166, 255, 0.5);
}

textarea {
  resize: vertical;
}

.form-note {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-note a {
  color: var(--accent);
}

/* Footer */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px 0 22px;
  background: #030510;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  color: #858bb0;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  color: #aeb4da;
}

.footer-links a:hover {
  color: #fff;
}

/* Termos / Política pages */

.legal-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #151b38, #050816 55%);
  color: var(--text-main);
  padding-bottom: 32px;
}

.legal-header {
  padding: 16px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.legal-badge {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legal-content {
  padding-top: 18px;
  max-width: 760px;
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-content h2 {
  color: #e4e8ff;
  font-size: 1.05rem;
  margin-top: 16px;
}

.legal-content p {
  line-height: 1.6;
}

.legal-content ul {
  padding-left: 18px;
}

/* ====== Breakpoints maiores ====== */

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .topbar-inner {
    padding: 12px 0;
  }

  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    transform: translateY(0);
    opacity: 1;
    border-bottom: none;
    background: transparent;
    flex-direction: row;
    padding: 0;
    gap: 16px;
  }

  .nav a {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .nav a:hover {
    background: rgba(70, 166, 255, 0.1);
  }

  .hero {
    padding: 56px 0 40px;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .hero-text h1 {
    font-size: 2.3rem;
  }

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

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

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

  .docs-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }

  .contact {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  }
}

@media (min-width: 1024px) {
  .hero-text h1 {
    font-size: 2.6rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }
}
