html { scroll-behavior: smooth; }
body { background: #0a0a0a; color: #fff; font-family: 'JetBrains Mono', monospace; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1,h2,h3,h4 { font-family: 'Syne', sans-serif; }

/* Grid background */
.grid-bg { background-image: radial-gradient(circle, #1a1a1a 1px, transparent 1px); background-size: 32px 32px; }

/* Animations */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.25} }
.blink { animation: blink 1.5s ease-in-out infinite; }
@keyframes flicker { 0%{opacity:1} 50%{opacity:0.85} 100%{opacity:1} }
.flicker:hover { animation: flicker 0.12s infinite; }

/* Fade sections */
.fade-section { opacity:0; transform:translateY(20px); transition:opacity .6s ease,transform .6s ease; }
.fade-section.visible { opacity:1; transform:translateY(0); }

/* Agent cards */
.agent-card:hover { border-color: rgba(179,232,55,0.3) !important; background: #141414; }

/* FAQ */
.faq-item .faq-answer { max-height:0; overflow:hidden; transition:max-height .35s ease; }
.faq-item.open .faq-answer { max-height:400px; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-arrow { transition: transform .3s ease; display:inline-block; }

/* Sticky mobile CTA */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  background: #0a0a0a;
  border-top: 1px solid #1a1a1a;
  display: none;
}

/* Countdown min-height */
#countdown {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero title telas muito pequenas */
@media (max-width: 380px) {
  .hero-title { font-size: 2rem !important; line-height: 1.05 !important; }
}

/* Agent grid mobile */
@media (max-width: 767px) {
  .agent-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1px !important;
    background: #1a1a1a !important;
  }
  .agent-card { padding: 1.5rem !important; }
}

/* Body padding-bottom mobile (sticky CTA) */
@media (max-width: 767px) {
  body { padding-bottom: 56px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #b3e837; }

/* Fluxo de execução — layout [ barra | número | conteúdo ] */
#como-funciona .space-y-0 > .fade-section {
  display: flex !important;
  align-items: stretch !important;
  gap: 1.5rem !important;
}
/* coluna esquerda: barra + número em linha */
#como-funciona .space-y-0 > .fade-section > div:first-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 12px !important;
  width: auto !important;
  min-width: auto !important;
  flex-shrink: 0 !important;
  padding-top: 0 !important;
}
/* barra vertical: move para antes do número, estica à altura do item */
#como-funciona .space-y-0 > .fade-section > div:first-child > div {
  order: -1 !important;
  width: 2px !important;
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch !important;
  background: rgba(179,232,55,0.2) !important;
  margin-top: 0 !important;
  flex-shrink: 0 !important;
}
/* número */
#como-funciona .space-y-0 > .fade-section > div:first-child > span {
  flex-shrink: 0;
  align-self: flex-start;
  line-height: 1;
}
/* bloco de texto */
#como-funciona .space-y-0 > .fade-section > div:last-child {
  padding-top: 0 !important;
  flex: 1;
}
@media (max-width: 767px) {
  #como-funciona .space-y-0 > .fade-section {
    gap: 1rem !important;
  }
}

/* ── TERMINAL ANIMADO ── */

.sec {
  padding: 4rem 1rem;
}
@media (min-width: 640px) {
  .sec { padding: 5rem 1.5rem; }
}
.sec-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #888888;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.line-short {
  width: 40px;
  height: 1px;
  background: rgba(179,232,55,0.3);
  margin: 0 auto 20px;
}
.sec-heading {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 3rem);
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.sec-heading em { color: #b3e837; font-style: normal; }
.sec-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #888888;
  margin-bottom: 40px;
}

.terminal-wrap {
  width: 100%;
  max-width: 800px;
  position: relative;
  margin: 0 auto;
}

