/* ============================================================
   colloq.dev

   The component layer under assets/ui-core/ is vendored from
   unisonweb/ui-core (MIT, see assets/ui-core/LICENSE): the token
   architecture, buttons, cards, tags, dividers, sidebar and the
   code syntax colors. This file adds only what a marketing and
   docs site needs on top of it.
   ============================================================ */

@import "/assets/ui-core/core.css";
@import "/assets/ui-core/colors.css";
@import "/assets/ui-core/theme.css";
@import "/assets/ui-core/base.css";
@import "/assets/ui-core/components.css";

/* ---- fonts: the ui-core families, self-hosted ---- */

@font-face {
  font-family: "Inter var";
  src: url("/assets/fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fira Code var";
  src: url("/assets/fonts/FiraCode.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --shell-max: 1240px;
  --sky-1: #8f9dff;
  --sky-2: #bcc4ff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans-serif);
  background: var(--u-color_background);
  color: var(--u-color_text);
  min-height: 100vh;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 0.75rem;
  z-index: var(--layer-modal);
  padding: 0.5rem 0.875rem;
  border-radius: var(--border-radius-base);
  background: var(--u-color_action_emphasized);
  color: var(--u-color_text-on-action-emphasized);
}

.wrap {
  width: min(var(--shell-max), 100% - 3rem);
  margin-inline: auto;
}

/* ---- app header, at the ui-core header height ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--layer-floating-controls);
  display: flex;
  align-items: center;
  gap: 1.75rem;
  height: var(--app-header-height);
  padding: 0 1.25rem;
  background: var(--u-color_background);
  border-bottom: 1px solid var(--u-color_divider);
}
.topbar-marketing {
  background: transparent;
  border-bottom: none;
  max-width: var(--shell-max);
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--u-color_text_emphasized);
}
.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
}
.brand-mark circle:nth-child(2) {
  fill: var(--color-teal-2);
  stroke: currentColor;
}

.topnav {
  display: flex;
  gap: 0.125rem;
  margin-right: auto;
  font-size: var(--font-size-medium);
}
.topnav a {
  padding: 0.375rem 0.6875rem;
  border-radius: var(--border-radius-base);
  text-decoration: none;
  color: var(--u-color_text_subdued);
}
.topnav a:hover {
  background: var(--u-color_element_emphasized);
  color: var(--u-color_text);
}
.topnav a.active {
  background: var(--u-color_element_emphasized);
  color: var(--u-color_text);
  font-weight: 500;
}
.topbar-marketing .topnav a {
  color: #2b3050;
}
.topbar-marketing .topnav a:hover {
  background: rgba(255, 255, 255, 0.45);
  color: #14172b;
}

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

.hero {
  position: relative;
  padding: 3.5rem 1.5rem 0;
  text-align: center;
  background: linear-gradient(
    180deg,
    var(--sky-1) 0%,
    var(--sky-2) 32%,
    #e7e9fb 62%,
    var(--u-color_background) 100%
  );
}
.hero-inner {
  max-width: 54rem;
  margin-inline: auto;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 0 0 1.125rem;
}
.hero-sub {
  max-width: 46rem;
  margin: 0 auto;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: #242840;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin: 2rem 0 3.25rem;
}
.hero .tag {
  margin-bottom: 1.5rem;
  font-family: var(--font-monospace);
}
.card .tag,
.tag-row .tag {
  font-family: var(--font-monospace);
}

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

.section {
  padding: 5.5rem 0 4.5rem;
}
.section-subdued {
  background: var(--u-color_background_subdued);
  border-top: 1px solid var(--u-color_divider);
  border-bottom: 1px solid var(--u-color_divider);
}
.section-dark {
  background: var(--color-gray-1);
  color: var(--color-gray-9);
}
.section-dark h2,
.section-dark h3 {
  color: #fff;
}
.section-dark .section-lede,
.section-dark .kicker {
  color: var(--color-gray-5);
}
.section-tight {
  padding: 3.5rem 0 3.25rem;
}

.kicker {
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--u-color_text_subdued);
  margin: 0 0 0.875rem;
}
.section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.028em;
  margin: 0 0 0.875rem;
  max-width: 24ch;
}
.section-lede {
  max-width: 62ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--u-color_text_subdued);
  margin: 0 0 2.25rem;
}
.section-lede a {
  color: var(--u-color_interactive);
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 128, 118, 0.3);
}
.section-lede a:hover {
  border-bottom-color: var(--u-color_interactive);
}
.section-dark .section-lede a,
.section-dark .note a {
  color: var(--color-teal-2);
  border-bottom-color: rgba(85, 244, 231, 0.35);
}
.center {
  text-align: center;
}
.center h2,
.center .section-lede {
  margin-inline: auto;
}

/* ---- cards (ui-core .card) ---- */

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--u-color_text_subdued);
}
.card .tag {
  margin-bottom: 0.75rem;
}
.card-foot {
  margin-top: 0.875rem;
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  color: var(--u-color_text_subdued);
}

