/* =========================================================================
   Nexus Gestão — Contract Flow · Landing
   ========================================================================= */

:root {
  --bg: #07090f;
  --bg-elev: #0d1220;
  --bg-card: rgba(255, 255, 255, 0.025);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --text: #e9edf5;
  --text-muted: #97a0b4;
  --text-dim: #6b7280;
  --primary: #6dd3a8;       /* spring green */
  --primary-2: #4fb88c;
  --accent: #7ea9ff;        /* soft blue */
  --accent-2: #5b8dee;
  --warn: #ffb86b;
  --err: #ff7373;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Background decoration ============================================ */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 0%, rgba(109, 211, 168, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(126, 169, 255, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(126, 169, 255, 0.06) 0%, transparent 60%),
    var(--bg);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.6;
}

/* ===== Nav ============================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 9, 15, 0.6);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #0a0e1a;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 18px -4px rgba(109, 211, 168, 0.5);
}
.brand-mark.sm { width: 28px; height: 28px; font-size: 0.72rem; border-radius: 7px; }

.brand-dot { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* ===== Buttons ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-sm { padding: 8px 14px; font-size: 0.86rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #06120c;
  box-shadow: 0 8px 28px -8px rgba(109, 211, 168, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -10px rgba(109, 211, 168, 0.7); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border-strong); }

/* ===== Hero ============================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 96px 0 80px;
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 40px; }
}

.hero-inner { max-width: 640px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(109, 211, 168, 0.08);
  border: 1px solid rgba(109, 211, 168, 0.25);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(109, 211, 168, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 211, 168, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(109, 211, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 211, 168, 0); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 36px;
  line-height: 1.65;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ===== Hero visual (terminal) =========================================== */
.hero-visual { display: flex; justify-content: flex-end; }

.terminal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 30px 80px -30px rgba(126, 169, 255, 0.25);
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}
.terminal:hover { transform: rotate(0deg) translateY(-4px); }

.term-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #555;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.term-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.term-body {
  margin: 0;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  overflow-x: auto;
}

.ks { color: #7ea9ff; }   /* key */
.cs { color: #6dd3a8; }   /* string */
.cn { color: #ffb86b; }   /* number */
.ck { color: #c0c5ce; }   /* bracket */
.cm { color: #6b7280; font-style: italic; }  /* comment */

/* ===== Sections ========================================================= */
.section {
  padding: 90px 0;
}
@media (max-width: 720px) { .section { padding: 64px 0; } }

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.section-head h2 code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--primary);
  background: rgba(109, 211, 168, 0.08);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
}

/* ===== Feature cards ==================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.22s ease;
}
.card:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.card p code,
.endpoint code,
.section-head h2 code,
.hero-sub code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ===== Stack grid ======================================================= */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }

.tech {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
}
.tech:hover {
  border-color: rgba(109, 211, 168, 0.4);
  background: rgba(109, 211, 168, 0.04);
}

.tech-name {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
}

.tech-tag {
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== API endpoints ==================================================== */
.api-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .api-grid { grid-template-columns: 1fr; } }

.api-group {
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.api-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 600;
  font-size: 1.02rem;
}

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-pub  { background: rgba(126, 169, 255, 0.12); color: var(--accent); }
.pill-auth { background: rgba(255, 184, 107, 0.12); color: var(--warn); }

.endpoint {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.endpoint:first-of-type { border-top: none; padding-top: 14px; }

.verb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-align: center;
}
.verb.get  { background: rgba(126, 169, 255, 0.14); color: var(--accent); }
.verb.post { background: rgba(109, 211, 168, 0.14); color: var(--primary); }
.verb.put  { background: rgba(255, 184, 107, 0.14); color: var(--warn); }
.verb.del  { background: rgba(255, 115, 115, 0.14); color: var(--err); }

.endpoint code {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text);
  background: transparent;
  padding: 0;
}

.ep-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: right;
}

@media (max-width: 600px) {
  .endpoint { grid-template-columns: 56px 1fr; }
  .ep-desc  { grid-column: 1 / -1; text-align: left; padding-left: 68px; }
}

/* ===== Code showcase ==================================================== */
.code-showcase {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.tab {
  flex: 0 0 auto;
  padding: 12px 22px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.code-block {
  margin: 0;
  padding: 26px 28px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.75;
  overflow-x: auto;
}
.code-block.hidden { display: none; }

/* ===== Arquitetura ====================================================== */
.arch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 760px) { .arch { grid-template-columns: 1fr; } }

.layer {
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  grid-column: 1;
}

.layer-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.layer-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.layer-db {
  background: linear-gradient(135deg, rgba(109, 211, 168, 0.08), rgba(126, 169, 255, 0.08));
  border-color: rgba(109, 211, 168, 0.3);
}

.arch-arrow {
  grid-column: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 1.2rem;
  user-select: none;
}

.arch-side {
  grid-column: 2;
  grid-row: 1 / 8;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

@media (max-width: 760px) {
  .arch-side { grid-column: 1; grid-row: auto; margin-top: 24px; }
}

.side-item {
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.side-item strong { color: var(--text); }

/* ===== CTA section ====================================================== */
.cta-section {
  text-align: center;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 32px;
  background: linear-gradient(135deg, rgba(109, 211, 168, 0.06), rgba(126, 169, 255, 0.06));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.cta-inner h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-inner p {
  color: var(--text-muted);
  margin: 0 0 28px;
}

.cta-inner .hero-cta { justify-content: center; margin-bottom: 0; }

/* ===== Footer =========================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-meta a:hover { color: var(--text); }

.dot-sep { opacity: 0.5; }
