/* Repster apex landing — dark theme.
   All styling lives here (no inline styles): the site's CSP is `style-src 'self'`,
   which blocks inline <style> and style="" attributes alike. Fonts are self-hosted
   under /fonts (variable woff2), so `default-src 'self'` covers them with no CSP change. */

/* ---- Fonts (self-hosted variable woff2, latin subset) ---- */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/instrument-sans-var.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-var.woff2") format("woff2");
}

/* ---- Design tokens ---- */
:root {
  --bg: #060708;
  --page: #08090a;
  --panel: #0b0d0e;
  --panel-head: #0d0f11;
  --panel-green: #0a1310;   /* Repster comparison cells */
  --panel-green2: #0a1210;  /* pricing "billed" + partner card */

  --border: #1e2226;
  --border-soft: #14171a;   /* section dividers */
  --border-hair: #191d20;   /* table / card hairlines */
  --border-panel: #16191c;  /* panel headers */

  --accent: #7dd3a0;
  --accent-hover: #a7e5c1;
  --gold: #d8a657;
  --blue: #8ab4f8;
  --red: #e07a5f;

  --ink: #f7f9f9;           /* h1 */
  --ink-2: #f2f4f4;         /* h2 */
  --wordmark: #f4f6f6;
  --text: #e8eaea;
  --text-strong: #dfe3e5;
  --text-code: #c6cccf;
  --text-bright: #d5dadd;   /* emphasized table cells */
  --muted: #8a9095;
  --muted-2: #969da2;
  --muted-3: #7d8489;
  --dim: #6b7276;
  --dim-2: #5c6367;

  --font-sans: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --maxw: 1240px;
  --pad-x: 52px;
}

/* ---- Reset / base ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }

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

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--accent);
  color: #060708;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; color: #060708; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:where(a, .btn):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Anchored sections shouldn't sit flush against the top edge on jump. */
[id] { scroll-margin-top: 24px; }

/* ---- Page container (the framed "card" from the design) ---- */
.page {
  max-width: var(--maxw);
  margin: 32px auto;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* ---- Nav ---- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px var(--pad-x);
  border-bottom: 1px solid var(--border-soft);
}
.nav-left { display: flex; align-items: center; gap: 38px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; }
.wordmark {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--wordmark);
}
.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--dim);
  border: 1px solid #232830;
  border-radius: 4px;
  padding: 3px 6px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { color: #060708; background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); color: #060708; }
.btn-ghost { color: #cfd4d6; border-color: #262b2f; background: transparent; }
.btn-ghost:hover { border-color: #3c4348; color: #cfd4d6; }
.btn-sm { font-size: 13px; padding: 9px 15px; }
.btn-block { display: block; text-align: center; }

/* ---- Section scaffolding ---- */
.section { padding: 84px var(--pad-x); border-bottom: 1px solid var(--border-soft); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.11em;
  color: var(--accent);
}
.eyebrow--red { color: var(--red); }

h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 34px);
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.12;
}
.section-lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---- Code / terminal panels ---- */
.panel {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-panel);
  background: var(--panel-head);
}
.panel-head .dot { width: 9px; height: 9px; border-radius: 50%; background: #2a3034; }
.panel-file {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  margin-left: 6px;
}
.panel-head--plain {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-panel);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}

.code, .term {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--text-code);
  padding: 26px 22px;
  overflow-x: auto;
}
.code { font-size: 14px; line-height: 1.8; }
.term { font-size: 13.5px; line-height: 1.95; padding: 24px 26px; }

/* Syntax + terminal token colors */
.tok-kw  { color: var(--dim); }
.tok-dec { color: var(--accent); }
.tok-str { color: var(--gold); }
.tok-fn  { color: var(--blue); }

.t-prompt { color: var(--accent); }
.t-user   { color: var(--blue); }
.t-dim    { color: var(--dim-2); }
.t-ok     { color: var(--accent); }
.t-err    { color: var(--red); }

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 52px;
  padding: 86px var(--pad-x) 82px;
  align-items: start;
  border-bottom: 1px solid var(--border-soft);
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
}
.hero .lede {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted-2);
  max-width: 46ch;
}
.cta-row { display: flex; align-items: center; gap: 14px; padding-top: 4px; flex-wrap: wrap; }

.feature-list {
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 24px;
}
.feature { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: baseline; }
.feature dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.feature dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

