/* Zergboard mini-site — shared design system
   Tokens mirror Zerg AI design system (warm cream + black + orange accent). */

:root {
  --bg: #f4f0e7;
  --bg-card: #fffaf0;
  --ink: #111514;
  --muted: #41504c;
  --muted-2: #6b766f;
  --accent: #b3662f;
  --accent-hi: #d57a32;
  --border: rgba(17, 21, 20, 0.15);
  --border-soft: rgba(17, 21, 20, 0.10);
  --border-strong: rgba(17, 21, 20, 0.30);
  --shadow: 0 30px 80px rgba(17, 21, 20, 0.14);
  --grid-line: rgba(17, 21, 20, 0.06);
  --max: 1280px;
  --radius: 2rem;
  --radius-sm: 0.75rem;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }

/* ───── Typography ───── */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: var(--accent);
  margin: 0 0 1rem 0;
}
h1, h2, h3, h4 {
  color: var(--ink);
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}
h1.hero {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.98;
  font-size: clamp(2.9rem, 5.8vw, 5.6rem);
  margin: 0 0 1.5rem 0;
}
h2 {
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h3 {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
}
h4 {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}
.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 60ch;
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-card);
}

/* ───── Buttons ───── */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  padding: 1rem 1.5rem;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent-hi); color: var(--ink); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--ink); background: var(--bg-card); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ───── Layout ───── */
section { padding: 5rem 0; border-top: 1px solid var(--border-soft); }
section.hero-section { padding: 6rem 0 5rem; border-top: 0; }
section.tight { padding: 3.5rem 0; }
.grid-2 { display: grid; gap: 2rem; }
.grid-3 { display: grid; gap: 1.5rem; }
.grid-4 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .hero-grid { grid-template-columns: 1.02fr 0.98fr; align-items: end; }
}

/* ───── Cards ───── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.card-tight { padding: 1.25rem; border-radius: 1.25rem; box-shadow: 0 12px 30px rgba(17, 21, 20, 0.08); }
.card h3 { margin-top: 0.5rem; }
.card p { color: var(--muted); margin: 0; }

/* ───── Nav ───── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 231, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-weight: 700;
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 4px;
  border-radius: 3px;
  background: var(--accent-hi);
}
.nav-links {
  display: none;
  gap: 1.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-cta { display: flex; gap: 0.5rem; }
.nav-cta .btn { padding: 0.65rem 1rem; }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* ───── Hero ───── */
.hero-section .lead { margin-bottom: 2rem; }
.hero-visual {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  min-height: 380px;
}

/* Mock board (used in hero + features) */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  height: 100%;
}
.col {
  background: rgba(244, 240, 231, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 0.85rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 320px;
}
.col-head {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}
.col-count {
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.6rem;
}
.task {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 0.6rem;
  padding: 0.6rem 0.7rem;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 4px 10px rgba(17, 21, 20, 0.04);
}
.task .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.p1 { background: var(--accent-hi); }
.dot.p2 { background: #4a8fc6; }
.dot.p3 { background: #6b766f; }
.avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-hi);
  border: 1.5px solid var(--bg-card);
  display: inline-block;
}
.avatar.b { background: #4a8fc6; }
.avatar.c { background: #41504c; }

/* ───── Logos / proof strip ───── */
.proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--muted-2);
}
.proof-item { opacity: 0.7; }

/* ───── Stats ───── */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  padding: 2.5rem 0;
}
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.stat .label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.24em; color: var(--muted-2); margin-top: 0.5rem; }

