/* BL0CK+SW1TCH components. Load tokens.css first.
   Dark promo classes carry tracking, colour and case but no font-size:
   set the size on the element (or a parent) and everything else follows. */

/* ---------- Dark promo mode ---------- */

.bs-dark {
  background: var(--bs-surface);
  color: var(--bs-text);
  font-family: var(--bs-font-display);
  font-weight: 700;
  text-transform: uppercase; /* Syncopate's lowercase letters are different glyphs; promo text is always capitals */
}

/* Wordmark: BL<O>CK + SW<1>TCH. Wrap each bracketed unit in .bs-bit and the plus in .bs-plus. */
.bs-wordmark {
  font-family: var(--bs-font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--bs-track-wordmark);
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--bs-text);
}
.bs-bit { color: var(--bs-accent); }       /* a bracketed digit, brackets included: <0>, <1> */
.bs-plus { color: var(--bs-text-muted); }

/* Lockup: wordmark with the tagline centred under it. Set font-size to the wordmark size. */
.bs-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(1em * var(--bs-ratio-lockup-gap));
}
.bs-tagline {
  font-family: var(--bs-font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--bs-track-tagline);
  margin-right: calc(-1 * var(--bs-track-tagline)); /* cancels the trailing tracking so the line centres */
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--bs-text-soft);
}
.bs-lockup > .bs-tagline { font-size: calc(1em * var(--bs-ratio-tagline)); }

/* Text over photography gets a soft dark shadow. Never use these shadows on a flat background. */
.bs-on-photo.bs-wordmark, .bs-on-photo .bs-wordmark { text-shadow: 0 calc(4em / 62) calc(14em / 62) rgb(0 0 0 / 0.6); }
.bs-on-photo.bs-tagline, .bs-on-photo .bs-tagline { text-shadow: 0 calc(2em / 23) calc(8em / 23) rgb(0 0 0 / 0.7); }

/* Headline: two short lines, one of them carrying a bit. */
.bs-headline {
  font-family: var(--bs-font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: var(--bs-track-headline);
  text-transform: uppercase;
  color: var(--bs-text);
}

/* Small lines. All three are the same size and differ in tracking and colour. */
.bs-link, .bs-action, .bs-label, .bs-name {
  font-family: var(--bs-font-display);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.bs-link { letter-spacing: var(--bs-track-link); color: var(--bs-text); white-space: nowrap; } /* something to type: brightest */
.bs-action { letter-spacing: var(--bs-track-action); color: var(--bs-text-secondary); }       /* an instruction, ends in chevrons */
.bs-label { letter-spacing: var(--bs-track-label); color: var(--bs-text-muted); }             /* role, contact, captions */
.bs-name { letter-spacing: var(--bs-track-name); color: var(--bs-text); }
.bs-chevrons { color: var(--bs-accent); }                                                      /* the >> after an action */

/* Chip frame holding a light plate, usually a QR code. Set the width; the rest scales. */
.bs-chip { position: relative; width: 371px; aspect-ratio: 371 / 413; flex: none; }
.bs-chip > .bs-chip-frame { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bs-chip > .bs-chip-plate {
  position: absolute;
  left: calc(14 / 371 * 100%);
  top: calc(56 / 413 * 100%);
  width: calc(343 / 371 * 100%);
  aspect-ratio: 1;
  border-radius: calc(7 / 343 * 100%);
  display: block;
  background: var(--bs-text);
}

/* ---------- Light document mode (Player Guide, character sheet) ---------- */

.bs-doc {
  background: var(--bs-paper);
  color: var(--bs-print-ink);
  font-family: var(--bs-font-body);
  font-size: var(--bs-doc-body);
  line-height: var(--bs-doc-leading);
}
.bs-doc b, .bs-doc strong { font-weight: 700; }
/* Document headings are typed in Title Case. Syncopate draws the lowercase letters as its own small forms. */
.bs-doc-title { font: 700 var(--bs-doc-title) / 1.2 var(--bs-font-display); text-align: center; margin: 0; }
.bs-doc-subtitle { font: 400 var(--bs-doc-subtitle) / 1.2 var(--bs-font-display); text-align: center; margin: 0; }
.bs-doc-h1 { font: 700 var(--bs-doc-h1) / 1.2 var(--bs-font-display); margin: 0; }
.bs-doc-group { font: 400 var(--bs-doc-group) / 1.2 var(--bs-font-display); text-transform: uppercase; margin: 0; }
.bs-doc-h2 { font: 700 var(--bs-doc-h2) / 1.2 var(--bs-font-display); margin: 0; }
.bs-doc-label { font: 400 var(--bs-doc-label) / 1.2 var(--bs-font-display); }
