/* Nimbra — ink, weather-glass and one electric accent. */

:root {
  --ink: #0a0c10;
  --ink-2: #0e1117;
  --panel: #12161f;
  --line: #1e2430;
  --line-2: #2a3242;
  --text: #e6e9ef;
  --muted: #8b95a7;
  --dim: #5d6676;
  --accent: #6ee7f0;
  --accent-2: #a78bfa;
  --warn: #f5b661;
  --ok: #7ee2a8;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --shell: 1140px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* A faint horizon glow — the only ornament on the page. */
body::before {
  content: "";
  position: fixed;
  inset: -40% 0 auto 0;
  height: 70vh;
  background: radial-gradient(60% 55% at 50% 60%, rgba(110, 231, 240, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 1; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(10, 12, 16, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand .mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: border-color .15s, background .15s, transform .05s;
}
.btn:hover { border-color: #3a4558; background: #161b26; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); color: #05262a; border-color: transparent; font-weight: 600;
}
.btn-primary:hover { background: #8af0f7; border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

/* ---------- typography ---------- */

h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.12; margin: 0; font-weight: 600; }
h1 { font-size: clamp(38px, 6vw, 62px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 17px; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 17px; max-width: 54ch; }
.eyebrow {
  font: 500 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim);
}
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- landing ---------- */

.hero { padding: 96px 0 72px; }
.hero-in { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 56px; align-items: center; }

.receipt { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.receipt > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #10141c; }
.receipt dl { margin: 0; padding: 6px 18px; }
.receipt dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.receipt dl > div:last-child { border-bottom: 0; }
.receipt dt { font: 500 11px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.receipt dd { margin: 0; font: 400 13px/1.6 var(--mono); color: var(--text); text-align: right; word-break: break-all; }
.receipt dd.hi { color: var(--accent); }
.receipt > footer { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { margin-top: 22px; }
.hero-cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

.promo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 6px 12px 6px 8px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--ink-2); font-size: 13px; color: var(--muted);
}
.promo b { color: var(--accent); font-weight: 600; }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cell { background: var(--ink-2); padding: 26px 24px; }
.cell h3 { margin-bottom: 8px; }
.cell p { color: var(--muted); font-size: 14px; }

.section { padding: 64px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }

.code {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font: 400 13px/1.7 var(--mono); color: #c7d0de; overflow-x: auto;
  white-space: pre; tab-size: 2;
}
.code .k { color: var(--accent-2); }
.code .s { color: var(--accent); }
.code .c { color: var(--dim); }

/* ---------- tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); padding: 0 16px 12px; border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-family: var(--mono); font-size: 13px; }
.strike { color: var(--dim); text-decoration: line-through; }
.wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.scroll-x { overflow-x: auto; }

/* ---------- panels / forms ---------- */

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.input {
  width: 100%; padding: 11px 13px; background: var(--ink); border: 1px solid var(--line-2);
  border-radius: 8px; outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 96px; font-family: var(--mono); font-size: 13px; }

.auth { max-width: 420px; margin: 72px auto; }
.auth h2 { margin-bottom: 8px; }

.alert { padding: 11px 14px; border-radius: 8px; font-size: 14px; border: 1px solid; }
.alert-err { border-color: #5b2b33; background: #1d1114; color: #f3b3bd; }
.alert-ok { border-color: #24503c; background: #0f1a15; color: var(--ok); }
.alert-warn { border-color: #5a4622; background: #1c1710; color: var(--warn); }

/* ---------- dashboard ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat .v { font: 600 24px/1.2 var(--mono); letter-spacing: -0.02em; margin-top: 8px; }
.stat .v.accent { color: var(--accent); }

.key-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.key-row:last-child { border-bottom: 0; }
.key-row .mono { font-size: 13px; }
.tag { font: 500 11px/1 var(--mono); padding: 4px 7px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); }
.tag.ok { color: var(--ok); border-color: #24503c; }
.tag.off { color: var(--dim); }

.two { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }

/* ---------- chat transcript ---------- */

.msg { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-2); }
.msg + .msg { margin-top: 14px; }
.msg header {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: #10141c;
  font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
}
.msg .body { padding: 16px; white-space: pre-wrap; word-break: break-word; }
.msg.assistant header { color: var(--accent); }

.copy { cursor: pointer; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 28px 0 44px; color: var(--dim); font-size: 13px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: 1fr; }
  .shell { width: calc(100% - 32px); }
  .hero { padding: 64px 0 48px; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}