.top-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}
.brand {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #e8e8e8;
}
.brand em { color: #b3e837; font-style: normal; }
.live-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #b3e837;
  text-transform: uppercase;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #b3e837;
  box-shadow: 0 0 8px #b3e837;
  animation: terminal-pulse 2s ease-in-out infinite;
}
@keyframes terminal-pulse {
  0%,100% { opacity:1; box-shadow: 0 0 8px #b3e837; }
  50% { opacity:.4; box-shadow: 0 0 3px #b3e837; }
}

.terminal {
  background: #0f0f0f;
  border: 1px solid #252525;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 32px 80px rgba(0,0,0,0.7),
    0 0 80px rgba(179,232,55,0.04);
}
.titlebar {
  background: #141414;
  border-bottom: 1px solid #1e1e1e;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dots { display: flex; gap: 6px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot:nth-child(1) { background: #e85037; }
.dot:nth-child(2) { background: #e8a037; }
.dot:nth-child(3) { background: #37c237; }
.titlebar-path {
  font-size: 11px;
  color: #484848;
  flex: 1;
  text-align: center;
  letter-spacing: 0.04em;
}
.titlebar-path span { color: #b3e837; }
.titlebar-right {
  font-size: 10px;
  color: #484848;
  letter-spacing: 0.06em;
}
.tabbar {
  border-bottom: 1px solid #1e1e1e;
  padding: 0 16px;
  display: flex;
  background: #0a0a0a;
}
.tab {
  font-size: 11px;
  padding: 8px 16px;
  color: #484848;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.04em;
}
.tab.active {
  color: #b3e837;
  border-bottom-color: #b3e837;
}
.output {
  min-height: 380px;
  max-height: 460px;
  overflow-y: auto;
  padding: 18px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: #252525 transparent;
}
.output::-webkit-scrollbar { width: 3px; }
.output::-webkit-scrollbar-thumb { background: #252525; }

.line {
  font-size: 12.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0;
  transition: opacity 0.1s ease;
}
.line.visible { opacity: 1; }
.line.sys       { color: #484848; }
.line.cmd       { color: #b3e837; font-weight: 700; margin-top: 10px; }
.line.info      { color: #37d4e8; }
.line.txt       { color: #b8b8b8; font-weight: 300; }
.line.ok        { color: #b3e837; }
.line.warn      { color: #e8a037; }
.line.err       { color: #e85037; }
.line.gap       { line-height: 0.9; color: transparent; font-size: 8px; }
.line.sep       { color: #252525; font-size: 11px; }
.line.block {
  color: #b3e837;
  font-weight: 600;
  background: rgba(179,232,55,0.07);
  border-left: 2px solid #b3e837;
  padding: 3px 10px;
  margin: 6px 0 0;
}
.line.block-body {
  background: rgba(179,232,55,0.03);
  border-left: 2px solid #252525;
  padding: 2px 10px;
  color: #a0a0a0;
  font-weight: 300;
  font-size: 12px;
}

.progress-wrap {
  height: 2px;
  background: #1e1e1e;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}
.progress-wrap.visible { opacity: 1; }
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #b3e837, #d4ff4a);
  width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(179,232,55,0.4);
}

.statusbar {
  border-top: 1px solid #1e1e1e;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #141414;
}
.status-item {
  font-size: 10px;
  color: #484848;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #484848;
}
.status-item.on { color: #b3e837; }
.status-item.on .sdot { background: #b3e837; box-shadow: 0 0 6px #b3e837; }
.status-spacer { flex: 1; }

.bottom-info {
  margin-top: 14px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.info-txt {
  font-size: 11px;
  color: #484848;
  letter-spacing: 0.04em;
}
.info-txt em { color: #b3e837; font-style: normal; }
.restart-btn {
  font-size: 10px;
  color: #484848;
  background: none;
  border: 1px solid #252525;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.15s;
}
.restart-btn:hover {
  color: #b3e837;
  border-color: rgba(179,232,55,0.4);
}

/* ── MOBILE FIXES ── */
@media (max-width: 768px) {

  /* Correção 1 — Terminal mobile */
  .wrap {
    padding: 0 16px;
    max-width: 100%;
  }
  .terminal {
    border-radius: 6px;
    overflow: hidden;
  }
  .titlebar-path {
    font-size: 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
  }
  .tabbar .tab {
    font-size: 9px;
    padding: 6px 10px;
  }
  .output {
    min-height: 280px;
    max-height: 340px;
    padding: 12px 12px 8px;
  }
  .line {
    font-size: 11px;
    line-height: 1.7;
  }
  .statusbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 12px;
  }
  .status-item {
    font-size: 9px;
  }
  .bottom-info {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  /* Correção 2 — FAQ título */
  #faq .sec-heading,
  #faq h2 {
    font-size: clamp(20px, 5vw, 56px);
  }

  /* Correção 3 — CTA botão */
  .btn-primary,
  .cta-btn {
    font-size: 13px;
    padding: 16px 24px;
    white-space: nowrap;
    letter-spacing: 0.04em;
  }
}
