:root {
  --bg: #0b0f14;
  --bg-alt: #0f151d;
  --surface: #121923;
  --surface-hover: #17212e;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6edf3;
  --text-muted: #94a3b8;
  --text-dim: #7c8ca1;
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --emerald-soft: rgba(16, 185, 129, 0.12);
  --sky: #38bdf8;
  --sky-soft: rgba(56, 189, 248, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container: 1120px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(16, 185, 129, 0.09), transparent 70%),
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

a:hover {
  color: #7dd3fc;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--emerald-bright);
  outline-offset: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1em 0.35em;
  color: #cbd5e1;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--emerald);
  color: #04130d;
  font-weight: 600;
  padding: 0.65rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

main[id],
section[id],
#runbooks {
  scroll-margin-top: 5rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 20, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-prompt {
  color: var(--emerald-bright);
}

.brand-tag {
  color: var(--text-dim);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--emerald);
  color: #04130d;
}

.btn-primary:hover {
  background: var(--emerald-bright);
  color: #04130d;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(15, 21, 29, 0.75);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.25rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald-bright);
  margin-bottom: 0.5rem;
}

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.1rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
}

h3 {
  font-size: 1.18rem;
  font-weight: 600;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
}

.section-sub,
.muted {
  color: var(--text-muted);
  margin: 0.65rem 0 0;
}

/* Hero */
.hero {
  padding-top: 3.75rem;
  padding-bottom: 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: 2.25rem;
  align-items: start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--emerald-bright);
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero-role {
  margin: 0.45rem 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  font-weight: 500;
  color: var(--sky);
}

.hero-bio {
  margin: 1.15rem 0 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 60ch;
}

.hero-bio strong {
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.35rem;
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.mono-accent {
  font-family: var(--font-mono);
  color: var(--emerald-bright);
  font-weight: 600;
  margin-right: 0.25rem;
}

/* Terminal Card */
.terminal-card {
  background: #0d131b;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  background: #131b26;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; opacity: 0.85; }
.dot-amber { background: #f59e0b; opacity: 0.85; }
.dot-green { background: #10b981; opacity: 0.85; }

.terminal-title {
  margin-left: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.15rem 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.cmd {
  margin: 0 0 0.85rem;
  color: var(--text);
  overflow-wrap: break-word;
}

.cmd-footer {
  margin-top: 1.1rem;
  margin-bottom: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
}

.prompt {
  color: var(--emerald-bright);
  margin-right: 0.4rem;
}

.kv-list {
  margin: 0;
  display: grid;
  gap: 0.48rem;
}

.kv-list > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.65rem;
}

.kv-list dt {
  color: var(--sky);
}

.kv-list dd {
  margin: 0;
  color: #cbd5e1;
  word-break: break-word;
}

.terminal-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* Cards & Grids */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.proof-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.proof-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.proof-card strong {
  color: var(--text);
  font-weight: 500;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.badge-live {
  background: var(--emerald-soft);
  color: var(--emerald-bright);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.badge-code {
  background: var(--sky-soft);
  color: var(--sky);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.mono-muted {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}

.endpoint-list {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #0c121a;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}

.endpoint:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: #101925;
  color: var(--text);
}

.method {
  color: var(--emerald-bright);
  font-weight: 600;
}

.path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desc {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

/* Runbooks */
.runbooks-wrap {
  margin-top: 2.5rem;
}

.runbooks-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.text-link {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.runbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.runbook-item {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.runbook-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  color: var(--text);
}

.runbook-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.runbook-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
}

.tag-emerald { background: var(--emerald-soft); color: var(--emerald-bright); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-sky { background: var(--sky-soft); color: var(--sky); }

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.service-featured {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, var(--surface) 45%);
}

.service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.service-tier {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-featured {
  color: var(--emerald-bright);
}

.price {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.currency {
  font-size: 1rem;
  color: var(--emerald-bright);
  vertical-align: top;
  margin-right: 1px;
}

.price-unit {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  text-align: right;
  margin-top: 0.15rem;
}

.service-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.75rem;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: #cbd5e1;
  flex: 1;
}

.checklist li {
  position: relative;
  padding-left: 1.25rem;
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald-bright);
  font-family: var(--font-mono);
  font-weight: 700;
}

.billing-strip {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.billing-item h4 {
  font-size: 0.92rem;
  color: var(--emerald-bright);
  font-family: var(--font-mono);
  margin-bottom: 0.35rem;
}

.billing-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.billing-item strong {
  color: var(--text);
}

/* Stack */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.stack-card h3 {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill-list li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
  background: #0c121a;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
}

.honesty-box {
  margin-top: 1.5rem;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius);
}

.honesty-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--emerald-bright);
  margin-bottom: 0.4rem;
}

.honesty-box p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.honesty-box strong {
  color: var(--text);
}

/* Contact */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-intro {
  max-width: 640px;
  margin-bottom: 1.75rem;
}

.contact-intro p {
  margin: 0.6rem 0 0;
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.contact-grid > :last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.85rem 1rem;
  background: #0c121a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.contact-full:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
  min-width: 0;
  color: var(--text);
}

a.contact-link:hover,
.contact-full:hover .contact-link {
  color: var(--sky);
}

.contact-static:hover {
  color: var(--text);
}

.contact-full:hover .ext-arrow {
  color: var(--sky);
  transform: translate(2px, -2px);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--emerald-bright);
  flex-shrink: 0;
}

.contact-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-label {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.contact-value {
  font-size: 0.92rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.42rem 0.7rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: var(--surface-hover);
  border-color: var(--emerald);
  color: var(--emerald-bright);
}

.copy-btn.copied {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-bright);
}

.copy-btn.copy-failed {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber);
}

.ext-arrow {
  color: var(--text-dim);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.25rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
}

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

/* 404 Page */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.error-box {
  max-width: 520px;
  width: 100%;
  text-align: left;
}

.error-status {
  color: var(--amber);
  margin: 0 0 0.75rem;
}

.error-message {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .proof-grid,
  .services-grid,
  .stack-grid,
  .billing-strip,
  .runbook-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 0.95rem;
  }
}

@media (max-width: 768px) {
  main[id],
  section[id],
  #runbooks {
    scroll-margin-top: 6.75rem;
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding-top: 0.65rem;
    padding-bottom: 0.55rem;
    gap: 0.55rem 0.75rem;
  }

  .brand {
    order: 1;
  }

  .header-cta {
    order: 2;
    white-space: nowrap;
  }

  .nav {
    order: 3;
    flex: 1 0 100%;
    gap: 0.5rem 1.15rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 0.15rem 0;
  }
}

@media (max-width: 680px) {
  .section {
    padding: 3.25rem 0;
  }

  .brand {
    font-size: 0.9rem;
  }

  .header-cta {
    padding: 0.45rem 0.72rem;
    font-size: 0.8rem;
  }

  .status-pill {
    border-radius: 12px;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .contact-card {
    padding: 1.35rem;
  }

  .kv-list > div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .endpoint {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .endpoint .desc {
    grid-column: 1 / -1;
  }
}

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