/* ---- code surfaces ---- */

.terminal {
  margin: 0 auto;
  width: min(60rem, 100%);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--color-gray-1);
  border: 1px solid var(--color-gray-2);
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(24, 24, 28, 0.45);
  text-align: left;
}
.terminal-hero {
  transform: translateY(2.5rem);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6875rem 1rem;
  background: var(--color-gray-0);
  border-bottom: 1px solid var(--color-gray-2);
}
.lamp {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--color-gray-3);
}
.terminal-name {
  margin-left: 0.5rem;
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  color: var(--color-gray-4);
}
.terminal pre,
.code-card pre {
  margin: 0;
  padding: 1.125rem 1.25rem 1.25rem;
  overflow-x: auto;
}
.terminal code,
.code-card code {
  font-family: var(--font-monospace);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--color-gray-6);
}
.terminal code {
  font-variant-ligatures: none;
}
.code-card {
  margin: 0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--color-gray-1);
  border: 1px solid var(--color-gray-2);
}
.code-card figcaption {
  padding: 0.625rem 1rem;
  background: var(--color-gray-0);
  border-bottom: 1px solid var(--color-gray-2);
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  color: var(--color-gray-4);
}
.c-prompt {
  color: var(--color-teal-2);
}
.c-ok {
  color: var(--color-green-2);
}
.c-id {
  color: var(--color-blue-3);
}
.k {
  color: var(--color-pink-3);
}
.t {
  color: var(--color-teal-3);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: start;
}
.facts {
  list-style: none;
  margin: 0;
  padding: 0;
}
.facts li {
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--u-color_divider);
}
.facts li:first-child {
  border-top: 1px solid var(--u-color_divider);
}
.facts h3 {
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.375rem;
}
.facts p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--u-color_text_subdued);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- evidence ---- */

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.kpi {
  padding: 1.25rem 1.25rem 1.375rem;
  border: 1px solid var(--color-gray-2);
  border-radius: 0.5rem;
  background: var(--color-gray-0);
}
.kpi strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}
.kpi span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-gray-5);
}
.note {
  font-size: 0.9375rem;
  color: var(--color-gray-5);
  max-width: 64ch;
}

/* ---- marketing footer ---- */

.footer {
  border-top: 1px solid var(--u-color_divider);
  background: var(--u-color_background_subdued);
  padding: 3.5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}
.footer-grid a {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--u-color_text_subdued);
}
.footer-grid a:hover {
  color: var(--u-color_text);
}
.footer-head {
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--u-color_text_subdued);
  margin: 0 0 0.5rem;
}
.footer-note {
  margin: 0.75rem 0 0;
  max-width: 34ch;
  font-size: 0.9375rem;
  color: var(--u-color_text_subdued);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--u-color_divider);
  font-size: 0.875rem;
  color: var(--u-color_text_subdued);
}

/* ============================================================
   Docs, spec and RFC pages
   ============================================================ */

