/*
 * The landing page. Colours and type follow the app's own tokens
 * (packages/dom/src/tokens.css) so the page and the screenshots read as one
 * product: the warm off-white ground, the green accent, a serif for content
 * and a sans for chrome. System font stacks only; the page loads nothing
 * from a third party.
 */
:root {
  --font-sans:
    "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
    sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-mono:
    ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;

  --bg: #f4f4f1;
  --bg-tint: #ecece7;
  --surface: #ffffff;
  --fg: #17191c;
  --fg-muted: #565b63;
  --fg-faint: #8d939a;
  --border: #e2e2dd;
  --border-strong: #d0d1cb;
  --accent: #2f6f5e;
  --accent-strong: #245647;
  --accent-tint: #e2ede8;
  --accent-fg: #ffffff;
  --notice: #8a5a16;
  --danger: #a63a2e;
  --success: #2d7131;
  --shadow:
    0 1px 2px rgba(23, 25, 28, 0.04), 0 12px 40px -12px rgba(23, 25, 28, 0.18);
  --shadow-lg:
    0 2px 4px rgba(23, 25, 28, 0.04), 0 30px 80px -24px rgba(23, 25, 28, 0.32);

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: 16px;
  --max: 1160px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121413;
    --bg-tint: #181b19;
    --surface: #1d201e;
    --fg: #ecede9;
    --fg-muted: #a7aca6;
    --fg-faint: #767c76;
    --border: #2b2f2c;
    --border-strong: #3a3f3b;
    --accent: #5fb39a;
    --accent-strong: #79c7af;
    --accent-tint: #1f3a32;
    --accent-fg: #0d1a16;
    --notice: #d9a453;
    --danger: #e0786b;
    --success: #78c27c;
    --shadow:
      0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg:
      0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 80px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(44px, 8vw, 84px);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(30px, 4.4vw, 46px);
}

h3 {
  font-size: 24px;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 32px;
  }
}

.narrow {
  max-width: 780px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--fg-faint);
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-row.center {
  justify-content: center;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.brand-sm {
  font-size: 18px;
}

.brand-sm .mark {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: none;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

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

.nav .btn {
  margin-left: auto;
}

@media (min-width: 860px) {
  .nav-links {
    display: flex;
  }

  .nav .btn {
    margin-left: 0;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 0;
  text-align: center;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -64px 0 auto;
  height: 720px;
  z-index: -1;
  background:
    radial-gradient(
      60% 50% at 50% 0%,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 70%
    ),
    radial-gradient(
      40% 40% at 85% 20%,
      color-mix(in srgb, var(--notice) 9%, transparent),
      transparent 70%
    );
}

.hero .lede {
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--fg-muted);
}

.hero .cta-row {
  justify-content: center;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--fg-muted);
}

.hero-facts li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--accent);
  font-weight: 700;
}

.hero-shot {
  margin-top: 56px;
}

/* A browser window around the hero screenshot. */
.window {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--border);
}

.window-bar > span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}

.window-url {
  flex: 0 1 340px;
  margin: 0 auto;
  padding: 3px 14px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-faint);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- sections ---------- */

.section {
  padding: 96px 0;
}

.section-tint {
  background: var(--bg-tint);
}

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

.section-head p:not(.eyebrow) {
  font-size: 19px;
  color: var(--fg-muted);
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- features ---------- */

.feature {
  display: grid;
  gap: 32px;
  align-items: center;
  margin-bottom: 96px;
}

.feature:last-child {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 4fr 7fr;
    gap: 56px;
  }

  .feature-flip {
    grid-template-columns: 7fr 4fr;
  }

  .feature-flip .feature-copy {
    order: 2;
  }
}

.feature-copy p {
  color: var(--fg-muted);
}

.feature-num {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-tint);
}

.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shot img {
  width: 100%;
}

.status-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.status-key li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
}

.glyph {
  display: inline-block;
  width: 1.4em;
  text-align: center;
}

.glyph.blocked {
  color: var(--danger);
}

.glyph.complete {
  color: var(--success);
}

/* The rollup example: drawn in the outline's own idiom. */
.rollup {
  margin: 0;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.rollup-tree,
.rollup-tree ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
  font-size: 19px;
}

.rollup-tree ol {
  margin: 8px 0 0 12px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}

.rollup-tree li {
  padding: 4px 0;
}

.rollup-tree li::before {
  content: "•";
  color: var(--fg-faint);
  margin-right: 8px;
}

.rollup-tree > li {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: baseline;
}

.rollup-tree > li > ol {
  grid-column: 1 / -1;
}

.rollup-root {
  font-weight: 600;
}

.rollup-tree ol li {
  display: flex;
  align-items: baseline;
}

.rollup-tree em {
  margin-left: auto;
  padding-left: 16px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 13px;
  color: var(--fg-faint);
  text-align: right;
}

.r-in-progress > .glyph,
.r-in-progress > .label {
  color: var(--notice);
}

.r-blocked > .glyph,
.r-blocked > .label {
  color: var(--danger);
}

.r-complete > .glyph,
.r-complete > .label {
  color: var(--success);
}

