/* ── Reset & tokens ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #18181b;
  --ink-2:      #52525b;
  --ink-3:      #a1a1aa;
  --paper:      #fafaf9;
  --paper-2:    #f4f4f5;
  --border:     #e4e4e7;
  --accent:     #b45309;        /* âmbar escuro — distintivo, não azul genérico */
  --accent-bg:  #fffbeb;
  --accent-dim: #92400e;
  --green:      #15803d;
  --green-bg:   #f0fdf4;
  --red:        #b91c1c;
  --red-bg:     #fef2f2;
  --yellow:     #a16207;
  --yellow-bg:  #fefce8;

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;

  --font-sans:  "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:     0 4px 12px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
}

html { scroll-behavior: smooth; font-size: 17px; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--ink-2); max-width: 62ch; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

section { padding-block: 5rem; }
section + section { border-top: 1px solid var(--border); }

/* ── Navigation ──────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,249,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--ink-2);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: none;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #27272a; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--ink-2); background: var(--paper-2); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dim); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
#hero {
  padding-top: 6rem;
  padding-bottom: 5rem;
  border-top: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-visual {
  position: relative;
}

.api-card {
  background: #18181b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06);
}

.api-card-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.api-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.api-card-title {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: #71717a;
  margin-left: .25rem;
}

.api-card-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.75;
  color: #a1a1aa;
}

.api-card-body .method   { color: #86efac; font-weight: 600; }
.api-card-body .path     { color: #e4e4e7; }
.api-card-body .divider  { border: none; border-top: 1px solid rgba(255,255,255,.07); margin: .75rem 0; }
.api-card-body .key      { color: #93c5fd; }
.api-card-body .str-val  { color: #fde68a; font-weight: 600; }
.api-card-body .num-val  { color: #a5f3fc; }
.api-card-body .bool-val { color: #86efac; }
.api-card-body .brace    { color: #71717a; }

.auth-message {
  font-size: .9rem;
  color: var(--ink-2);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.auth-alert-error {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fca5a5;
}

.api-badge {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  background: var(--paper);
  color: var(--ink-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-bg);
  color: var(--accent);
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .9rem;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero-title { margin-bottom: 1.25rem; }
.hero-title em { font-style: normal; color: var(--accent); }

.hero-desc {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stat-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.hero-stat span { font-size: .85rem; color: var(--ink-3); }

/* ── Pipeline ────────────────────────────────────────────────────────────── */
#pipeline .section-header { margin-bottom: 3rem; }

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 700px) {
  .pipeline-grid { grid-template-columns: 1fr; }
}

.pipeline-step {
  background: var(--paper);
  padding: 1.75rem;
  position: relative;
}

.pipeline-step:last-child::after { display: none; }

.step-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  text-align: center;
  line-height: 28px;
  margin-bottom: 1rem;
}

.step-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: .35rem;
}

.pipeline-step h4 { margin-bottom: .4rem; }
.pipeline-step p { font-size: .9rem; max-width: none; }

/* ── Features ────────────────────────────────────────────────────────────── */
#features { background: var(--paper-2); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.feature-marker {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 1.1rem;
}

.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { font-size: .95rem; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: 1.5rem;
}

.price-value {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.price-currency { font-size: 1.5rem; font-weight: 700; color: var(--ink-2); }
.price-unit { font-size: .9rem; color: var(--ink-3); }

.price-breakdown {
  list-style: none;
  margin-bottom: 2rem;
}

.price-breakdown li {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--ink-2);
  padding-block: .5rem;
  border-bottom: 1px solid var(--border);
}
.price-breakdown li:last-child { border-bottom: none; }
.price-breakdown .price-row-total {
  font-weight: 700;
  color: var(--ink);
  padding-top: .75rem;
}

.pricing-note {
  font-size: .85rem;
  color: var(--ink-3);
  margin-top: 1rem;
  line-height: 1.5;
}

.pricing-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.pricing-copy h2 { margin-bottom: 1rem; }
.pricing-copy p { margin-bottom: 1rem; }

.check-list {
  list-style: none;
  margin-top: 1.5rem;
}
.check-list li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  color: var(--ink-2);
  font-size: .95rem;
  padding-block: .35rem;
}
.check-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Demo ────────────────────────────────────────────────────────────────── */
#demo { background: var(--paper-2); }

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}

.demo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: var(--paper);
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.demo-upload-area:hover,
.demo-upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.upload-graphic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-graphic svg { color: var(--ink-3); }

.upload-label { font-size: .9rem; color: var(--ink-2); }
.upload-label strong { color: var(--ink); display: block; margin-bottom: .25rem; }
.upload-hint { font-size: .8rem; color: var(--ink-3); }