.layout {
  display: grid;
  grid-template-columns: var(--c-width_sidebar_regular) minmax(0, 1fr);
  max-width: var(--shell-max);
  margin: 0 auto;
  align-items: start;
}
.app-doc .layout {
  min-height: calc(100vh - var(--app-header-height));
}
.docs-sidebar {
  position: sticky;
  top: var(--app-header-height);
  align-self: start;
  max-height: calc(100vh - var(--app-header-height));
  overflow-y: auto;
  padding: 1.5rem 1rem 3rem 1.25rem;
  border-right: 1px solid var(--u-color_divider);
}
.side-head {
  margin: 1.25rem 0 0.375rem;
  font-family: var(--font-monospace);
  font-size: var(--font-size-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--u-color_text_subdued);
}
.side-head:first-child {
  margin-top: 0;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.side-nav a {
  padding: 0.3125rem 0.625rem;
  border-radius: var(--border-radius-base);
  font-size: var(--font-size-medium);
  text-decoration: none;
  color: var(--u-color_text_subdued);
}
.side-nav a:hover {
  background: var(--u-color_element_emphasized);
  color: var(--u-color_text);
}
.side-nav a.active {
  background: var(--u-color_element_emphasized);
  color: var(--u-color_text);
  font-weight: 500;
}

.doc {
  padding: 2.25rem 2.5rem 6rem;
}
body.app:not(.app-doc) .doc {
  margin-inline: auto;
  max-width: 62rem;
  width: 100%;
}
.prose {
  max-width: var(--readable-column-width-base);
}
.prose h1 {
  font-size: 2rem;
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 1rem;
}
.prose h2 {
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  margin: 2.5rem 0 0.75rem;
  padding-top: 1.125rem;
  border-top: 1px solid var(--u-color_divider);
}
.prose h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  margin: 1.75rem 0 0.5rem;
}
.prose p,
.prose li {
  color: var(--u-color_text);
  font-size: 0.96875rem;
  line-height: 1.65;
}
.prose p {
  margin: 0 0 0.875rem;
}
.prose .lead {
  font-size: 1.0625rem;
  color: var(--u-color_text_subdued);
  margin-bottom: 1.75rem;
}
.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.375rem;
}
.prose li {
  margin-bottom: 0.3125rem;
}
.prose a {
  color: var(--u-color_interactive);
  text-decoration: none;
  border-bottom: 1px solid rgba(11, 128, 118, 0.28);
}
.prose a:hover {
  border-bottom-color: var(--u-color_interactive);
}
.prose blockquote {
  margin: 0 0 1.125rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--u-color_border_subdued);
  background: var(--u-color_background_subdued);
  color: var(--u-color_text_subdued);
}
.prose code {
  font-family: var(--font-monospace);
  font-size: 0.84375rem;
  background: var(--u-color_element_emphasized);
  border-radius: var(--border-radius-base);
  padding: 0.0625rem 0.3125rem;
}
.prose pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.125rem;
  overflow-x: auto;
  background: var(--color-gray-1);
  border-radius: 0.5rem;
}
.prose pre code {
  font-size: 0.8125rem;
  line-height: 1.7;
  background: none;
  padding: 0;
  color: var(--color-gray-6);
  font-variant-ligatures: none;
}
.prose table {
  width: 100%;
  margin: 0 0 1.375rem;
  font-size: var(--font-size-medium);
  border: 1px solid var(--u-color_border_subdued);
  border-radius: var(--border-radius-base);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.5625rem 0.8125rem;
  border-bottom: 1px solid var(--u-color_divider);
  background: var(--u-color_container);
}
.prose th {
  background: var(--u-color_background_subdued);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--u-color_text_subdued);
}
.prose tr:last-child td {
  border-bottom: none;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--u-color_divider);
  margin: 2rem 0;
}
.edit {
  margin-top: 2.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--u-color_divider);
  font-size: var(--font-size-medium);
}
.index-group h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--u-color_text_subdued);
}
.index-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 2px;
}
.index-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius-base);
  text-decoration: none;
  color: var(--u-color_text);
}
.index-list a:hover {
  background: var(--u-color_container);
  border-color: var(--u-color_border_subdued);
}
.spec-table .mono {
  font-family: var(--font-monospace);
  font-size: 0.78125rem;
}

.doc-footer {
  border-top: 1px solid var(--u-color_divider);
  background: var(--u-color_container);
}
.doc-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 1.25rem;
  font-size: var(--font-size-medium);
  color: var(--u-color_text_subdued);
}
.doc-footer a {
  color: var(--u-color_text_subdued);
  text-decoration: none;
}
.doc-footer a:hover {
  color: var(--u-color_text);
}
.doc-footer .sep {
  color: var(--u-color_border_subdued);
}
.doc-footer .legal {
  margin-left: auto;
  font-size: var(--font-size-small);
  color: var(--u-color_text_very-subdued);
}

/* ---- responsive ---- */

@media (max-width: 62rem) {
  .card-row,
  .kpi-row,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--u-color_divider);
    padding: 1rem 1.25rem;
  }
  .doc {
    padding: 1.5rem 1.25rem 4rem;
  }
  .topnav {
    gap: 0;
  }
  .section {
    padding: 3.75rem 0 3rem;
  }
}
