/* the homepage: a short intro and a list of machines */
.intro {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 0 32px;
  text-align: center;
}

.intro h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
}

/* "nothing" gets the only gradient on the page */
.intro h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.machines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.machine-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 140ms ease;
}

/* hovering lights the border up in the machine's colour */
.machine-card:hover,
.machine-card:focus-visible {
  border-color: var(--tile);
  outline: none;
}

.machine-card:focus-visible {
  box-shadow: 0 0 0 2px var(--tile);
}

/* the neon icon, the main bit of colour on the page */
.mode-icon {
  flex: none;
  width: 30px;
  height: 30px;
  margin-top: 2px;
  color: var(--tile);
  filter: drop-shadow(0 0 calc(8px * var(--glow)) var(--tile));
}

.card-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.card-title {
  font: 700 1.1rem/1.3 var(--display);
}

.card-number {
  margin-right: 8px;
  color: var(--muted);
  font: 400 0.85rem var(--mono);
}

.card-description {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* live status like "● 186 presses today" */
.stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  margin-top: 6px;
  color: var(--online);
  font: 0.8rem var(--mono);
}

.stat::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 calc(6px * var(--glow)) currentColor;
}

.stat:empty {
  display: none;
}

@media (prefers-color-scheme: light) {
  .mode-icon {
    color: color-mix(in srgb, var(--tile) 80%, #000);
  }
}
