/*
 * The undeleted palette, carried over from undeleted plan and undeleted otp.
 * Dark is the default and lives on :root; [data-theme="light"] swaps surfaces
 * and ink. Orange is the only saturated colour, so it always means "look here".
 */
@font-face { font-family: 'Space Grotesk'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg-page: #0D0F11;
  --bg-surface: #15181B;
  --bg-sunken: #101315;
  --fg1: #E8EAEC;
  --fg2: #A8AEB4;
  --fg3: #8B9299;
  --fg-heading: #FFFFFF;
  --fg-on-accent: #17181B;

  --accent: #ED7F3C;
  --accent-hover: #F5924F;
  --accent-ring: rgba(237, 127, 60, 0.35);
  --accent-glow: rgba(237, 127, 60, 0.09);

  --border-1: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);
  --surface-hover: rgba(255, 255, 255, 0.06);

  --logo-bg: #15181B;
  --logo-border: #ED7F3C;
  --logo-fg: #E8EAEC;
  --logo-slash: #ED7F3C;

  --font-display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;
  --radius: 10px;
}

[data-theme="light"] {
  --bg-page: #F5F6F4;
  --bg-surface: #FFFFFF;
  --bg-sunken: #FAFBF9;
  --fg1: #17181B;
  --fg2: #4A4E52;
  --fg3: #6B7076;
  --fg-heading: #0D0F11;

  --accent-glow: rgba(237, 127, 60, 0.12);

  --border-1: rgba(13, 15, 17, 0.08);
  --border-strong: rgba(13, 15, 17, 0.16);
  --surface-hover: rgba(13, 15, 17, 0.05);

  --logo-bg: #FFFFFF;
  --logo-border: #0D0F11;
  --logo-fg: #0D0F11;
  --logo-slash: #B45416;
}

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

html {
  color-scheme: dark;
  scroll-padding-top: 76px;
}
html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.dot { color: var(--accent); }
.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;
}
.skip {
  position: absolute; top: 12px; left: -9999px; z-index: 100;
  padding: 8px 14px; border-radius: 8px; background: var(--accent);
  color: var(--fg-on-accent); font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 16px; }