.r-complete > .label {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.rollup figcaption {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--fg-muted);
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.card h3 {
  font-size: 20px;
}

.card p {
  margin: 0;
  font-size: 15px;
  color: var(--fg-muted);
}

/* ---------- clients ---------- */

.split {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 64px;
  }
}

.split > div > p {
  color: var(--fg-muted);
}

.platforms {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.platforms li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}

.platforms span {
  color: var(--fg-muted);
  text-align: right;
}

/* The terminal illustration: always dark, like a terminal. */
.terminal {
  margin: 0;
  min-width: 0;
}

.terminal-bar,
.tui {
  background: #15181a;
  color: #d8dcd6;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid #262a2c;
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3f42;
}

.terminal-bar b {
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: #80868a;
}

.tui {
  padding: 18px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.6vw, 14px);
  line-height: 1.75;
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
}

.tui-head,
.tui-row {
  display: flex;
  gap: 1ch;
  white-space: nowrap;
}

.tui-head {
  justify-content: space-between;
}

.tui-rule {
  height: 1px;
  margin: 8px 0;
  background: #3a3f42;
}

.tui-row i {
  font-style: normal;
  color: #80868a;
}

.tui-row u {
  width: 2.2ch;
  text-decoration: none;
}

.tui-row span {
  flex: 1;
}

.tui-row em,
.tui-row s,
.tui-row b {
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
  text-align: right;
}

.tui-row s {
  width: 2ch;
}

.tui-row b {
  width: 6ch;
}

.tui-row.in-progress span,
.tui-row.in-progress u {
  color: #e0b05e;
}

.tui-row.complete span {
  color: #7cc47f;
  text-decoration: line-through;
}

.tui-row.complete u {
  color: #7cc47f;
}

.tui-row.blocked span,
.tui-row.blocked u {
  color: #ea7b6e;
}

.tui-row.cursor {
  background: #24302c;
  margin: 0 -8px;
  padding: 0 8px;
  border-radius: 4px;
}

.tui .faint {
  color: #6a7074;
}

.tui-foot {
  color: #a3a9a4;
}

.tui-users {
  text-align: right;
  color: #a3a9a4;
}

.terminal figcaption,
.console figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--fg-faint);
}

/* ---------- shortcuts ---------- */

.keys {
  display: grid;
  gap: 1px;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}

@media (min-width: 640px) {
  .keys {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .keys {
    grid-template-columns: repeat(3, 1fr);
  }
}

.keys > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
}

.keys dt {
  white-space: nowrap;
  color: var(--fg-faint);
  font-size: 13px;
}

.keys dd {
  margin: 0;
  text-align: right;
  font-size: 15px;
  color: var(--fg-muted);
}

kbd {
  display: inline-block;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* ---------- self-hosted ---------- */

.host {
  display: grid;
  gap: 48px;
  align-items: start;
}

@media (min-width: 960px) {
  .host {
    grid-template-columns: 6fr 5fr;
    gap: 64px;
  }
}

.console {
  margin: 0;
  min-width: 0;
}

.console pre {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: #15181a;
  color: #d8dcd6;
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.5vw, 14px);
  line-height: 1.8;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}

.c-dim {
  color: #80868a;
}

.c-ok {
  color: #7cc47f;
}

.checks {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 36px;
  color: var(--fg-muted);
  font-size: 16px;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}

.checks strong {
  color: var(--fg);
}

/* ---------- pricing ---------- */

.plans {
  display: grid;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 900px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.plan-featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}

.badge {
  position: absolute;
  top: -13px;
  left: 32px;
  margin: 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan h3 {
  margin-bottom: 4px;
}

.plan-for {
  color: var(--fg-muted);
  font-size: 15px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0 24px;
}

.amount {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.per {
  color: var(--fg-faint);
  font-size: 15px;
}

.plan ul {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0 0 28px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-size: 15px;
  color: var(--fg-muted);
}

.plan li::before {
  content: "✓";
  margin-right: 10px;
  color: var(--accent);
  font-weight: 700;
}

.plan strong {
  color: var(--fg);
}

.plans-note {
  margin: 32px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 15px;
  color: var(--fg-muted);
}

/* ---------- faq ---------- */

details {
  border-bottom: 1px solid var(--border);
}

details:first-of-type {
  border-top: 1px solid var(--border);
}

summary {
  position: relative;
  padding: 22px 40px 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 300;
  color: var(--fg-faint);
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

details p {
  margin: 0 0 24px;
  color: var(--fg-muted);
}

/* ---------- closing + footer ---------- */

.closing {
  padding: 96px 0;
  text-align: center;
  background:
    radial-gradient(
      60% 80% at 50% 100%,
      color-mix(in srgb, var(--accent) 18%, transparent),
      transparent 70%
    ),
    var(--bg);
}

.closing p {
  margin-bottom: 32px;
  font-size: 19px;
  color: var(--fg-muted);
}

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
}

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

.fine {
  margin: 0;
  width: 100%;
  font-size: 13px;
  color: var(--fg-faint);
}

@media (min-width: 860px) {
  .fine {
    width: auto;
    margin-left: auto;
  }
}
