:root {
  --bg: #0d0d0d;
  --bg-terminal: #111111;
  --bg-terminal-header: #1a1a1a;
  --border: #2a2a2a;
  --text: #c8c8c8;
  --text-dim: #666;
  --text-bright: #e8e8e8;
  --green: #4ade80;
  --green-dim: #22c55e;
  --amber: #fbbf24;
  --amber-dim: #d97706;
  --blue: #60a5fa;
  --red: #f87171;
  --mono: 'IBM Plex Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Layout ──────────────────────────────────────────────────────────────── */

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

#hero {
  padding-top: 80px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 520px;
}

/* ─── Terminal Window ─────────────────────────────────────────────────────── */

.terminal-window {
  width: 100%;
  max-width: 720px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-terminal);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  position: relative; /* needed to anchor the paused indicator */
}

/* ─── Artifact Counter Strip ──────────────────────────────────────────────── */

.counter-strip {
  width: 100%;
  max-width: 720px;
  margin-top: 8px;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}

.counter-label {
  color: var(--text-dim);
}

.counter-value {
  color: var(--text);
}

.counter-cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

.terminal-paused {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: var(--green-dim);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 10px;
  pointer-events: none;
  white-space: nowrap;
}

.terminal-header {
  background: var(--bg-terminal-header);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.terminal-dot:nth-child(1) { background: #f87171; }
.terminal-dot:nth-child(2) { background: #fbbf24; }
.terminal-dot:nth-child(3) { background: #4ade80; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 20px 24px;
  height: 340px;
  overflow-y: scroll;       /* must be scroll (not hidden) for smooth-scroll to animate */
  scroll-behavior: smooth;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
  /* hide scrollbar visually — smooth scroll still works */
  scrollbar-width: none;    /* Firefox */
}
.terminal-body::-webkit-scrollbar {
  display: none;            /* Chrome / Safari / Edge */
}

.t-line {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
}

.t-prompt   { color: var(--green); }
.t-arrow    { color: var(--text-dim); }
.t-key      { color: var(--blue); }
.t-value    { color: var(--amber); }
.t-string   { color: var(--amber-dim); }
.t-comment  { color: var(--text-dim); font-style: italic; }
.t-status   { color: var(--green); }
.t-error    { color: var(--red); }
.t-blank    { display: block; height: 0.8em; }

.cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--green);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

.section-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-dim);
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

p {
  color: var(--text);
  max-width: 640px;
  margin-bottom: 16px;
}

p:last-child { margin-bottom: 0; }

.feature-list {
  list-style: none;
  margin-top: 20px;
  margin-bottom: 20px;
  max-width: 640px;
}

.feature-list li {
  color: var(--text);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
}

.feature-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--green-dim);
}

/* ─── Pricing Table ───────────────────────────────────────────────────────── */

.pricing-table {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  max-width: 560px;
}

.pricing-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 80px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
  align-items: center;
}

.pricing-row:last-child { border-bottom: none; }

