/* The static landing page: the rules of the website's app.css that the landing page, the footer and the theme
   switch use, on top of the design tokens (tokens.css). */

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font: var(--text-md)/var(--leading-normal) var(--font-sans);
}

a {
  color: var(--color-accent);
}

h1, h2, h3 {
  margin: 0;
  line-height: var(--leading-tight);
  font-weight: var(--weight-semibold);
}

h1 {
  font-size: var(--text-xl);
}

.bb-muted {
  color: var(--color-fg-muted);
}

.bb-caps {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--color-fg-muted);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* Frame: page and footer */
.bb-shell {
  --footer-height: 44px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.bb-page {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}

.bb-footer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  height: var(--footer-height);
  box-sizing: border-box;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: 0 max(var(--space-4), env(safe-area-inset-left, 0px));
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  white-space: nowrap;
}

.bb-footer a:last-child {
  margin-left: auto;
}

.bb-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.bb-footer-brand img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

/* Pills */
.bb-pill {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-strong);
  color: var(--color-fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 18px;
  white-space: nowrap;
}

.bb-pill-open {
  border-color: var(--color-success);
  color: var(--color-success);
}

/* Theme switch: a segmented control */
.bb-theme-switch {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2px;
}

.bb-theme-switch button {
  font: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--color-fg-muted);
  cursor: pointer;
}

.bb-theme-switch button[aria-pressed="true"] {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

/* Landing page */
.bb-landing {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding-block: var(--space-4);
}

.bb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: var(--space-7);
  align-items: center;
}

.bb-hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bb-hero-text p {
  margin: 0;
}

.bb-hero h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.bb-lead {
  font-size: 18px;
  line-height: var(--leading-normal);
  color: var(--color-fg-muted);
  max-width: 52ch;
}

.bb-proof {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}

.bb-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.bb-panel > .bb-caps {
  display: block;
  padding: 10px 18px 0;
}

.bb-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
}

.bb-panel-head .bb-pill {
  margin-left: auto;
}

.bb-chat {
  padding: var(--space-3) 18px var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.45;
}

.bb-msg-name {
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.bb-msg-bot {
  color: var(--color-accent);
}

.bb-qrow {
  display: flex;
  gap: var(--space-3);
  padding: 10px 18px;
  border-top: 1px solid var(--color-border);
}

.bb-qrow-current {
  background: var(--color-accent-soft);
}

.bb-qrow-current .bb-pos {
  color: var(--color-accent);
}

.bb-pos {
  color: var(--color-fg-muted);
  width: 14px;
}

.bb-song {
  font-weight: var(--weight-medium);
}

.bb-who {
  margin-left: auto;
  color: var(--color-fg-muted);
}

.bb-stream {
  background: #1b1b1b;
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.bb-stream .bb-caps {
  color: #8fa3b3;
}

.bb-stream b {
  font: 700 22px 'Open Sans', var(--font-sans);
  color: #ffffff;
}

.bb-stream b span {
  color: #6680ff;
}

.bb-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bb-features h2 {
  font-size: var(--text-xl);
}

.bb-feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.bb-feat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-4) 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.bb-feat svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.8;
  margin-bottom: var(--space-1);
}

.bb-feat b {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
}

.bb-feat span {
  color: var(--color-fg-muted);
  line-height: var(--leading-normal);
}

/* Phones */
@media (max-width: 900px) {
  .bb-footer {
    gap: var(--space-3);
    height: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .bb-landing {
    gap: var(--space-5);
  }

  .bb-hero {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .bb-hero h1 {
    font-size: 30px;
  }

  .bb-feat-grid {
    grid-template-columns: 1fr;
  }

  .bb-feat {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: var(--space-3);
    row-gap: 2px;
    padding: var(--space-3) var(--space-4);
  }

  .bb-feat svg {
    grid-row: span 2;
    margin: 2px 0 0;
  }

  .bb-feat b,
  .bb-feat span {
    grid-column: 2;
  }
}
