/* synaptik.app — brand colours and type from the brand guide. */

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-800.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --ground: #FAFAF7;
  --text: #15181C;
  --muted: #4B5159;
  --line: #E4E3DD;
  --panel: #F1F0EA;
  --blue: #2385B0;
  --violet: #7457D6;
  --amber: #D98A1C;
  /* The brand blue darkened for text: #2385B0 is 3.97:1 on the ground, under
     WCAG's 4.5:1; this is 5.27:1. */
  --link: #1D7096;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1013;
    --text: #F2EFE8;
    --muted: #B4B8BF;
    --line: #262A31;
    --panel: #16191E;
    --blue: #7FD3F0;
    --violet: #B59CF5;
    --amber: #F5B14C;
    --link: #7FD3F0;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--violet); }

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 2.25rem; height: 2.25rem; }

.wordmark {
  font: 800 1.45rem/1 "JetBrains Mono", var(--mono);
  letter-spacing: -0.045em;
  /* The line box leaves room below for descenders (y, p), so centring it puts
     the letters under the mark's middle; this centres the mark on the letters
     between their tops and the baseline. */
  position: relative;
  top: -0.15em;
}
.wordmark span { color: var(--amber); }

.site-header nav { display: flex; gap: 1.1rem; font-weight: 600; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--text); }

/* Content */

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 2.5rem 0 1rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2.75rem 0 0.75rem;
}

.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.75rem; }

.demo { margin: 0 0 1.5rem; }
.demo video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0E1013;
}
.demo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.1rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* What it does: the product's own margin marks, hanging left of the text the
   way they sit beside a block in the terminal. */
.marks { list-style: none; padding: 0; }
.marks li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  align-items: start;
  margin: 0.9rem 0;
}
/* Each glyph is centred on the first line of its text: its box is exactly one
   body line tall (1.0625rem × 1.65), with the glyph centred inside. */
.glyph {
  display: flex;
  align-items: center;
  height: calc(1.0625rem * 1.65);
  font: 700 1.45rem/1 var(--mono);
  font-variant-emoji: text;
}
.glyph-mark { color: var(--blue); }
/* A quote mark is drawn at the top of its box; lower it to the line's middle. */
.glyph-thread { color: var(--violet); position: relative; top: 0.28em; }
.glyph-lines { color: var(--amber); }
@media (min-width: 52rem) {
  .marks li { margin-left: -2.25rem; }
}

/* Why: two columns; on a phone each row stacks, labelled. */
.why {
  width: 100%;
  /* Two equal columns, whatever each cell holds. */
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.why th {
  width: 50%;
  text-align: left;
  font-weight: 600;
  padding: 0 0 0.5rem;
  border-bottom: 1px solid var(--line);
}
.why td {
  vertical-align: top;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
/* A gutter between the columns: 1.25rem each side of the middle. */
.why th:first-child, .why td:first-child { padding-right: 1.25rem; }
.why th + th, .why td + td { padding-left: 1.25rem; }
.why td:first-child { color: var(--muted); }
@media (max-width: 34rem) {
  .why thead { display: none; }
  .why tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
  .why td, .why td:first-child, .why td + td { display: block; padding: 0.2rem 0; border: 0; }
  .why td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--text);
  }
}

code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }

kbd {
  padding: 0.05em 0.35em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

pre {
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
}

ul { padding-left: 1.2rem; }
li { margin: 0.35rem 0; }

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

/* Footer */

.site-footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.4rem 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