.install-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.install-line .dollar { color: var(--accent); }
.install-line .cmd { color: #b9c0c4; }
.install-line .sep { color: var(--muted-3); }

/* ---- 01 Workflow ---- */
.workflow-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 40px; align-items: start; }
.cmd-cards {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-hair);
  border: 1px solid var(--border-hair);
  border-radius: 9px;
  overflow: hidden;
}
.cmd-card { background: var(--panel); padding: 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.cmd-name { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.cmd-desc { font-size: 15px; color: var(--muted); line-height: 1.55; }

/* ---- 02 AI-native ---- */
.ai-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.ai-copy { display: flex; flex-direction: column; gap: 22px; }

/* ---- 03 Tradeoffs ---- */
.table-scroll { overflow-x: auto; border-radius: 9px; }
.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-hair);
  border-radius: 9px;
  overflow: hidden;
  font-size: 15px;
  text-align: left;
}
.compare th, .compare td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-hair);
  font-weight: 400;
  vertical-align: top;
}
.compare thead th {
  padding: 16px 22px;
  background: var(--panel-head);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}
.compare thead th.col-repster { color: #eef0f1; }
.compare tbody th[scope="row"] {
  background: var(--panel);
  color: var(--muted);
  font-weight: 400;
}
.compare td { background: var(--panel); color: var(--dim); }
.compare .v-repster { background: var(--panel-green); color: var(--text-bright); }
.compare td.emph { color: var(--text-bright); }
.compare th + th, .compare th + td, .compare td + td { border-left: 1px solid var(--border-hair); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }

.tradeoff-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.tradeoff-notes p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted-3); }
.note-lead { color: #b9c0c4; }

/* ---- 04 Pricing ---- */
.pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.pricing h2 { font-size: clamp(30px, 4.2vw, 38px); letter-spacing: -0.035em; max-width: 22ch; line-height: 1.1; }
.pricing-lede { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 58ch; }
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-hair);
  border: 1px solid var(--border-hair);
  border-radius: 9px;
  overflow: hidden;
  margin-top: 20px;
  width: 100%;
  max-width: 880px;
}
.price-cell { background: var(--panel); padding: 26px 20px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.price-cell.billed { background: var(--panel-green2); }
.price-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); }
.price-tag.free { color: var(--dim); }
.price-name { font-size: 19px; font-weight: 600; color: #eef0f1; }
.price-name.struck { color: var(--muted-3); text-decoration: line-through; }

/* ---- 05 Honesty ---- */
.honesty-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-hair);
  border: 1px solid var(--border-hair);
  border-radius: 9px;
  overflow: hidden;
}
.honesty-row {
  background: var(--panel);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  align-items: baseline;
}
.honesty-term { font-size: 17px; font-weight: 600; color: var(--text-strong); }
.honesty-desc { font-size: 15px; color: var(--muted-3); line-height: 1.6; }

/* ---- Design partner program ---- */
.partner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: 88px var(--pad-x);
  border-bottom: 1px solid var(--border-soft);
}
.partner-copy { display: flex; flex-direction: column; gap: 22px; }
.partner-copy h2 {
  font-size: clamp(30px, 4.4vw, 40px);
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.08;
}
.partner-copy .section-lede { max-width: 52ch; }
.partner-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid #234037;
  border-radius: 9px;
  padding: 32px 30px;
  background: var(--panel-green2);
}
.cohort { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.partner-note { font-family: var(--font-mono); font-size: 12px; color: var(--dim-2); text-align: center; padding-top: 4px; }

/* ---- Footer ---- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px var(--pad-x);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted-3);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--dim); }
.footer-links a:hover { color: #cfd4d6; }

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 44px; }
  .workflow-grid { grid-template-columns: 1fr; gap: 28px; }
  .ai-grid { grid-template-columns: 1fr; gap: 36px; }
  .partner { grid-template-columns: 1fr; gap: 36px; }
  .tradeoff-notes { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  :root { --pad-x: 24px; }
  .page { margin: 0; border-left: none; border-right: none; border-top: none; border-radius: 0; }
  .section { padding: 56px var(--pad-x); }
  .hero { padding: 48px var(--pad-x) 52px; }
  .partner { padding: 56px var(--pad-x); }
  .nav-left { gap: 20px; }
  .feature { grid-template-columns: 1fr; gap: 4px; }
  .honesty-row { grid-template-columns: 1fr; gap: 8px; }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-row .btn { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 460px) {
  .price-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 14px; }
}
