/* ==========================================================================
   Homepage — estilos específicos de index.php
   Requer homepage-shared.css carregado antes.
   ========================================================================== */

html, body { max-width: 100%; }

.btn { max-width: 100%; }
.btn-block { width: 100%; }

@media (max-width: 860px) {
  .topbar-cta-btn { display: none; }
}

@media (max-width: 400px) {
  .topbar-actions {
    flex-direction: column;
    gap: 8px;
  }
  .topbar-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

/* ── Hero ── */
.hero {
  padding: 84px 0 60px;
  background: linear-gradient(180deg, #f7f8ff 0%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero { padding: 40px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .eyebrow-trail { display: none !important; }
}

.hero-grid > * { min-width: 0; }

.eyebrow-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.eyebrow-trail span:not(:last-child)::after {
  content: '·';
  margin-left: 10px;
  color: #c3caf0;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.5px;
  margin-bottom: 20px;
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 30px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

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

@media (max-width: 400px) {
  .hero-desc { font-size: 15px; }
  .hero-cta { flex-direction: column; gap: 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

.hero-refund {
  font-size: 13px;
  color: #2f9e5c;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 960px) {
  .hero-refund { font-size: 11px; }
}

/* Playground card */
.playground {
  background: #0b0e2d;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(11,14,45,.45);
  max-width: 100%;
  min-width: 0;
}

.playground-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #12153f;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.playground-method {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Roboto Mono', monospace;
  font-size: 12.5px;
}

.playground-method .verb {
  background: #157a41;
  color: #fff;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.playground-method .path { color: rgba(255,255,255,.85); }

.playground-tag {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.playground pre {
  margin: 0;
  padding: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: #d7e0ff;
  overflow-x: auto;
  max-width: 100%;
}

@media (max-width: 400px) {
  .playground pre { font-size: 11px; padding: 14px; }
  .playground-bar { padding: 10px 12px; }
}

.playground pre .k { color: #7fb2ff; }
.playground pre .s { color: #b6f2c9; }
.playground pre .n { color: #ffd479; }

/* ── Sections shared (specifics) ── */
section { padding: 76px 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.25;
}

/* ── Agitação (foco em velocidade de time) ── */
.agitation {
  background: linear-gradient(135deg, #0b0e2d 0%, #1a1060 60%, #2c0b6e 100%);
  border-radius: 20px;
  padding: 56px 40px;
  color: #fff;
  text-align: center;
}

.agitation h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 800;
  max-width: 700px;
  margin: 0 auto 16px;
  line-height: 1.28;
}

.agitation p {
  color: rgba(255,255,255,.65);
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 15.5px;
}

.agitation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

@media (max-width: 860px) {
  .agitation { padding: 44px 24px; }
  .agitation-grid { grid-template-columns: 1fr; }
}

.agitation-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 22px;
}

.agitation-card i {
  color: #a78bfa;
  font-size: 18px;
  margin-bottom: 12px;
  display: block;
}

.agitation-card h3 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}

.agitation-card p {
  font-size: 13.5px;
  color: rgba(255,255,255,.6);
  margin: 0;
  max-width: none;
}

/* ── Why API vs scraping ── */
.compare-wrap { overflow-x: auto; }

table.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
}

table.compare th, table.compare td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  text-align: left;
}

table.compare th {
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--ink-soft);
}

table.compare th.col-us {
  color: var(--brand-blue);
}

table.compare td.yes { color: #1c7a40; font-weight: 700; }
table.compare td.no { color: #c94b4b; font-weight: 700; }

/* ── How it works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.step p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
}

/* ── MCP ── */
.mcp-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, #0b0e2d 0%, #14103f 100%);
  border-radius: 20px;
  padding: 52px;
  color: #fff;
  overflow: hidden;
}

@media (max-width: 960px) {
  .mcp-panel { grid-template-columns: 1fr; padding: 36px 24px; gap: 32px; }
}

@media (max-width: 400px) {
  .mcp-panel { padding: 28px 16px; border-radius: 14px; }
  .mcp-cta { flex-direction: column; gap: 10px; }
  .mcp-cta .btn, .mcp-cta .btn-mcp-outline { width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .mcp-chat-badge { font-size: 11.5px; }
}

.btn-text-mobile { display: none; }
@media (max-width: 960px) {
  .btn-text-desktop { display: none; }
  .btn-text-mobile { display: inline; }
}

.mcp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mcp-eyebrow i {
  -webkit-text-fill-color: initial;
  color: #a78bfa;
  font-size: .75em;
}

.mcp-panel h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
}

.mcp-panel p.mcp-desc {
  color: rgba(255,255,255,.65);
  font-size: 15px;
  margin-bottom: 24px;
  max-width: 480px;
}

.mcp-chat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.mcp-chat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}

.mcp-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-mcp-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 6px;
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none !important;
  transition: border-color .2s, background .2s;
  max-width: 100%;
}

.btn-mcp-outline:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.06); }

.mcp-terminal {
  background: #05060f;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.mcp-terminal-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: #0d0f26;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.mcp-terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
}

.mcp-terminal-body {
  padding: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 11.5px;
  line-height: 1.75;
  height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 400px) {
  .mcp-terminal-body { font-size: 10.5px; padding: 14px; height: 280px; }
}

.mcp-line-user { color: rgba(255,255,255,.5); min-height: 1.9em; }
.mcp-line-user b { color: #fff; }
.mcp-line-tool { color: #7fb2ff; margin-top: 10px; min-height: 1.9em; }
.mcp-line-tool .fn { color: #ffd479; }
.mcp-line-result { color: #b6f2c9; white-space: pre-wrap; margin-top: 6px; min-height: 1.9em; }
.mcp-line-answer { color: #fff; white-space: pre-wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.15); min-height: 1.9em; }
.mcp-line-answer::before { content: "IA: "; color: #7fb2ff; }

#mcp-typewriter .caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: #b6f2c9;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: mcp-blink 1s step-end infinite;
}

@keyframes mcp-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Endpoints grid ── */
.endpoints-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .endpoints-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.endpoint-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

.endpoint-card i {
  color: var(--brand-blue);
  font-size: 18px;
  margin-bottom: 10px;
  display: block;
}

.endpoint-card h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.endpoint-card p {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 0;
}

.endpoint-card code {
  display: inline-block;
  margin-top: 8px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--brand-blue);
  font-family: 'Roboto Mono', monospace;
}

/* ── Stats bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

@media (max-width: 700px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
}

/* ── Free Tier Callout ── */
.free-tier-callout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px auto 16px;
  padding: 18px 24px;
  max-width: 580px;
  background: rgba(47, 158, 92, 0.06);
  border: 1px solid rgba(47, 158, 92, 0.15);
  border-radius: 14px;
  text-align: left;
}
@media (max-width: 600px) {
  .free-tier-callout {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px;
  }
}
.free-tier-callout .ft-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #2f9e5c, #227b45);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(47,158,92,.25);
}
.free-tier-callout .ft-text strong {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.free-tier-callout .ft-text span {
  display: block;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 3px;
}

/* ── Pricing ── */
.pricing-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 44px;
}

/* .pricing-grid grid-template-columns é definido inline no PHP (depende de count($paid_plans)) */
.pricing-grid {
  display: grid;
  gap: 20px;
}

@media (max-width: 1000px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 620px) {
  .pricing-grid { grid-template-columns: 1fr !important; }
}

.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card.featured {
  border: 2px solid var(--brand-blue);
  box-shadow: 0 20px 40px -16px rgba(23,90,226,.35);
}

.price-card.featured .price-badge {
  position: absolute;
  top: -13px;
  left: 24px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 5px 12px;
  border-radius: 50px;
}

.price-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.price-old {
  font-size: 13px;
  color: #6b7093;
  text-decoration: line-through;
}

.price-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}

.price-value .curr { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.price-value .num { font-family: 'Montserrat', sans-serif; font-size: 2.4rem; font-weight: 800; }
.price-value .per { font-size: 13px; color: var(--ink-soft); }

.price-credits {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13.5px;
  padding: 6px 0;
  color: var(--ink);
}

.price-features li.off { color: #6b7093; }

.price-features i { margin-top: 3px; font-size: 12px; }
.price-features li:not(.off) i { color: #1c7a40; }
.price-features li.off i { color: #8a8fb0; }

/* ── Final CTA (specifics) ── */
.final-cta { padding: 60px 32px; }
.final-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* ── Contact anti-bot modal ── */
.contact-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,14,45,.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.contact-modal-overlay.open { display: flex; }

.contact-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 26px;
  max-width: 360px;
  width: 100%;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(11,14,45,.45);
}

.contact-modal h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--ink);
}

.contact-modal p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; }

.contact-modal-question {
  font-weight: 700;
  font-size: 16px !important;
  color: var(--ink) !important;
}

.contact-modal-row { display: flex; gap: 10px; margin-bottom: 10px; }

.contact-modal-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.contact-modal-row .btn { padding: 10px 16px; font-size: 14px; }

.contact-modal-error, .contact-modal-result { display: none; margin: 0; }
.contact-modal-error.show { display: block; color: #d64545; }
.contact-modal-result.show { display: block; color: var(--ink); font-weight: 700; }
.contact-modal-result a { color: var(--brand-blue); }

.contact-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}
