/* protobay landing page — dark-first, single stylesheet, no external resources. */

:root {
  --bg: #0b0f14;
  --bg-elev: #111721;
  --bg-code: #0d131b;
  --border: #242e3b;
  --border-soft: #1b2431;
  --text: #e6edf3;
  --text-muted: #9aa7b6;
  --accent: #58a6ff;
  --accent-strong: #79c0ff;
  --accent-contrast: #0b0f14;
  --green: #3fb950;
  --radius: 10px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-elev: #f6f8fa;
    --bg-code: #f6f8fa;
    --border: #d0d7de;
    --border-soft: #e2e6ea;
    --text: #1f2328;
    --text-muted: #59636e;
    --accent: #0969da;
    --accent-strong: #0550ae;
    --accent-contrast: #ffffff;
    --green: #1a7f37;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

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

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.6rem;
  margin: 3.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-soft);
}

h3 {
  font-size: 1.12rem;
  margin: 2rem 0 0.6rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

li {
  margin: 0.35rem 0;
}

section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(8px);
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header {
    background: var(--bg);
  }
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.65rem 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-muted);
}

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

.nav-gh {
  color: var(--text) !important;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.7rem);
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 40rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0 1.2rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 550;
  font-size: 0.98rem;
}

.btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

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

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

.badges {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.badges .dot {
  opacity: 0.6;
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.card h3 {
  margin-top: 0;
}

.card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.97rem;
}

@media (min-width: 620px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Code blocks ---------- */

.code {
  position: relative;
  margin: 0 0 1rem;
}

.code pre {
  margin: 0;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text);
}

.code pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer;
}

.copy:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.copy.copied {
  color: var(--green);
  border-color: var(--green);
}

.note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Screenshots ---------- */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.shot figcaption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.shot-large {
  margin: 1.5rem 0 1.25rem;
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

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

/* ---------- Table ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

caption {
  text-align: left;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
}

thead th {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 650;
}

tbody th {
  font-weight: 550;
  color: var(--text-muted);
  white-space: nowrap;
}

.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;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--maxw);
  margin: 4rem auto 0;
  padding: 2rem 20px 3rem;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer p {
  margin: 0.5rem 0;
}
