/* The black base every page shares. */
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }

:root {
  --bg: #0B0C0C;
  --surface: #141516;
  --line: #1F2021;
  --line-strong: #2A2B2C;
  --text: #ECEAE4;
  --muted: #8C8A84;
  --faint: #6F6D68;
  --site-accent: #05A660;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); }
a:hover { color: #FFFFFF; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 4px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
}
.name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.mark {
  width: 10px;
  height: 10px;
  background: var(--site-accent);
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 56px);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero h1 .dot { color: var(--site-accent); }
.hero p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

/* Filter words and search: they appear once there is something to sort. */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-bottom: 32px;
}
.controls[hidden], .filters[hidden], .search[hidden] { display: none; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.fbtn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 500 15px var(--body);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s;
  text-decoration-color: var(--site-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.fbtn:hover { color: var(--text); }
.fbtn[aria-pressed="true"] { color: var(--text); text-decoration-line: underline; }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-bottom: 1px solid var(--line-strong);
}
.search input {
  width: 150px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: 400 15px var(--body);
}
.search input::placeholder { color: var(--faint); opacity: 1; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The cabinet */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 24px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
}
.tile.feat { grid-column: span 2; }
.cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .35s ease, border-color .35s ease;
}
.tile.feat .cover { aspect-ratio: 2.75 / 1; }
.cover img { width: 62%; height: auto; display: block; }
.tile.feat .cover img { width: 46%; max-width: 380px; }
.tile:hover .cover { transform: translateY(-4px); border-color: #3A3B3C; }
.meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.meta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.title {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
}
.line {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
.format {
  flex: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.empty {
  margin: 0;
  padding: 40px 0;
  font-size: 17px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 96px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .tile.feat { grid-column: auto; }
  .tile.feat .cover { aspect-ratio: 4 / 3; }
  .tile.feat .cover img { width: 62%; }
}
@media (prefers-reduced-motion: reduce) {
  .cover, .fbtn { transition: none; }
  .tile:hover .cover { transform: none; }
}
