/* ==========================================================
   emit · shared design tokens
   ========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap");

:root {
  /* surface — neutral near-black, very subtle warm tint */
  --bg-0: #09090b;
  --bg-1: #0d0d10;
  --bg-2: #111115;
  --bg-3: #16161b;
  --bg-4: #1c1c22;

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --border-bright: rgba(255, 255, 255, 0.18);

  /* text */
  --fg-0: #fafafa; /* primary */
  --fg-1: #c4c4c5; /* body */
  --fg-2: #8a8a8e; /* secondary */
  --fg-3: #5a5a60; /* muted */
  --fg-4: #3a3a40; /* very muted */

  /* accent — mint */
  --accent: #5eead4;
  --accent-dim: #2dd4bf;
  --accent-soft: rgba(94, 234, 212, 0.12);

  /* signals */
  --warn: #f7a046;
  --warn-soft: rgba(247, 160, 70, 0.1);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);

  /* code syntax */
  --c-comment: #525258;
  --c-keyword: #c4c4c5;
  --c-string: #5eead4;
  --c-flag: #a3a3a3;
  --c-punct: #6b6b70;

  /* type */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* radii */
  --r-1: 4px;
  --r-2: 6px;
  --r-3: 10px;
  --r-4: 14px;

  /* layout */
  --container: 1200px;
  --page-pad-x: 32px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "tnum";
  text-rendering: optimizeLegibility;
}

/* subtle global grid */
body.grid-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input,
textarea,
select {
  font-family: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* =================== layout primitives =================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
  position: relative;
  z-index: 1;
}

.row {
  display: flex;
  align-items: center;
}
.col {
  display: flex;
  flex-direction: column;
}
.gap-1 {
  gap: 4px;
}
.gap-2 {
  gap: 8px;
}
.gap-3 {
  gap: 12px;
}
.gap-4 {
  gap: 16px;
}
.gap-6 {
  gap: 24px;
}
.gap-8 {
  gap: 32px;
}

/* =================== nav =================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--fg-0);
}
.brand .dot {
  color: var(--accent);
}
.brand .ver {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--fg-3);
  letter-spacing: 0;
  align-self: center;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  color: var(--fg-2);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 120ms ease;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
  color: var(--fg-0);
}

/* =================== buttons =================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-2);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 80ms ease;
  white-space: nowrap;
  background: transparent;
  color: var(--fg-0);
}
.btn:active {
  transform: translateY(0.5px);
}

.btn-primary {
  background: var(--accent);
  color: #062520;
  font-weight: 600;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #7df2dd;
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--fg-0);
}
.btn-ghost:hover {
  border-color: var(--border-bright);
  background: var(--bg-2);
}

.btn-quiet {
  color: var(--fg-2);
  padding: 0 8px;
}
.btn-quiet:hover {
  color: var(--fg-0);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.2);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.32);
}

.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: var(--r-1);
}
.btn-lg {
  height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

/* =================== form fields =================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  color: var(--fg-0);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition:
    border-color 120ms ease,
    background 120ms ease;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--fg-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--border-bright);
  background: var(--bg-3);
}
.input.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}
.textarea {
  height: auto;
  padding: 10px 12px;
  min-height: 88px;
  resize: vertical;
}
.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fg-3) 50%),
    linear-gradient(135deg, var(--fg-3) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 17px,
    calc(100% - 11px) 17px;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

/* =================== panels & cards =================== */

.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
}
.card-pad {
  padding: 20px;
}
.card-pad-lg {
  padding: 28px;
}
.card-hd {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.005em;
}
.card-subtle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.02em;
}

/* =================== code / terminal =================== */

.code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--fg-1);
  white-space: pre;
}
.code .c-cm {
  color: var(--c-comment);
  font-style: normal;
}
.code .c-kw {
  color: var(--fg-0);
}
.code .c-st {
  color: var(--accent);
}
.code .c-fl {
  color: var(--fg-2);
}
.code .c-pn {
  color: var(--fg-3);
}
.code .c-nu {
  color: var(--accent);
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-0);
}

.terminal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 60px -30px rgba(0, 0, 0, 0.8);
}
.terminal-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.tt-dots {
  display: flex;
  gap: 6px;
}
.tt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.terminal-path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-3);
}
.terminal-body {
  padding: 18px 20px;
}

/* =================== badges =================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  color: var(--fg-2);
  background: var(--bg-2);
  white-space: nowrap;
}
.badge.accent {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.22);
  background: var(--accent-soft);
}
.badge.warn {
  color: var(--warn);
  border-color: rgba(247, 160, 70, 0.22);
  background: var(--warn-soft);
}
.badge.danger {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.22);
  background: var(--danger-soft);
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* =================== labels =================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.eyebrow .bar {
  width: 18px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* =================== typography =================== */

.h-display {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--fg-0);
  margin: 0;
}
.h-display .dim {
  color: var(--fg-3);
}
.h-display .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78em;
  letter-spacing: -0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.04em 0.18em;
  border-radius: 6px;
}

.h-section {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--fg-0);
  margin: 0;
}

.h-sub {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.011em;
  color: var(--fg-0);
  margin: 0;
}

.lede {
  font-size: 16.5px;
  color: var(--fg-2);
  line-height: 1.6;
  letter-spacing: -0.003em;
  max-width: 56ch;
}
.lede strong {
  color: var(--fg-0);
  font-weight: 500;
}

/* =================== dividers =================== */

.hr {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}
.hr-dashed {
  height: 1px;
  border: 0;
  background: repeating-linear-gradient(to right, var(--fg-4) 0 4px, transparent 4px 10px);
}
.hr-ascii {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.2em;
  user-select: none;
}

/* =================== tables =================== */

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.tbl th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-1);
  vertical-align: middle;
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.tbl .mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.tbl .num {
  font-variant-numeric: tabular-nums;
}

/* =================== utilities =================== */

.mono {
  font-family: var(--font-mono);
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.t-0 {
  color: var(--fg-0);
}
.t-1 {
  color: var(--fg-1);
}
.t-2 {
  color: var(--fg-2);
}
.t-3 {
  color: var(--fg-3);
}
.t-acc {
  color: var(--accent);
}
.t-warn {
  color: var(--warn);
}
.t-danger {
  color: var(--danger);
}
.fw-5 {
  font-weight: 500;
}
.fw-6 {
  font-weight: 600;
}
.tcenter {
  text-align: center;
}

.section {
  padding: 96px 0;
  position: relative;
}
.section-tight {
  padding: 56px 0;
}

@media (max-width: 900px) {
  .section {
    padding: 72px 0;
  }
  :root {
    --page-pad-x: 20px;
  }
}

/* =================== accessibility =================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.btn:focus-visible {
  outline-offset: 3px;
}

/* Respect reduced-motion: stop the hero cursor blink and transitions. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cursor,
  .pulse,
  .badge .dot {
    animation: none !important;
  }
}

/* Screen-reader-only helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
