/* ============================================================
   VibeHarness — Landing Page (vanilla CSS, design tokens)
   ============================================================ */

:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* dark (default) */
  --bg: #0b0f17;
  --bg-alt: #0f1522;
  --surface: #131b2b;
  --surface-2: #1a2438;
  --border: #24304a;
  --text: #e6ebf5;
  --text-muted: #93a0bb;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-ink: #052e22;
  --danger: #f87171;
  --ok: #34d399;
  --terminal-bg: #0a0e16;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(52, 211, 153, 0.35);
}

[data-theme="light"] {
  --bg: #f7f9fc;
  --bg-alt: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --border: #d8e0ee;
  --text: #131c2e;
  --text-muted: #56637f;
  --accent: #059669;
  --accent-strong: #047857;
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --ok: #059669;
  --terminal-bg: #101724;
  --shadow: 0 20px 50px rgba(23, 43, 79, 0.12);
  --ring: 0 0 0 3px rgba(5, 150, 105, 0.3);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

code, pre, .terminal-body, .step-cmd, .terminal-line { font-family: var(--font-mono); }

img, svg { display: block; max-width: 100%; }
svg { height: auto; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
  font-weight: 600; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex; align-items: center; gap: 1rem;
  height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--text); font-weight: 700;
  font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand-logo { width: 28px; height: 28px; }
.logo-bg { fill: var(--surface-2); stroke: var(--border); stroke-width: 1; }
.logo-stroke { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  padding: 0.15rem 0.5rem; border-radius: 999px;
}

.nav-menu {
  margin-left: auto;
  display: flex; align-items: center; gap: 0.35rem;
}
.nav-menu a {
  text-decoration: none; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 500;
  padding: 0.45rem 0.7rem; border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-menu a:hover { color: var(--text); background: var(--surface); }
.nav-github { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-github svg { width: 16px; height: 16px; fill: currentColor; }

.theme-toggle {
  margin-left: 0.35rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  margin-left: auto;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle-bar {
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1rem;
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.7rem 0.75rem; }
  .theme-toggle { margin-left: 0; align-self: flex-start; }
  .version-badge { display: none; }
}

/* ---------------- Sections ---------------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-head h2 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.2; }
.section-sub { margin: 0; color: var(--text-muted); font-size: 1.02rem; }

/* ---------------- Hero ---------------- */
.hero {
  padding: 5rem 0 5.5rem;
  background:
    radial-gradient(900px 480px at 78% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 65%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
}
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 3.25rem 0 4rem; }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.hero .accent { color: var(--accent); }
.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 34rem;
}

/* Terminal card */
.terminal-card {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 30rem;
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0.65rem 0.9rem;
  background: color-mix(in srgb, var(--surface-2) 65%, var(--terminal-bg));
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.dot:first-child { background: #f26d6d; }
.dot:nth-child(2) { background: #f2c96d; }
.dot:nth-child(3) { background: #6dd394; }
.terminal-title { margin-left: 0.6rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }

.terminal-body { padding: 1rem 1.1rem 1.15rem; }
.terminal-line {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0; font-size: 0.92rem; color: #d7e0ef; flex-wrap: wrap;
}
.terminal-line code { color: #d7e0ef; }
.prompt { color: var(--accent); font-weight: 700; }

.copy-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-check { display: none; }
.copy-btn.copied { color: var(--ok); border-color: var(--ok); }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: inline; }

/* Buttons */
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-actions.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  padding: 0.75rem 1.35rem; border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; display: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary.copied { background: var(--ok); color: var(--accent-ink); }
.btn-primary.copied svg { display: inline; }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero-note { margin-top: 1.25rem; color: var(--text-muted); font-size: 0.88rem; }

/* Simulator window */
.sim-window {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sim-body {
  padding: 1.1rem 1.2rem 1.3rem;
  min-height: 320px;
  font-size: 0.83rem;
  line-height: 1.85;
  color: #c8d3e6;
}
.sim-body .sim-prompt { color: var(--accent); font-weight: 700; }
.sim-body .sim-ok { color: var(--ok); }
.sim-body .sim-dim { color: var(--text-muted); }
.sim-body .sim-warn { color: #f2c96d; }
.sim-body .sim-score { color: var(--ok); font-weight: 700; }
.sim-cursor {
  display: inline-block; width: 8px; height: 1.1em;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- Problema vs Solução ---------------- */
.vs-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
@media (max-width: 820px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-divider { padding: 0.25rem 0; }
  .vs-divider span { transform: rotate(90deg); display: inline-block; }
}
.vs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.vs-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.vs-card h3 { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 1rem; font-size: 1.1rem; }
.vs-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vs-problem { border-top: 3px solid var(--danger); }
.vs-problem .vs-icon { color: var(--danger); }
.vs-solution { border-top: 3px solid var(--ok); }
.vs-solution .vs-icon { color: var(--ok); }
.vs-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.vs-card li { padding-left: 1.4rem; position: relative; color: var(--text-muted); font-size: 0.95rem; }
.vs-card li::before { content: "·"; position: absolute; left: 0; top: -0.15em; font-weight: 800; }
.vs-problem li::before { color: var(--danger); content: "✕"; font-size: 0.75em; top: 0.05em; }
.vs-solution li::before { color: var(--ok); content: "✓"; font-size: 0.85em; top: 0.02em; }
.vs-card code { background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 5px; font-size: 0.85em; color: var(--text); }

.vs-divider {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 0.8rem;
}
.vs-divider span {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.3rem 0.8rem;
}

/* ---------------- Como funciona (steps) ---------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 0; padding: 0; list-style: none;
  counter-reset: step;
}
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1.4rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: var(--shadow); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 800; font-size: 0.95rem;
  margin-bottom: 0.9rem;
}
.step h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.step-cmd {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.step p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---------------- Ecossistema ---------------- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 820px) { .eco-grid { grid-template-columns: repeat(2, 1fr); } }
.eco-card {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem; font-weight: 500;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.eco-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.eco-dot {
  flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem;
  color: #0b0f17;
  background: var(--c, var(--accent));
}

/* ---------------- FAQ ---------------- */
.faq { display: grid; gap: 0.75rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  padding: 1rem 2.6rem 1rem 1.25rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 1.1rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.2rem; font-weight: 600;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: 0; padding: 0 1.25rem 1.15rem; color: var(--text-muted); font-size: 0.94rem; }
.faq-item code { background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 5px; font-size: 0.85em; color: var(--text); }

/* ---------------- CTA final ---------------- */
.cta-final {
  background:
    radial-gradient(700px 380px at 50% 120%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    var(--bg);
  text-align: center;
}
.cta-final-inner h2 { margin: 0 0 0.5rem; font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.02em; }
.cta-final-inner p { margin: 0 0 1.75rem; color: var(--text-muted); }

/* ---------------- Footer ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: flex; justify-content: space-between; gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 22rem; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; color: var(--text-muted); font-size: 0.82rem; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
