@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/geist-400.woff2") format("woff2");
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/geist-500.woff2") format("woff2");
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/geist-600.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --ink: #000000;
  --muted: rgb(0 0 0 / 64%);
  --tertiary: rgb(0 0 0 / 44%);
  --line: rgb(0 0 0 / 10%);
  --line-strong: rgb(0 0 0 / 18%);
  --hover: rgb(0 0 0 / 5%);
  --pressed: rgb(0 0 0 / 9%);
  --radius: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font: Geist, ui-sans-serif, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  --space: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible,
.search input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}
@media (min-width: 800px) {
  .wrap { width: min(1080px, calc(100% - 112px)); }
}

header {
  padding: 24px 0 0;
  border-bottom: 1px solid var(--line);
}
.brand h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.brand h1 a { text-decoration: none; }
.brand p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 40rem;
}
.brand p.lede { color: var(--ink); }

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 8px 0 4px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  transform: rotate(-12deg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}
.badge svg {
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.brand p.tagline {
  margin: 0;
  max-width: 28rem;
}

.credit {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.search { margin: 24px 0 0; }
.search input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 12px 16px;
  font: inherit;
  transition-property: border-color, outline-color, outline-offset;
  transition-duration: 150ms;
  transition-timing-function: var(--ease-in-out);
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-color: var(--ink);
}

.meta {
  color: var(--muted);
  font-size: 15px;
  margin: 8px 0 16px;
}

.cat-list {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .cat-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }
}

.cat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.cat-row .name { font-weight: 500; }
.cat-row .count {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.prod-list { display: flex; flex-direction: column; }
.prod-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
}
.prod-row .cat {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}
.prod-row .cat:hover { color: var(--ink); }
.prod-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.prod-row .note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.prod-row .go {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
  text-underline-offset: 3px;
}

@media (min-width: 800px) {
  .prod-row {
    grid-template-columns: 160px minmax(0, 1fr) auto;
    column-gap: 24px;
    row-gap: 4px;
    align-items: baseline;
    padding: 12px 8px;
  }
  .prod-row .cat { grid-column: 1; grid-row: 1; }
  .prod-row h3 { grid-column: 2; grid-row: 1; }
  .prod-row .note { grid-column: 2; grid-row: 2; }
  .prod-row .go {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin-top: 0;
    align-self: center;
  }
}

.crumb {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 8px;
}
.crumb a { color: var(--ink); text-underline-offset: 3px; }

.empty {
  color: var(--muted);
  padding: 24px 8px 40px;
  display: none;
}

main { flex: 1; padding: 8px 0 48px; }
footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--muted);
  font-size: 15px;
}
footer p { margin: 0; }
footer .credit { margin-top: 8px; }

@media (hover: hover) and (pointer: fine) {
  .cat-row,
  .prod-row {
    transition-property: background-color, transform;
    transition-duration: 120ms;
    transition-timing-function: var(--ease-in-out);
  }
  .cat-row:hover,
  .prod-row:hover { background-color: var(--hover); }
  .cat-row:active,
  .prod-row:active {
    background-color: var(--pressed);
    transform: scale(0.98);
  }
}

@keyframes list-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes list-enter-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.enter {
  animation-name: list-enter;
  animation-duration: 200ms;
  animation-timing-function: var(--ease-out);
  animation-fill-mode: both;
}
.enter:nth-child(1) { animation-delay: 0ms; }
.enter:nth-child(2) { animation-delay: 40ms; }
.enter:nth-child(3) { animation-delay: 80ms; }
.enter:nth-child(4) { animation-delay: 120ms; }
.enter:nth-child(5) { animation-delay: 160ms; }
.enter:nth-child(6) { animation-delay: 200ms; }
.enter:nth-child(7) { animation-delay: 240ms; }
.enter:nth-child(8) { animation-delay: 280ms; }
.enter:nth-child(9) { animation-delay: 320ms; }
.enter:nth-child(10) { animation-delay: 360ms; }
.enter:nth-child(11) { animation-delay: 400ms; }
.enter:nth-child(12) { animation-delay: 440ms; }

@media (prefers-reduced-motion: reduce) {
  .enter { animation-name: list-enter-fade; }
  .cat-row,
  .prod-row {
    transition-property: background-color;
    transform: none;
  }
  .cat-row:active,
  .prod-row:active { transform: none; }
}