.pricing-row-head {
  background: var(--bg-terminal-header);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.t-amber { color: var(--amber); }

.pr-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pr-unit {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ─── Code Block ──────────────────────────────────────────────────────────── */

.code-block {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: 13px;
  overflow-x: auto;
  margin-top: 24px;
}

.code-block pre {
  margin: 0;
  white-space: pre;
}

.code-comment { color: var(--text-dim); }
.code-key     { color: var(--blue); }
.code-value   { color: var(--amber-dim); }

/* ─── Contract Box ────────────────────────────────────────────────────────── */

.contract-box {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  margin-top: 24px;
  background: var(--bg-terminal);
}

.contract-field {
  display: flex;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.contract-field:last-child { border-bottom: none; }

.cf-name  { color: var(--blue); min-width: 180px; flex-shrink: 0; }
.cf-desc  { color: var(--text); }

/* ─── Contact ────────────────────────────────────────────────────────────── */

#contact a {
  color: var(--green);
}

#contact a:hover {
  color: var(--green-dim);
}

/* ─── Get Started ─────────────────────────────────────────────────────────── */

.cta-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.cta-link {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.15s, color 0.15s;
}

.cta-link:hover {
  border-color: var(--green);
  color: var(--green);
}

.cta-link.primary {
  background: var(--green);
  border-color: var(--green);
  color: #0d0d0d;
  font-weight: 600;
}

.cta-link.primary:hover {
  background: var(--green-dim);
  border-color: var(--green-dim);
  color: #0d0d0d;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

footer {
  padding: 40px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--text-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .page { padding: 0 16px; }
  section { padding: 48px 0; }
  #hero { padding: 56px 0; }
  .terminal-body { padding: 16px; font-size: 12px; }
  .cta-links { flex-direction: column; }
}

/* ─── Playground ──────────────────────────────────────────────────────────── */

.pg-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.pg-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.pg-nav-brand {
  font-size: 14px;
  color: var(--text);
  font-family: var(--mono);
}

.pg-nav-sep {
  color: var(--text-dim);
}

.pg-nav-back {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

.pg-nav-back:hover { color: var(--text); }

.pg-steps-bar {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.pg-steps {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 12px;
}

.pg-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  white-space: nowrap;
}

.pg-step + .pg-step::before {
  content: '→';
  margin: 0 16px;
  color: var(--border);
}

.pg-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 11px;
  flex-shrink: 0;
}

.pg-step-active { color: var(--green); }
.pg-step-done   { color: var(--text-dim); }
.pg-step-future { color: var(--border); }

.pg-main-outer {
  flex: 1;
  padding: 40px 0 72px;
}

.pg-main {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.pg-left {
  flex: 0 0 38%;
  min-width: 0;
}

.pg-right {
  flex: 1;
  min-width: 0;
}

.pg-panel h2 {
  margin-bottom: 12px;
}

.pg-desc {
  color: var(--text);
  margin-bottom: 24px;
  max-width: none;
  font-size: 15px;
  line-height: 1.65;
}

.pg-desc code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--blue);
}

.pg-btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 14px;
  border: none;
}

.pg-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pg-status {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  line-height: 1.55;
  min-height: 1.55em;
}

.pg-response-area {
  position: sticky;
  top: 72px;
}

.pg-rh {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-bottom: 8px;
}

.pg-code {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  overflow-x: auto;
  min-height: 56px;
}

.pg-code-res {
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.pg-json {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}

.pg-placeholder {
  color: var(--text-dim);
  font-style: italic;
  font-family: var(--mono);
  font-size: 12px;
}

.pg-contract-block {
  margin-top: 16px;
  border-left: 3px solid var(--green);
  padding: 10px 14px;
  background: rgba(74, 222, 128, 0.04);
  border-radius: 0 4px 4px 0;
}

.pg-contract-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
  font-family: var(--mono);
}

.pg-summary {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  margin-top: 4px;
}

.pg-summary-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.pg-secret {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.pg-secret--visible {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.pg-secret-actions {
  display: inline-flex;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
  padding-top: 1px;
}

.pg-secret-btn {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  cursor: pointer;
  line-height: 1.6;
  transition: color 0.15s, border-color 0.15s;
}

.pg-secret-btn:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.pg-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
}

.pg-note p { margin-bottom: 12px; max-width: none; }
.pg-note p:last-child { margin-bottom: 0; }

.pg-note code {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 12px;
}

.pg-next-btn {
  display: block;
  margin-top: 16px;
  width: 100%;
  text-align: center;
}

.pg-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: none;
}

.pg-hint code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

.pg-hint a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pg-hint a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .pg-main { flex-direction: column; gap: 32px; }
  .pg-left { flex: none; width: 100%; }
  .pg-response-area { position: static; }
  .pg-step-label { display: none; }
  .pg-step + .pg-step::before { margin: 0 10px; }
}
