:root {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --fg: #0a0a0c;
  --fg-muted: #5a5a64;
  --fg-soft: #8a8a94;
  --line: rgba(10, 10, 12, 0.08);
  --line-strong: rgba(10, 10, 12, 0.16);
  --accent: #ff5a1f;
  --accent-ink: #ffffff;
  --focus: #0a84ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 12, 0.04);
  --shadow-md: 0 8px 32px rgba(10, 10, 12, 0.06);
  --maxw: 1080px;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c;
    --bg-elev: #131316;
    --fg: #f4f4f6;
    --fg-muted: #a4a4ae;
    --fg-soft: #74747e;
    --line: rgba(244, 244, 246, 0.08);
    --line-strong: rgba(244, 244, 246, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "ss02", "cv11";
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 999;
}
.skip-link:focus {
  top: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ Header ============ */

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14.5px;
  color: var(--fg-muted);
}
.site-nav a:hover {
  color: var(--fg);
}

@media (max-width: 640px) {
  .site-nav {
    gap: 14px;
    font-size: 13px;
  }
  .site-nav a:nth-child(n + 4) {
    display: none;
  }
}

/* ============ Hero ============ */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 10vw, 110px) var(--gutter) clamp(48px, 8vw, 96px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 24px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--fg);
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: clamp(17px, 1.6vw, 19.5px);
  line-height: 1.55;
  color: var(--fg-muted);
}

.hero-cta {
  margin: 0 auto 24px;
  max-width: 480px;
}

.hero-foot {
  margin: 8px auto 0;
  font-size: 14.5px;
  color: var(--fg-muted);
}
.hero-foot a {
  color: var(--fg);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.hero-foot a:hover {
  text-decoration: none;
  border-bottom-color: var(--fg);
}

/* ============ Waitlist form ============ */

.waitlist {
  display: flex;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.waitlist:focus-within {
  border-color: var(--fg-muted);
  box-shadow: var(--shadow-md);
}

.waitlist input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font: inherit;
  color: var(--fg);
}
.waitlist input::placeholder {
  color: var(--fg-soft);
}

.waitlist button {
  border: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 80ms ease, opacity 120ms ease;
}
.waitlist button:hover {
  opacity: 0.88;
}
.waitlist button:active {
  transform: translateY(1px);
}
.waitlist button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.waitlist .label-loading {
  display: none;
}
.waitlist.is-loading .label-default {
  display: none;
}
.waitlist.is-loading .label-loading {
  display: inline;
}

.waitlist-status {
  margin: 14px 0 0;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--fg-muted);
}
.waitlist-status.is-error {
  color: #d8301a;
}
@media (prefers-color-scheme: dark) {
  .waitlist-status.is-error {
    color: #ff7a6e;
  }
}
.waitlist-status.is-success {
  color: #1e7d3a;
}
@media (prefers-color-scheme: dark) {
  .waitlist-status.is-success {
    color: #7be39a;
  }
}

@media (max-width: 520px) {
  .waitlist {
    flex-direction: column;
    padding: 8px;
  }
  .waitlist button {
    padding: 12px;
    justify-content: center;
  }
}

.waitlist-wide {
  max-width: 520px;
  margin: 28px auto 0;
}

/* ============ Sections ============ */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 40px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
}

.section-sub {
  max-width: 640px;
  margin: -20px auto 0;
  text-align: center;
  color: var(--fg-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 880px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.card-num {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ============ Split ============ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.split-col {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.split-col h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
}
.split-col .muted {
  color: var(--fg-soft);
  font-size: 14px;
  margin-top: 14px;
}

ul.clean {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.clean li {
  position: relative;
  padding: 7px 0 7px 22px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
ul.clean li:last-child {
  border-bottom: 0;
}
ul.clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-soft);
}

/* ============ Footer ============ */

.section-cta {
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
  color: var(--fg-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.footer-brand {
  font-weight: 600;
  font-size: 17px;
  color: var(--fg);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.footer-tag {
  margin: 0;
  font-size: 14px;
  max-width: 280px;
}
.footer-head {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin: 0 0 12px;
}
.site-footer ul.clean li {
  border-bottom: 0;
  padding: 4px 0;
  font-size: 14.5px;
}
.site-footer ul.clean li::before {
  display: none;
}

.copyright {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-soft);
}

/* ============ Doc pages (self-host, pricing, privacy, imprint) ============ */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter) clamp(64px, 10vw, 120px);
}
.doc h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.doc .lede {
  font-size: 18px;
  color: var(--fg-muted);
  margin: 0 0 40px;
}
.doc h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.doc h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
}
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
}
.doc pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.55;
}
.doc pre code {
  background: none;
  border: 0;
  padding: 0;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li + li {
  margin-top: 4px;
}
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.doc a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  font-size: 15.5px;
  color: var(--fg-muted);
}
.callout strong {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