/* ───── Comparison table ───── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare-table th, .compare-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.95rem;
}
.compare-table th {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-2);
  background: rgba(17, 21, 20, 0.03);
  font-weight: 600;
}
.compare-table th.us { color: var(--accent); }
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table .check { color: var(--accent); font-weight: 700; }
.compare-table .x { color: var(--muted-2); }
.compare-table td.us-cell { background: rgba(213, 122, 50, 0.06); font-weight: 600; }

/* ───── Pricing ───── */
.price-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow);
}
.price-card.featured { border-color: var(--ink); position: relative; }
.price-card.featured::before {
  content: "Most popular";
  position: absolute;
  top: -12px; left: 2rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
.price-card .name { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.32em; color: var(--accent); }
.price-card .price { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.03em; }
.price-card .price small { font-size: 0.95rem; color: var(--muted-2); font-weight: 500; letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.price-card li { padding-left: 1.5rem; position: relative; color: var(--muted); font-size: 0.95rem; }
.price-card li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ───── Code blocks ───── */
.code {
  background: var(--ink);
  color: #f4f0e7;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.code .k { color: var(--accent-hi); }
.code .s { color: #c9d6cb; }
.code .c { color: var(--muted-2); }
.code .n { color: #e5d9b7; }

/* ───── FAQ ───── */
.faq details {
  border-bottom: 1px solid var(--border-soft);
  padding: 1.25rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.4rem;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0.75rem 0 0 0; }

/* ───── CTA banner ───── */
.cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta h2 { color: var(--bg); }
.cta .lead { color: rgba(244, 240, 231, 0.75); margin: 1rem auto 2rem; }
.cta .btn-primary { background: var(--accent-hi); color: var(--ink); border-color: var(--accent-hi); }
.cta .btn-primary:hover { background: var(--bg); border-color: var(--bg); }
.cta .btn-secondary { color: var(--bg); border-color: rgba(244, 240, 231, 0.4); }
.cta .btn-secondary:hover { border-color: var(--bg); background: rgba(244, 240, 231, 0.08); }

/* ───── Footer ───── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
}
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 2fr repeat(3, 1fr); }
@media (max-width: 768px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--ink); }
.foot-bottom {
  border-top: 1px solid var(--border-soft);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted-2);
}

/* ───── Forms ───── */
.form { display: flex; flex-direction: column; gap: 1rem; max-width: 480px; }
.form label { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.24em; color: var(--muted-2); }
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  border-radius: 0.5rem;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent-hi); outline-offset: 1px; }

/* utilities */
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.muted { color: var(--muted); }

/* ───── Accessibility ───── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  z-index: 100;
  border-radius: 0 0 0.5rem 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}
:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline-offset: 3px;
}

/* ───── Mobile nav ───── */
@media (max-width: 899px) {
  .nav-cta .btn-secondary { display: none; }
  .nav-inner { gap: 0.5rem; }
  .brand { font-size: 0.75rem; letter-spacing: 0.24em; }
}

/* ───── Hero animation ───── */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual .col {
    animation: col-fade-in 0.8s ease-out backwards;
  }
  .hero-visual .col:nth-child(1) { animation-delay: 0.1s; }
  .hero-visual .col:nth-child(2) { animation-delay: 0.25s; }
  .hero-visual .col:nth-child(3) { animation-delay: 0.4s; }
  .hero-visual .task {
    animation: task-fade-in 0.5s ease-out backwards;
  }
  .hero-visual .col:nth-child(1) .task:nth-child(2) { animation-delay: 0.5s; }
  .hero-visual .col:nth-child(1) .task:nth-child(3) { animation-delay: 0.6s; }
  .hero-visual .col:nth-child(1) .task:nth-child(4) { animation-delay: 0.7s; }
  .hero-visual .col:nth-child(2) .task:nth-child(2) { animation-delay: 0.75s; }
  .hero-visual .col:nth-child(2) .task:nth-child(3) { animation-delay: 0.85s; }
  .hero-visual .col:nth-child(3) .task:nth-child(2) { animation-delay: 1s; }
  .hero-visual .col:nth-child(3) .task:nth-child(3) { animation-delay: 1.15s; }

  /* Pulse the live indicator */
  .live-pulse { position: relative; }
  .live-pulse::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--accent-hi);
    opacity: 0.5;
    animation: pulse 1.6s ease-out infinite;
  }

  /* The "agent in action" card slowly migrates and gets a fresh comment */
  .task.agent-card {
    animation: agent-glow 4s ease-in-out infinite;
  }

  /* Recurring "agent comment" line that fades in/out */
  .agent-ticker {
    overflow: hidden;
    height: 1.6em;
    position: relative;
  }
  .agent-ticker span {
    display: block;
    animation: ticker 12s steps(1, end) infinite;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
  }
}

@keyframes col-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes task-fade-in {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.5; }
  70%  { transform: scale(2.4); opacity: 0;   }
  100% { transform: scale(2.4); opacity: 0;   }
}
@keyframes agent-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(213, 122, 50, 0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(213, 122, 50, 0.18); }
}
@keyframes ticker {
  0%, 30%   { transform: translateY(0);     }
  33%, 63%  { transform: translateY(-1.6em); }
  66%, 96%  { transform: translateY(-3.2em); }
  100%      { transform: translateY(0);     }
}

/* ───── Social proof strip ───── */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}
@media (min-width: 640px) { .proof-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .proof-strip { grid-template-columns: repeat(6, 1fr); } }
.proof-cell {
  border: 1px dashed var(--border-strong);
  border-radius: 0.5rem;
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--muted-2);
  background: rgba(255, 250, 240, 0.4);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proof-strip-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--muted-2);
  text-align: center;
  margin-bottom: 0.25rem;
}

/* ───── Cookie banner ───── */
.cookie-bar {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--bg);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 60;
  font-size: 0.85rem;
}
.cookie-bar p { margin: 0; line-height: 1.45; }
.cookie-bar .cookie-link { color: var(--accent-hi); text-decoration: underline; }
.cookie-btns { display: flex; gap: 0.5rem; }
.cookie-bar button {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(244, 240, 231, 0.3);
  background: transparent;
  color: var(--bg);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cookie-bar button:hover { border-color: var(--bg); }
.cookie-bar button[data-choice="accept"] {
  background: var(--accent-hi);
  border-color: var(--accent-hi);
  color: var(--ink);
}
.cookie-bar button[data-choice="accept"]:hover { background: var(--bg); border-color: var(--bg); }
@media (min-width: 640px) {
  .cookie-bar { flex-direction: row; align-items: center; }
  .cookie-bar p { flex: 1; }
  .cookie-btns { flex: 0 0 auto; }
  .cookie-bar button { flex: 0 0 auto; }
}

/* ───── Tighten responsive at small widths ───── */
@media (max-width: 600px) {
  .hero-section { padding: 4rem 0 3rem; }
  section { padding: 3.5rem 0; }
  h1.hero { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .stats { padding: 2rem 0; gap: 1.5rem; }
  .stat .num { font-size: 2rem; }
  .compare-table th, .compare-table td { padding: 0.65rem 0.75rem; font-size: 0.85rem; }
  .compare-table th { font-size: 0.6rem; }
  .cta { padding: 2.5rem 1.25rem; }
  .price-card { padding: 1.5rem; }
}

/* ───── Print ───── */
@media print {
  .nav, .cookie-bar, footer .foot-bottom a, .btn { display: none; }
  body { background: white; color: black; }
}