/* Logo tile: colours flip with the theme through the --logo-* properties. */
.logo-tile { fill: var(--logo-bg); stroke: var(--logo-border); }
.logo-u, .logo-br { stroke: var(--logo-fg); }
.logo-slash { stroke: var(--logo-slash); }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-page);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-name { display: inline-flex; align-items: baseline; font-size: 15px; letter-spacing: -0.01em; line-height: 1; }
.brand-name strong { font-weight: 600; color: var(--fg-heading); }
.brand-name span { font-weight: 400; color: var(--fg3); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a, .icon-btn {
  padding: 6px 10px; border-radius: 8px; border: 0; background: none;
  color: var(--fg3); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: background-color 120ms, color 120ms;
}
.nav a:hover, .icon-btn:hover { background: var(--surface-hover); color: var(--fg1); }
.icon-btn { display: inline-flex; align-items: center; }
.icon-btn[hidden] { display: none; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-sun { display: inline; }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: inline; }

/* Hero */
.hero {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 56px 20px 48px; text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, var(--accent-glow), transparent 70%);
}
.hero h1 {
  margin: 0; max-width: 820px;
  font-size: clamp(38px, 6vw, 62px); line-height: 1.03; font-weight: 600;
  letter-spacing: -0.035em; text-wrap: balance; color: var(--fg-heading);
}
.hero p { margin: 0; max-width: 620px; font-size: 18px; line-height: 1.55; color: var(--fg2); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--border-1);
  font-size: 14px; font-weight: 500; line-height: 1; text-decoration: none;
  color: var(--fg1); background: var(--bg-sunken);
  transition: background-color 120ms, border-color 120ms, color 120ms;
}
.btn svg { width: 15px; height: 15px; flex: none; opacity: 0.7; transition: transform 120ms, opacity 120ms; }
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn:hover svg { transform: translateX(2px); opacity: 1; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--fg-on-accent); font-weight: 600; }
.btn-primary svg { opacity: 1; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Hero artifact: two panes, one lifespan each */
.hero .cta { margin-bottom: 8px; }
.artifact {
  width: 100%; max-width: 940px; margin: 28px auto 0;
  border: 1px solid var(--border-strong);
  border-radius: 14px; background: var(--bg-surface);
  overflow: hidden; text-align: left;
  box-shadow: 0 -1px 0 var(--accent-glow), 0 40px 90px -40px rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .artifact { box-shadow: 0 40px 90px -50px rgba(13, 15, 17, 0.35); }
.artifact-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  border-bottom: 1px solid var(--border-1); background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg3);
}
.artifact-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.artifact-bar .title { flex: 1; text-align: center; padding-right: 44px; }
.artifact-panes { display: grid; grid-template-columns: 1fr; }
.pane { padding: 18px 20px 20px; min-width: 0; }
.pane + .pane { border-top: 1px solid var(--border-1); }
.pane-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg3);
}
.pane-head strong { font-weight: 500; color: var(--fg1); }
.mark { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.mark-burn { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.log {
  margin: 0; overflow-x: auto; white-space: pre;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--fg2);
}
.log .k { color: var(--fg1); }
.log .t { color: var(--accent); }
[data-theme="light"] .log .t { color: #B45416; }
.log .dim { color: var(--fg3); }
.log .gone { color: var(--fg3); text-decoration: line-through; text-decoration-color: var(--accent); }
@media (max-width: 719px) { .log { font-size: 12px; } .pane { padding: 16px; } }
@media (min-width: 720px) {
  .artifact-panes { grid-template-columns: 1fr 1fr; }
  .pane + .pane { border-top: 0; border-left: 1px solid var(--border-1); }
}


/* Products */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.products { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 8px 0 56px; }
.product {
  display: flex; flex-direction: column; gap: 20px; min-width: 0;
  padding: 24px; border: 1px solid var(--border-1); border-radius: 14px;
  background: var(--bg-surface);
}
.product-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.host { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg3); }
.product h2 {
  margin: 0; font-size: 34px; font-weight: 600; line-height: 1.05;
  letter-spacing: -0.03em; color: var(--fg-heading);
}
.tagline { margin: -8px 0 0; font-size: 16px; color: var(--fg2); }

.code {
  margin: 0; padding: 18px 20px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--border-1); border-radius: 10px; background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.8; color: var(--fg1);
}
.code .dim { color: var(--fg3); }
.code .tok { color: var(--accent); }
[data-theme="light"] .code .tok { color: #B45416; }

.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.points li { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.55; color: var(--fg2); }
.points li::before {
  content: ''; position: absolute; left: 2px; top: 0.6em;
  width: 8px; height: 2px; border-radius: 1px; background: var(--accent);
}
.points strong { font-weight: 500; color: var(--fg1); }
.product .btn { align-self: flex-start; margin-top: auto; }

/* Comparison */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--fg-heading); }
.section-head p { margin: 0; font-size: 14px; color: var(--fg2); }
/* Comparison matrix */
.compare { margin-bottom: 72px; }
.matrix-wrap { border: 1px solid var(--border-1); border-radius: 12px; background: var(--bg-surface); overflow: hidden; }
.matrix { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.matrix .col-label { width: 16%; }
.matrix th, .matrix td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-1); }
.matrix tr:last-child > * { border-bottom: 0; }
.matrix thead th {
  padding-top: 14px; padding-bottom: 14px; background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--fg1);
}
.matrix thead th .mark { display: inline-block; vertical-align: middle; margin: -2px 8px 0 0; }
.matrix thead th em { font-style: normal; color: var(--fg3); margin-left: 8px; }
.matrix tbody th { font-weight: 500; color: var(--fg3); }
.matrix td { color: var(--fg1); line-height: 1.5; }
.matrix td small { display: block; margin-top: 2px; font-size: 13px; color: var(--fg3); }
.matrix tbody tr:hover > * { background: var(--surface-hover); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.chips + .chips { margin-left: 6px; }
.chips b {
  padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border-1); background: var(--bg-sunken);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--fg2); white-space: nowrap;
}
.chips-lead { margin-right: 8px; color: var(--fg2); }
.chips-tail { margin-left: 6px; margin-right: 0; }
.glyph { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin: -2px 6px 0 0; border-radius: 50%; vertical-align: middle; }
.glyph svg { width: 11px; height: 11px; }
.glyph-yes { background: var(--accent); color: var(--fg-on-accent); }
.glyph-no { border: 1px solid var(--border-strong); color: var(--fg3); }
@media (max-width: 639px) {
  .matrix thead { display: none; }
  .matrix colgroup { display: none; }
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: auto; }
  .matrix tr { padding: 14px 18px 6px; border-bottom: 1px solid var(--border-1); }
  .matrix tr:last-child { border-bottom: 0; }
  .matrix tbody tr:hover > * { background: none; }
  .matrix tbody th { padding: 0 0 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }
  .matrix td { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px 0; border: 0; }
  .matrix .cell { min-width: 0; }
  .matrix td::before { content: attr(data-label); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg3); padding-top: 2px; }
}

main { flex: auto; min-width: 0; }

/* Footer */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 16px; border-top: 1px solid var(--border-1);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg3);
}
.footer .brand { opacity: 0.7; gap: 8px; transition: opacity 120ms; }
.footer .brand:hover { opacity: 1; }
.footer .brand-name { font-family: var(--font-display); font-size: 13px; letter-spacing: -0.01em; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--accent); }

/* 404 */
.notfound { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 96px 20px; text-align: center; }
.notfound h1 { margin: 0; font-size: clamp(38px, 6vw, 62px); line-height: 1.03; font-weight: 600; letter-spacing: -0.035em; color: var(--fg-heading); }
.notfound p { margin: 0; color: var(--fg2); font-size: 18px; }

@media (min-width: 640px) {
  .topbar, .footer { padding-left: 32px; padding-right: 32px; }
  .topbar { gap: 24px; }
  .hero { padding: 96px 32px 64px; }
  .wrap { padding: 0 32px; }
}
@media (max-width: 479px) {
  .cta { width: 100%; max-width: 320px; }
  .cta .btn { flex: 1 1 100%; }
}
@media (min-width: 900px) {
  .products { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
