@font-face {
  font-family: "DM Sans";
  font-weight: 300;
  font-style: normal;
  font-display: block;
  src: url("../fonts/dm-sans-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-weight: 500;
  font-style: normal;
  font-display: block;
  src: url("../fonts/dm-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-weight: 700;
  font-style: normal;
  font-display: block;
  src: url("../fonts/dm-sans-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #16181D;
  --ink: #E8ECF1;
  --accent: #FF6A2B;
  --muted: #9AA4B2;
  /* base size; the wordmark, slogan and gap are sized relative to it */
  --logo: min(16vw, 88px);
  /* the torus is drawn this much larger than the base size */
  --mark: 1.1;
  color-scheme: dark;
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  place-items: center;
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero {
  display: flex;
  align-items: center;
  gap: calc(var(--logo) * 0.25);
}

#logo {
  width: calc(var(--logo) * var(--mark));
  height: calc(var(--logo) * var(--mark));
  display: block;
}

/* Wordmark above, slogan below, together exactly as tall as the torus: the top of the capitals
   meets the top of the torus and the slogan's baseline meets its bottom. At rest the torus
   fills 81% of its canvas height. A line-height equal to the font's cap height (0.7em in
   DM Sans) makes each line box run from cap top to baseline, so the two lines can simply be
   pushed to the ends of the block. */
.text {
  height: calc(var(--logo) * var(--mark) * 0.81);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.word {
  margin: 0;
  font: 500 calc(var(--logo) * 0.63) / 0.7 "DM Sans", sans-serif;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.word b {
  font-weight: 700;
  color: var(--accent);
}

.slogan {
  margin: 0;
  font: 300 calc(var(--logo) * 0.23) / 0.7 "DM Sans", sans-serif;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  font: 300 12px / 1.3 "DM Sans", sans-serif;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.7;
}
