/* The public gallery: the vibescapes people have shared.
 *
 * The page is served by the Worker with the cards already in the markup, so
 * a crawler sees the list and the page works with no JavaScript at all.
 * These are the styles for it. */

:root {
  --bg: #06010d;
  --text: #f4f0ff;
  --muted: #a79fc4;
  --line: rgba(255, 255, 255, 0.10);
  --pink: #ff2bd6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

a { color: inherit; }

/* The heading, in the same shape as the rest of the site. */
.gallery-head {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pink);
}

.gallery-head h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 6px;
  color: var(--muted);
  max-width: 62ch;
}

/* The cards. */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 43, 214, 0.55);
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  background: #0b0518;
}

.card-name {
  display: block;
  padding: 14px 16px 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 0;
  color: var(--muted);
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px 32px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

/* The two orders the gallery can be in. */
.gallery-sort {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}

.gallery-sort a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-sort a:hover {
  color: var(--text);
  border-color: var(--muted);
}

.gallery-sort a.on {
  color: #06010d;
  background: var(--magenta);
  border-color: var(--magenta);
}

/* Who made it, under the name. */
.card-by {
  display: block;
  padding: 4px 16px 16px;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
