/* TrustBnB documentation. Ink surfaces, lime signature, iris for interaction. */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(bricolage-grotesque.woff2) format('woff2');
}

:root {
  color-scheme: light dark;
  --ink: #15122b;
  --ink-2: #241f45;
  --lavender: #b8b2e0;
  --lime: #d2fa5a;
  --iris: #7c5cff;

  --page: #faf8f3;
  --surface: #ffffff;
  --text: #15122b;
  --text-2: #5c5878;
  --line: #e7e3f2;
  --link: #5b3fe0;
  --code-bg: #f0edf8;
  --selected: rgb(124 92 255 / 0.1);

  --display: 'Bricolage Grotesque', ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0e0c1f;
    --surface: #1c1838;
    --text: #f4f2ff;
    --text-2: #b8b2e0;
    --line: #2c2752;
    --link: #b3a3ff;
    --code-bg: #221d45;
    --selected: rgb(124 92 255 / 0.2);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16.5px/1.7 var(--body);
}
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--iris); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; padding: 8px 14px; border-radius: 8px; background: var(--lime); color: var(--ink); font-weight: 700; }
.skip:focus { left: 8px; }

/* ── Top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 max(20px, calc((100vw - 1320px) / 2));
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.mark { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12); }
.wordmark { font: 800 21px/1 var(--display); letter-spacing: -0.03em; color: inherit; }
.wordmark b { color: var(--lime); font-weight: 800; }
.tag { padding: 3px 9px; border-radius: 999px; border: 1px solid rgb(184 178 224 / 0.35); color: var(--lavender); font: 600 12px/1 var(--body); letter-spacing: 0.02em; }
.top-links { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.top-links a:not(.button) { color: var(--lavender); text-decoration: none; font-size: 15px; }
.top-links a:not(.button):hover { color: #fff; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font: 700 16px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s;
}
.button.small { height: 36px; padding: 0 16px; font-size: 14px; }
.button.primary { background: var(--lime); color: var(--ink); }
.button.primary:hover { box-shadow: 0 0 0 4px rgb(210 250 90 / 0.22); }
.button.ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(184 178 224 / 0.4); }
.button.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--lavender); }

/* ── Home hero ── */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 85% 0%, #2b2160 0%, var(--ink) 58%);
  color: #fff;
}
.hero-star { position: absolute; right: -90px; top: -110px; width: 620px; height: 620px; opacity: 0.16; pointer-events: none; }
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  width: min(1320px, 100% - 40px);
  margin: 0 auto;
  padding: 72px 0 80px;
}
.eyebrow { margin: 0 0 14px; color: var(--lavender); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.hero h1 { margin: 0; font: 800 clamp(40px, 6vw, 68px)/1 var(--display); letter-spacing: -0.04em; }
.hero h1 em { display: block; font-style: normal; color: var(--lime); }
.hero-lead { max-width: 34em; margin: 20px 0 30px; color: #dcd8f5; font-size: 19px; line-height: 1.55; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.demo { display: grid; gap: 12px; justify-self: end; }
.demo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.09);
}
.demo .airbnb { min-width: 4.4em; color: var(--lavender); font-size: 18px; text-decoration: line-through; text-decoration-color: rgb(184 178 224 / 0.55); }
.demo .arrow { color: var(--lavender); }
.demo .badge { height: 34px; padding: 0 14px 0 10px; font-size: 17px; }
.demo .badge svg { width: 19px; height: 19px; }
.demo-note { margin: 2px 4px 0; color: var(--lavender); font-size: 13px; }

/* ── Layout ── */
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 760px) 200px;
  justify-content: center;
  gap: 56px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}
.home .shell { padding-top: 48px; }

.sidebar { position: relative; }
.side-nav, .toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.nav-title { margin: 22px 0 6px; font: 700 12px/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.side-nav > .nav-title:first-child, .toc .nav-title { margin-top: 0; }
.sidebar ul, .toc ul { margin: 0; padding: 0; list-style: none; }
.sidebar li a {
  display: block;
  padding: 6px 12px;
  margin-left: -12px;
  border-radius: 10px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
}
.sidebar li a:hover { color: var(--text); background: var(--selected); }
.sidebar li a[aria-current='page'] { color: var(--text); background: var(--selected); font-weight: 650; box-shadow: inset 3px 0 0 var(--iris); }
.menu { display: none; }

.toc li a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 14px; line-height: 1.4; }
.toc li a:hover { color: var(--text); border-color: var(--iris); }

