/* tuxcast: studio-night palette. Status colors only ever mean a check's state. */
:root {
  --tc-night: #171233;
  --tc-panel: #211a45;
  --tc-key: #2c2459;
  --tc-key-edge: #3a3172;
  --tc-text: #ece8ff;
  --tc-muted: #a99fd6;
  --tc-ok: #3ddc97;
  --tc-warn: #ffb84d;
  --tc-live: #ff4757;
  --tc-radius-deck: 22px;
  --tc-radius-key: 12px;
}

[data-md-color-primary="custom"] {
  --md-primary-fg-color: #2a2163;
  --md-primary-fg-color--light: #3a3172;
  --md-primary-fg-color--dark: #171233;
  --md-primary-bg-color: #ece8ff;
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color: #ff4757;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #171233;
  --md-default-fg-color--light: #c4bcef;
  --md-code-bg-color: #211a45;
  --md-typeset-a-color: #b9a8ff;
}

img.terminal {
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  border-radius: 10px;
}

/* ---------------------------------------------------------------- landing page */

.tc {
  --tc-measure: 34rem;
  color: var(--tc-text);
  background: var(--tc-night);
  font-size: 0.9rem;
}

.tc a {
  color: #c9bcff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.tc a:hover {
  color: #fff;
}

.tc a:focus-visible,
.tc button:focus-visible {
  outline: 2px solid var(--tc-warn);
  outline-offset: 3px;
}

.tc code {
  font-family: var(--md-code-font-family);
  font-size: 0.85em;
}

.tc-hero,
.tc-section {
  max-width: 68rem;
  margin: 0 auto;
  padding: 4.5rem 1.2rem;
}

.tc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  padding-top: 5rem;
}

.tc-title {
  margin: 0 0 1.4rem;
  font-size: clamp(2.3rem, 5.2vw, 3.9rem);
  line-height: 1.02;
  font-weight: 800;
  font-stretch: 85%;
  letter-spacing: -0.035em;
  color: #fff;
}

.tc-lede {
  max-width: var(--tc-measure);
  margin: 0 0 2rem;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--tc-muted);
}

.tc-install {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid var(--tc-key-edge);
  border-radius: 10px;
  background: var(--tc-panel);
  overflow: hidden;
}

.tc-install code {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  white-space: nowrap;
  color: var(--tc-text);
  background: none;
}

.tc-copy {
  padding: 0 1.2rem;
  border: 0;
  border-left: 1px solid var(--tc-key-edge);
  background: var(--tc-key);
  color: var(--tc-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tc-copy:hover {
  background: var(--tc-key-edge);
}

.tc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin: 1.4rem 0 0;
}

/* the Stream Deck */

.tc-deck {
  margin: 0;
}

.tc-deck__body {
  padding: 1.4rem;
  border-radius: var(--tc-radius-deck);
  background: linear-gradient(160deg, #2a2257, #120e29);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 8%),
    0 30px 60px -20px rgb(4 2 18 / 85%);
}

.tc-deck__keys {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-key {
  position: relative;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1;
  margin: 0;
  padding: 0.55rem;
  border-radius: var(--tc-radius-key);
  background: var(--tc-key);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 30%);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.1;
  hyphens: manual;
  color: var(--tc-muted);
  animation: tc-check 0.45s ease-out both;
  animation-delay: calc(var(--i) * 110ms + 400ms);
}

.tc-key__led {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tc-led);
  box-shadow: 0 0 10px var(--tc-led);
}

.tc-key[data-status="ok"] { --tc-led: var(--tc-ok); }
.tc-key[data-status="warn"] { --tc-led: var(--tc-warn); color: #ffe2b3; }

.tc-key--live {
  --tc-led: #fff;
  background: var(--tc-live);
  color: #fff;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 25%), 0 0 28px rgb(255 71 87 / 55%);
  animation-name: tc-live;
  animation-duration: 0.9s;
}

.tc-key:nth-child(1) { --i: 0; }
.tc-key:nth-child(2) { --i: 1; }
.tc-key:nth-child(3) { --i: 2; }
.tc-key:nth-child(4) { --i: 3; }
.tc-key:nth-child(5) { --i: 4; }
.tc-key:nth-child(6) { --i: 5; }
.tc-key:nth-child(7) { --i: 6; }
.tc-key:nth-child(8) { --i: 7; }
.tc-key:nth-child(9) { --i: 8; }
.tc-key:nth-child(10) { --i: 9; }
.tc-key:nth-child(11) { --i: 10; }
.tc-key:nth-child(12) { --i: 11; }
.tc-key:nth-child(13) { --i: 12; }
.tc-key:nth-child(14) { --i: 13; }
.tc-key:nth-child(15) { --i: 15; }

/* a check runs: the key is dark, flashes, then shows its result */
@keyframes tc-check {
  0% { filter: brightness(0.45) saturate(0); }
  45% { filter: brightness(1.8) saturate(0.4); }
  100% { filter: none; }
}

@keyframes tc-live {
  0% { filter: brightness(0.35) saturate(0); box-shadow: none; }
  60% { filter: brightness(1.25); }
  100% { filter: none; }
}

.tc-deck figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--tc-muted);
}

/* sections */

.tc-film video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #0f0b24;
  box-shadow: 0 30px 60px -30px rgb(4 2 18 / 90%);
}

.tc-section {
  border-top: 1px solid rgb(169 159 214 / 18%);
}

.tc-h2 {
  margin: 0 0 1.8rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  font-weight: 750;
  font-stretch: 90%;
  letter-spacing: -0.02em;
  color: #fff;
}

.tc-section p {
  max-width: var(--tc-measure);
  line-height: 1.6;
  color: var(--tc-muted);
}

.tc-fixes {
  margin: 0;
}

.tc-fix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-bottom: 1px solid rgb(169 159 214 / 14%);
}

.tc-fix dt {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--tc-text);
}

.tc-fix dd {
  margin: 0;
}

.tc-fix dd a {
  text-decoration: none;
}

.tc-fix dd code {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: var(--tc-panel);
  color: #d9d0ff;
}

.tc-fix dd a:hover code {
  background: var(--tc-key);
  color: #fff;
}

.tc-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: center;
}

.tc-split--flip {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.tc-split--flip > div {
  order: 2;
}

.tc-shot-link { display: block; }

.tc-shot {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 24px 50px -24px rgb(4 2 18 / 90%);
}

.tc-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-promises li {
  margin: 0;
  line-height: 1.55;
  color: var(--tc-muted);
}

.tc-promises strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  color: var(--tc-text);
}

.tc-end {
  padding-bottom: 6rem;
}

@media (max-width: 60em) {
  .tc-hero,
  .tc-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .tc-split--flip > div {
    order: 0;
  }

  .tc-fix,
  .tc-promises {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .tc-promises {
    gap: 1.5rem;
  }
}

@media (max-width: 30em) {
  .tc-deck__body {
    padding: 0.9rem;
  }

  .tc-deck__keys {
    gap: 0.45rem;
  }

  .tc-key {
    padding: 0.3rem;
    font-size: 0.46rem;
    letter-spacing: -0.01em;
  }

  .tc-key__led {
    top: 0.35rem;
    left: 0.35rem;
    width: 0.4rem;
    height: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-key {
    animation: none;
  }
}

/* documentation pages: headings in the same voice as the landing page */
.md-typeset h1 {
  font-weight: 800;
  font-stretch: 90%;
  letter-spacing: -0.025em;
  color: var(--md-default-fg-color);
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.015em;
}
