/* Hiero Maintainer Bot — landing page
   Design tokens lifted from the product's own dashboard (dashboard/templates/dashboard.html)
   so the marketing page and the product look like one thing. Dark-only, intentionally —
   this matches the tool's own UI and its developer/GitHub-native audience. */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #21262d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --blue: #58a6ff;
  --green: #3fb950;
  --yellow: #d29922;
  --red: #f85149;
  --purple: #bc8cff;
  --radius: 8px;
  --radius-lg: 14px;
  --max: 1160px;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #04101f;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

main { display: block; }
section { padding: 88px 24px; }
.wrap { max-width: var(--max); margin: 0 auto; }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.6vw, 38px); margin-bottom: 14px; }
h3 { font-size: 19px; margin-bottom: 8px; }
p { color: var(--text); }
.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
}
.section-head { max-width: 720px; margin-bottom: 44px; }

code, pre {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.brand .name-full { display: inline; }

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: 32px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 20px 16px;
}
.mobile-nav[data-open="true"] { display: flex; }
.mobile-nav a {
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.mobile-nav a:last-child { border-bottom: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #041018; }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Hero ---------- */
.hero {
  padding-top: 108px;
  padding-bottom: 72px;
  background:
    radial-gradient(60% 55% at 82% 0%, rgba(88, 166, 255, 0.14), transparent 60%),
    radial-gradient(50% 40% at 8% 15%, rgba(63, 185, 80, 0.08), transparent 60%);
  border-bottom: 1px solid var(--border);
}
.hero .wrap { max-width: 880px; }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  max-width: 780px;
}
.hero .lede { font-size: 19px; margin-top: 18px; max-width: 620px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-actions .btn { padding: 12px 22px; font-size: 15px; }

.trust-strip {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--font-mono);
}
.trust-strip span { display: inline-flex; align-items: center; gap: 6px; }
.trust-strip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block;
}

/* ---------- Problem ---------- */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.problem-grid .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.problem-grid h3 { color: var(--text); }
.problem-grid .card.camps ul { list-style: none; margin-top: 14px; display: grid; gap: 14px; }
.problem-grid .card.camps li { border-top: 1px solid var(--border); padding-top: 14px; }
.problem-grid .card.camps li:first-child { border-top: none; padding-top: 0; }
.problem-grid .card.camps strong { color: var(--text); display: block; margin-bottom: 4px; }
.problem-grid .card.camps span { color: var(--muted); font-size: 14px; }

.gap-statement {
  margin-top: 36px;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.06);
  font-size: 18px;
  color: var(--text);
}
.gap-statement strong { color: var(--blue); }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
}
.feature-card .tag {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(210, 153, 34, 0.15);
  color: var(--yellow);
}
.feature-card .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--purple);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.feature-card p { color: var(--muted); font-size: 14.5px; }

/* ---------- Compare table ---------- */
.compare-scroll { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  min-width: 720px;
}
table.compare th, table.compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: top;
}
table.compare thead th {
  background: var(--surface-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
table.compare th:first-child, table.compare td:first-child {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
table.compare td.us { color: var(--text); font-weight: 600; background: rgba(63, 185, 80, 0.05); }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare .yes { color: var(--green); }
table.compare .no { color: var(--muted); }

.compare-cards { display: none; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 44px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(88, 166, 255, 0.15);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
}
.step p { color: var(--muted); font-size: 14.5px; }
.step .note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--yellow);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.codeblock {
  position: relative;
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.codeblock .codeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 9px;
  cursor: pointer;
  font-family: var(--font-mono);
}
.copy-btn:hover { color: var(--text); border-color: var(--blue); }
.copy-btn[data-copied="true"] { color: var(--green); border-color: var(--green); }
.codeblock pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: #d3dbe4;
  line-height: 1.6;
}
.codeblock pre .c-key { color: var(--purple); }
.codeblock pre .c-str { color: var(--green); }
.codeblock pre .c-com { color: var(--muted); }
.codeblock pre .c-cmd { color: var(--blue); }

.code-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.code-stack { display: grid; gap: 18px; }

/* ---------- Architecture (details) ---------- */
.arch-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 4px;
}
.arch-details summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.arch-details summary::-webkit-details-marker { display: none; }
.arch-details summary .chevron { color: var(--muted); transition: transform 0.15s ease; font-family: var(--font-mono); }
.arch-details[open] summary .chevron { transform: rotate(90deg); }
.arch-body { padding: 4px 22px 26px; display: grid; gap: 26px; }
.arch-tree {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--muted);
  overflow-x: auto;
}
.arch-tree .dir { color: var(--blue); }
.arch-tables { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th, .mini-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}
.mini-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.mini-table td.mono { font-family: var(--font-mono); color: var(--text); font-size: 12.5px; }

/* ---------- Roadmap ---------- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.roadmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  border-top: 3px solid var(--purple);
}
.roadmap-card h3 { font-size: 16px; }
.roadmap-card p { color: var(--muted); font-size: 13.5px; }

.funding {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.funding p { color: var(--muted); max-width: 620px; }
.funding strong { color: var(--text); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; }
footer .about p { color: var(--muted); font-size: 14px; max-width: 480px; }
footer .about .brand { margin-bottom: 12px; }
footer ul { list-style: none; display: grid; gap: 10px; }
footer ul a { color: var(--muted); font-size: 14px; }
footer ul a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .arch-tables { grid-template-columns: 1fr; }
  .code-grid { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .about { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  section { padding: 64px 20px; }
  .problem-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .funding { grid-template-columns: 1fr; text-align: left; }

  /* Comparison table becomes stacked cards on small screens */
  .compare-scroll { display: none; }
  .compare-cards { display: grid; gap: 14px; }
  .compare-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
  }
  .compare-card.us { border-color: rgba(63, 185, 80, 0.4); background: rgba(63, 185, 80, 0.05); }
  .compare-card h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
  .compare-card dl { display: grid; gap: 8px; }
  .compare-card dl div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 13px; }
  .compare-card dt { color: var(--muted); }
  .compare-card dd { color: var(--text); }
}

@media (max-width: 560px) {
  .roadmap-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand .name-full { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .topbar-actions .btn-ghost { display: none; }
}
