/* ─────────────────────────────────────────────────────────────────────────
 * Titanium public site — shared base for the static pages in this dir
 * (landing.html, login.html, demo.html). Tokens are byte-copied from
 * rust/crates/titan-ui/assets/styles.css (dark) so these pages render
 * without the wasm desk. Page-specific rules stay inline in each page.
 * ───────────────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --font-sans: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  --background: oklch(0.16 0.006 250);
  --foreground: oklch(0.93 0.006 250);
  --card: oklch(0.195 0.007 250);
  --popover: oklch(0.23 0.008 250);
  --primary: oklch(0.78 0.1 225);
  --primary-foreground: oklch(0.16 0.02 240);
  --muted: oklch(0.24 0.007 250);
  --muted-foreground: oklch(0.68 0.015 250);
  --border: oklch(1 0 0 / 9%);
  --input: oklch(1 0 0 / 12%);
  --hairline: oklch(1 0 0 / 0.08);
  --ring: oklch(0.7 0.1 230);
  --destructive: oklch(0.64 0.21 25);
  --profit: oklch(0.72 0.17 152);
  --loss: oklch(0.68 0.2 25);
  --env-paper: oklch(0.8 0.15 78);
  --env-testnet: oklch(0.72 0.11 235);
  --env-live: oklch(0.64 0.24 27);
  --state-ok: oklch(0.74 0.16 155);
  --state-info: oklch(0.78 0.12 220);
  --state-warn: oklch(0.8 0.15 85);
  --state-halt: oklch(0.64 0.24 27);
  --actor-operator: oklch(0.85 0.02 250);
  --actor-smith: oklch(0.72 0.14 295);
  --actor-glass: oklch(0.75 0.12 210);
  --actor-optimus: oklch(0.74 0.15 60);
  --actor-copilot: oklch(0.74 0.13 340);
  --actor-argos: oklch(0.76 0.12 185);
  --actor-engine: oklch(0.62 0.01 250);
  --glass-tint-top: oklch(1 0 0 / 8.5%);
  --glass-tint-bottom: oklch(1 0 0 / 3.5%);
  --glass-line: oklch(1 0 0 / 11.5%);
  --brand-tile: oklch(0.95 0.005 250);
  --brand-ink: oklch(0.17 0.012 250);
  --radius: 0.5rem;
  --measure: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  background: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
}
main { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px;
}
h1, h2, h3, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code, .mono { font-family: var(--font-mono); font-variant-ligatures: none; }

.wrap { width: min(var(--measure), calc(100% - 2.5rem)); margin-inline: auto; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.eyebrow::before { content: "// "; color: var(--primary); }
h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 560;
  margin-top: 0.9rem;
  max-width: 24ch;
}
.lede { color: var(--muted-foreground); font-size: 1.0625rem; max-width: 58ch; margin-top: 1rem; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in oklch, var(--background) 78%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  width: 1.5rem; height: 1.5rem; border-radius: 6px;
  background: var(--brand-tile); color: var(--brand-ink);
  display: grid; place-items: center;
}
.brand-mark svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.nav-links { display: flex; gap: 1.4rem; margin-left: 0.75rem; font-size: 0.9rem; color: var(--muted-foreground); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--foreground); }
.nav .cta { margin-left: auto; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.05rem; border-radius: var(--radius);
  font: inherit; font-size: 0.925rem; font-weight: 540; line-height: 1;
  color: var(--foreground);
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 80%, transparent);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}
.btn:hover { background: var(--popover); border-color: var(--glass-line); transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: var(--primary-foreground); border-color: transparent; }
.btn.primary:hover { background: color-mix(in oklch, var(--primary) 88%, white); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
.btn.block { width: 100%; }

/* ── Forms ── */
.field { display: grid; gap: 0.4rem; }
.field > span { font-size: 0.85rem; color: var(--muted-foreground); }
.field > span b { color: var(--foreground); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 0.95rem;
  color: var(--foreground);
  background: color-mix(in oklch, var(--background) 70%, transparent);
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  transition: border-color 140ms ease;
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in oklch, var(--muted-foreground) 70%, transparent); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--glass-line); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--ring); }
.field textarea { min-height: 7rem; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%), linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - 0.8rem) 55%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; padding-right: 2.2rem; }
.check { display: flex; align-items: center; gap: 0.55rem; font-size: 0.9rem; color: var(--muted-foreground); cursor: pointer; }
.check input { width: 1rem; height: 1rem; accent-color: var(--primary); margin: 0; }
.notice {
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 70%, transparent);
}
.notice.error { border-color: color-mix(in oklch, var(--loss) 45%, transparent); background: color-mix(in oklch, var(--loss) 12%, transparent); }
.notice.ok { border-color: color-mix(in oklch, var(--state-ok) 45%, transparent); background: color-mix(in oklch, var(--state-ok) 10%, transparent); }
.notice.warn { border-color: color-mix(in oklch, var(--state-warn) 45%, transparent); background: color-mix(in oklch, var(--state-warn) 10%, transparent); }
.notice a { color: var(--primary); }

/* ── Footer ── */
footer { border-top: 1px solid var(--hairline); padding: 2rem 0 2.5rem; color: var(--muted-foreground); font-size: 0.8rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
footer .brand { color: var(--foreground); }
footer .links { margin-left: auto; display: flex; gap: 1.4rem; }
footer .links a:hover { color: var(--foreground); }
.disclaimer { width: min(var(--measure), calc(100% - 2.5rem)); margin: 1.2rem auto 0; font-size: 0.74rem; color: color-mix(in oklch, var(--muted-foreground) 80%, transparent); max-width: 78ch; }

@media (max-width: 900px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  footer .links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