/* ── Prose ── */
.prose > :first-child { margin-top: 0; }
.prose h1 { margin: 0 0 20px; font: 800 clamp(34px, 5vw, 46px)/1.05 var(--display); letter-spacing: -0.035em; }
.prose h2 { margin: 2.4em 0 0.6em; font: 750 28px/1.2 var(--display); letter-spacing: -0.025em; }
.prose h3 { margin: 1.9em 0 0.5em; font: 700 20px/1.3 var(--display); letter-spacing: -0.015em; }
.prose h4 { margin: 1.6em 0 0.4em; font-size: 16.5px; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor { position: absolute; left: -0.9em; width: 0.9em; color: var(--iris); text-decoration: none; opacity: 0; font-weight: 600; }
:is(h2, h3, h4):hover .anchor, .anchor:focus { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0.3em 0; }
.prose li::marker { color: var(--text-2); }
.prose strong { font-weight: 650; }
.prose hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--line); }

.prose > p:first-of-type { font-size: 18.5px; line-height: 1.6; }
.home .prose > p:first-of-type { font-size: inherit; line-height: inherit; }

code { font: 0.88em/1.5 var(--mono); }
:not(pre) > code { padding: 0.15em 0.4em; border-radius: 6px; background: var(--code-bg); overflow-wrap: anywhere; }
pre {
  margin: 0 0 1.4em;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: #e9e6ff;
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
pre code { font-size: 14px; line-height: 1.65; }
kbd { padding: 0.1em 0.45em; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); font: 0.85em var(--mono); }

table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 0 1.4em;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
}
th { padding: 8px 16px 8px 0; border-bottom: 1.5px solid var(--line); text-align: left; font: 700 12px/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

blockquote {
  margin: 0 0 1.4em;
  padding: 14px 18px;
  border-radius: 0 14px 14px 0;
  background: var(--selected);
  box-shadow: inset 3px 0 0 var(--iris);
}
blockquote > :last-child { margin-bottom: 0; }

/* The TrustBnB badge, as it appears on Airbnb. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 700 13px/1 var(--body);
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
}
.badge svg { width: 14px; height: 14px; flex: none; }
.badge span { color: var(--lavender); font-weight: 500; }

.tier { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.tier::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--tier); box-shadow: 0 0 0 3px var(--ink); margin: 0 3px; }

/* Feature cards and steps */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 2em; }
.card { padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.card h3 { margin: 0 0 6px; font: 700 18px/1.3 var(--display); }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.card .icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 11px; background: var(--ink); color: var(--lime); font-size: 18px; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; margin: 0 0 14px; padding: 2px 0 0 48px; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font: 800 15px/1 var(--display);
}

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 1.6em; }
.flow span { padding: 8px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.flow span.ours { background: var(--ink); border-color: var(--ink); color: #fff; }
.flow i { color: var(--text-2); font-style: normal; }

.formula { margin: 0 0 1.4em; padding: 16px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font: 17px/1.6 var(--mono); overflow-x: auto; }

.swatches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 1.6em; }
.swatch { display: flex; gap: 14px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.swatch .chip { flex: none; width: 52px; height: 52px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.swatch p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.swatch code { font-size: 12.5px; }

.cities { columns: 3; column-gap: 24px; padding: 0 !important; list-style: none; font-size: 15px; }
.cities li { margin: 0 0 4px; }

.screens { display: grid; gap: 10px; margin: 0 0 1.6em; }

/* Pager and footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.pager a { display: block; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font: 700 17px/1.3 var(--display); }
.pager a:hover { border-color: var(--iris); }
.pager a span { display: block; margin-bottom: 4px; color: var(--text-2); font: 500 13px/1 var(--body); }
.pager .next { text-align: right; grid-column: 2; }

.footer { padding: 28px max(20px, calc((100vw - 1320px) / 2)) 40px; background: var(--ink); color: var(--lavender); font-size: 14px; }
.footer > div { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #fff; }
.footer p { margin: 4px 0; }
.footer a { color: #fff; }

/* ── Smaller screens ── */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 220px minmax(0, 760px); gap: 44px; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding-top: 52px; padding-bottom: 56px; }
  .demo { justify-self: start; }
  .shell { display: block; padding-top: 20px; }
  .side-nav { display: none; }
  .menu { display: block; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .menu summary { padding: 12px 16px; cursor: pointer; font-weight: 650; }
  .menu nav { padding: 0 16px 12px; }
  .menu li a { margin-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-links a:not(.button) { display: none; }
  .tag { display: none; }
  .hero-star { width: 420px; height: 420px; right: -160px; top: -60px; opacity: 0.1; }
  .hero-lead { font-size: 17px; }
  .demo-row { padding: 12px 14px; gap: 10px; }
  .cards, .swatches { grid-template-columns: 1fr; }
  .cities { columns: 2; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .anchor { display: none; }
}
