@import url("/tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 4rem 1.25rem 6rem;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 56rem;
  margin: 0 auto;
}

header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: -0.02em;
}

header p {
  margin: 0 0 3rem;
  color: var(--text-muted);
  max-width: 34rem;
}

h2 {
  margin: 2.5rem 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--gap);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.2rem 1.2rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover,
.card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-name {
  font-weight: 600;
}

.card-tagline {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-host {
  margin-top: auto;
  padding-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
}

/*
 * The edge marker is not decoration. `anycast` means the product is slow or
 * unreachable from the mainland, and nothing else on the page would show that.
 */
.edge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  vertical-align: 1px;
}

.edge[data-edge="anycast"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.edge[data-edge="split"],
.edge[data-edge="optimised"] {
  display: none;
}

.empty {
  padding: 2rem 0;
  color: var(--text-muted);
}

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
