/* Witness site · shared styles. Design DNA from the product: near-black page, dot grid, Doto
   dot-matrix display, JetBrains Mono labels, one red signal accent, pills, calm motion. */
@import url("https://fonts.googleapis.com/css2?family=Doto:wght@600;800;900&family=JetBrains+Mono:wght@400;500;600;700&family=Schibsted+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --page: #0a0a0a;
  --card: #121212;
  --soft: #191919;
  --line: #242424;
  --ghost: #3a3a3a;
  --dim: #8a8a8a;
  --text: #d6d6d6;
  --strong: #f5f5f3;
  --accent: #ec5f5f;
  --accent-soft: rgba(236, 95, 95, 0.12);
  --pass: #7fc8a0;
  --warn: #e8c46a;
  --display: "Doto", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}
body {
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 16px / 1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  /* the 18px dot grid, fading toward the bottom of the first screen */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(255, 255, 255, 0.07) 1px,
    transparent 0
  );
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 0;
}
body::after {
  /* film grain */
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  opacity: 0.035;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main,
header,
footer,
nav,
section {
  position: relative;
  z-index: 1;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: var(--accent);
  color: #0a0a0a;
}
h1,
h2,
h3,
h4 {
  color: var(--strong);
  text-wrap: balance;
  margin: 0;
}
p {
  text-wrap: pretty;
  margin: 0 0 1em;
}
code,
kbd,
pre {
  font-family: var(--mono);
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── type ─────────────────────────────────────────────────────────── */
.label {
  font: 600 11px / 1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.label.red {
  color: var(--accent);
}
.dot-title {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.92;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text);
  max-width: 60ch;
  line-height: 1.55;
}
.muted {
  color: var(--dim);
}
.strong {
  color: var(--strong);
}
.red {
  color: var(--accent);
}
.pass {
  color: var(--pass);
}

/* ── nav ──────────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.2);
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9), rgba(10, 10, 10, 0.6));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--strong);
}
.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--strong);
  display: grid;
  place-items: center;
}
.brand-mark::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.brand-name {
  font: 900 20px / 1 var(--display);
  letter-spacing: 0.04em;
}
.top nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.top nav a {
  font: 500 13px / 1 var(--mono);
  color: var(--dim);
  transition: color 0.2s;
}
.top nav a:hover,
.top nav a[aria-current="page"] {
  color: var(--strong);
}

/* ── buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 600 13px / 1 var(--mono);
  letter-spacing: 0.02em;
  border: 1px solid var(--line);
  color: var(--strong);
  background: var(--card);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    background 0.25s;
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--ghost);
}
.btn.pri {
  background: var(--strong);
  color: #0a0a0a;
  border-color: var(--strong);
}
.btn.pri:hover {
  background: #fff;
}
.btn .arrow {
  transition: transform 0.25s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(3px);
}
.btn.sm {
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

/* ── cards: outer card holding a darker inset ─────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
}
.inset {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 10px;
  padding: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 12px;
}

/* ── status dots ──────────────────────────────────────────────────── */
.st {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ghost);
  flex: none;
}
.st.on {
  background: var(--pass);
  box-shadow: 0 0 10px rgba(127, 200, 160, 0.6);
}
.st.red {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(236, 95, 95, 0.6);
}
.st.warn {
  background: var(--warn);
}
.st.pulse {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* ── code ─────────────────────────────────────────────────────────── */
.code {
  position: relative;
  background: #0c0c0c;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 16px 18px;
  font: 400 13px / 1.7 var(--mono);
  color: #cfcfcf;
  overflow-x: auto;
  white-space: pre;
}
.code .c {
  color: #5f5f5f;
}
.code .k {
  color: var(--accent);
}
.code .s {
  color: var(--pass);
}
.code .p {
  color: var(--dim);
  user-select: none;
}
.copy {
  position: absolute;
  top: 10px;
  right: 10px;
  font: 600 10px / 1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.copy:hover {
  color: var(--strong);
}
:not(pre) > code {
  font-size: 0.88em;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--strong);
}

/* ── reveal on scroll ─────────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}
.rv.in {
  opacity: 1;
  transform: none;
}
.rv.d1 {
  transition-delay: 0.1s;
}
.rv.d2 {
  transition-delay: 0.2s;
}
.rv.d3 {
  transition-delay: 0.3s;
}

/* ── footer ───────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 120px;
  padding: 40px 0 60px;
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.foot a {
  color: var(--dim);
  font: 500 12px / 1 var(--mono);
}
.foot a:hover {
  color: var(--strong);
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 16px;
  }
  .top nav {
    gap: 14px;
  }
  .top nav a.hide-sm {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .rv {
    opacity: 1;
    transform: none;
  }
}
