:root {
  --bg: #030406;
  --text: #111;
  --muted: #555;
  --accent: #0a66c2;
  --gap: 3px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: #eee;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  min-height: 100%;
}

body {
  background: #000;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.download-btn:hover { text-decoration: none; }

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.masthead {
  position: sticky;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.1rem 0.75rem;
  min-height: 4.4rem;
  background: rgba(0,0,0,0.96);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 50;
}

.masthead h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.masthead .subtitle {
  margin: 0;
  color: #8b93a7;
  font-size: 0.78rem;
}

.wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  flex: 1;
  align-content: start;
  background: #000;
}

@media (max-width: 1200px) {
  .wall { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  .wall { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .wall { grid-template-columns: 1fr; }
}

.screen {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.download-btn {
  all: unset;
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 3;
  box-sizing: content-box;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  color: rgba(190, 190, 190, 0.35);
  line-height: 0;
  transition: opacity 0.2s ease, color 0.15s ease;
}

.download-btn svg {
  display: block;
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: transparent;
}

.screen:hover .download-btn,
.screen:focus-within .download-btn {
  opacity: 0.4;
  pointer-events: auto;
}

.download-btn:hover,
.download-btn:focus-visible {
  opacity: 0.7;
  color: rgba(210, 210, 210, 0.65);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  text-decoration: none !important;
}

.credits {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  max-width: min(92%, 280px);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  padding: 0.55rem 0.65rem 0.6rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.screen:hover .credits,
.screen:focus-within .credits {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.credits .handle {
  display: inline-block;
  font-weight: 700;
  font-size: 0.78rem;
  color: #111;
  margin-right: 0.4rem;
}

.credits .tool {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
}

.credits .caption {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.credits .view-x {
  font-size: 0.7rem;
  font-weight: 600;
}

.site-foot {
  padding: 0.4rem 0.75rem;
  color: #6a7388;
  font-size: 0.7rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.loading, .error {
  color: #8b93a7;
  padding: 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.sound-btn {
  all: unset;
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  opacity: 0.55;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sound-btn svg {
  display: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-btn .icon-muted { display: block; }
.sound-btn.is-on .icon-muted { display: none; }
.sound-btn.is-on .icon-on { display: block; }

.screen:hover .sound-btn,
.screen:focus-within .sound-btn,
.sound-btn.is-on {
  opacity: 0.95;
}

.sound-btn:hover,
.sound-btn:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  outline: none;
}

.masthead-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1 1 auto; }
/* superseded by pill block below */
.topbar-credit:hover { text-decoration: underline; color: #ffffff !important; }

/* Connock credit — white on black pill */
.topbar-credit, a.topbar-credit {
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff !important;
  background: #000000 !important;
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 4px;
  line-height: 1.2;
  opacity: 1;
  text-shadow: none;
}
.topbar-credit:hover, a.topbar-credit:hover {
  color: #ffffff !important;
  background: #111111 !important;
  text-decoration: underline;
}