.demo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.demo-preview {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  max-height: 280px;
  display: none;
}

#demo-submit {
  width: 100%;
  margin-top: 1rem;
  padding: .75rem;
  font-size: 1rem;
  justify-content: center;
  border-radius: var(--radius-sm);
}

#demo-submit:disabled { opacity: .5; cursor: not-allowed; }

.demo-result-panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-idle {
  text-align: center;
  color: var(--ink-3);
}

.result-idle p { font-size: .9rem; color: var(--ink-3); max-width: none; }

.result-loading {
  text-align: center;
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.result-data { display: none; }

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border-radius: var(--radius-sm);
  padding: .4rem 1rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.badge-adult   { background: var(--green-bg); color: var(--green); }
.badge-minor   { background: var(--red-bg);   color: var(--red); }
.badge-unclear { background: var(--yellow-bg); color: var(--yellow); }
.badge-error   { background: var(--red-bg);    color: var(--red); }

.result-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: .5rem;
}

.result-meta-item { background: var(--paper-2); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.result-meta-item .meta-label { font-size: .75rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }
.result-meta-item .meta-value { font-size: 1.25rem; font-weight: 700; color: var(--ink); }

.result-timing { font-size: .8rem; color: var(--ink-3); margin-top: 1.25rem; }

.demo-blocked {
  text-align: center;
  padding: 2rem;
  display: none;
}

.demo-blocked h3 { margin-bottom: .75rem; }
.demo-blocked p { font-size: .95rem; }

/* ── Section header ──────────────────────────────────────────────────────── */
.section-header { margin-bottom: 2rem; }
.section-header .eyebrow {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .5rem;
}
.section-header h2 { margin-bottom: .75rem; }
.section-header p { font-size: 1rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

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

.footer-inner p { font-size: .85rem; color: var(--ink-3); max-width: none; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .85rem; color: var(--ink-3); }
.footer-links a:hover { color: var(--ink-2); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pricing-layout,
  .demo-layout { grid-template-columns: 1fr; }

  .pipeline-grid { grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-actions .btn-outline { display: none; }
  .nav-actions .btn-primary { padding: .5rem .9rem; font-size: .85rem; }

  .hero-stat-row { gap: 1.5rem; }

  section { padding-block: 3.5rem; }
}

/* ── Docs page ───────────────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 5rem;
}

.docs-nav-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: .75rem;
}

.docs-nav-list {
  list-style: none;
  border-left: 2px solid var(--border);
}

.docs-nav-list li a {
  display: block;
  padding: .35rem .75rem;
  font-size: .9rem;
  color: var(--ink-2);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all .15s;
}

.docs-nav-list li a:hover,
.docs-nav-list li a.active {
  color: var(--ink);
  border-left-color: var(--accent);
  text-decoration: none;
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.docs-content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.docs-content h3 { font-size: 1.05rem; margin-top: 1.75rem; margin-bottom: .6rem; }
.docs-content p  { margin-bottom: 1rem; }
.docs-content ul { margin: .5rem 0 1rem 1.5rem; }
.docs-content ul li { margin-bottom: .35rem; color: var(--ink-2); font-size: .95rem; }

.code-block {
  background: #18181b;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  position: relative;
  overflow: hidden;
}

.code-block .code-lang {
  position: absolute;
  top: .65rem;
  right: .85rem;
  font-size: .68rem;
  color: #52525b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  z-index: 1;
  font-family: var(--font-mono);
}

/* Prism integration — override its defaults to match our wrapper */
.code-block pre[class*="language-"],
.code-block pre {
  margin: 0 !important;
  padding: 1.25rem 1.5rem !important;
  background: transparent !important;
  border-radius: 0 !important;
  font-size: .82rem !important;
  line-height: 1.75 !important;
  overflow-x: auto;
}

/* Fallback for plain <code> without Prism (e.g. single-line) */
.code-block > code {
  display: block;
  padding: 1.25rem 1.5rem;
  color: #e4e4e7;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.75;
  white-space: pre;
  overflow-x: auto;
}

.inline-code {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .4em;
  font-size: .85em;
  color: var(--accent-dim);
}

.badge-method {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge-post { background: #dcfce7; color: #166534; }
.badge-get  { background: #dbeafe; color: #1d4ed8; }

.endpoint-box {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-mono);
  font-size: .9rem;
  margin: .75rem 0 1.25rem;
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 1rem 0;
}

.error-table th {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 2px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
}

.error-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink-2);
  vertical-align: top;
}

.error-table tr:last-child td { border-bottom: none; }

.error-table td:first-child {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--red);
}

.error-table td:nth-child(2) {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
}
