/* Magpie Shelf. Layout idea: a mail-order catalog. One loud headline per page,
   a black cat peeking over the filter shelf, and a quiet grid below. */
@font-face {
  font-family: "Bagel Fat One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/bagel-fat-one-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #F4F1F5;
  --surface: #FFFFFF;
  --ink: #1A151D;
  --muted: #675D6C;
  --line: #DDD6E0;
  --accent: #C92F60;      /* toe-bean pink */
  --on-accent: #FFFFFF;
  --eye: #E9B824;         /* cat-eye amber */
  --cat: #1A151D;
  --sheen: #1F7A8C;       /* magpie wing */
  --feather: #FFFFFF;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151117; --surface: #201A23; --ink: #F1ECF3; --muted: #AEA4B3;
    --line: #3A313E; --accent: #FF7DA0; --on-accent: #1A151D;
    --eye: #F2C744; --cat: #453A4A; --sheen: #3FA7B8; --feather: #F1ECF3;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; }

/* ---------- Header ---------- */
header.hero { padding: 28px 0 0; }
.brand {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--muted);
}
.brand-name {
  font-family: var(--display); font-size: 22px;
  color: var(--ink); letter-spacing: 0.01em; text-decoration: none;
}
.brand .tagline { flex: 1; min-width: 0; }
.lang {
  font: 600 13px/1 var(--body);
  padding: 9px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  text-decoration: none; flex: 0 0 auto;
}
.eyebrow {
  margin: 36px 0 0; font-size: 13px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(38px, 10.5vw, 104px);
  line-height: 0.97;
  margin: 36px 0 18px;
  max-width: 13ch;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.eyebrow + h1 { margin-top: 10px; }
h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 52ch; margin: 0; font-size: 18px; color: var(--muted); }

/* ---------- Home: shelves ---------- */
.shelves { margin-top: clamp(116px, 32vw, 150px); display: flex; flex-direction: column; gap: 14px; }
.section {
  margin: 0; font: 600 13px/1.2 var(--body);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.perch { position: relative; max-width: 560px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The line on the page is a wooden shelf; things stand on it. */
.board {
  position: relative; z-index: 1;
  height: 18px; margin: 0 -8px;
  background: #E8A96B; border: 3px solid #1A151D; border-radius: 9px;
  box-shadow: inset 0 -5px 0 #D9954F;
}
.magpie {
  position: absolute; right: 14px; bottom: 100%; z-index: 2;
  width: clamp(130px, 38vw, 180px); height: auto; display: block;
  margin-bottom: -11px; pointer-events: none;
}
.finds {
  position: absolute; left: 8px; bottom: 100%;
  right: calc(clamp(130px, 38vw, 180px) + 22px);
  display: flex; align-items: flex-end; gap: 8px;
  margin-bottom: -2px; pointer-events: none;
}
.finds svg { width: clamp(40px, 12vw, 54px); height: auto; flex: 0 0 auto; display: block; }
.finds .tip { transform: rotate(-13deg); transform-origin: 70% 100%; margin-left: -22px; margin-right: -4px; }
.finds .wide { display: none; }
@media (min-width: 560px) { .finds .wide { display: block; } }
.shelf-card {
  display: flex; flex-direction: column; gap: 6px;
  max-width: 560px; padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 14px 14px;
  text-decoration: none;
}
.shelf-card:hover { border-color: var(--accent); }
.shelf-name { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.shelf-sub { color: var(--muted); }
.shelf-go { margin-top: 8px; font-weight: 600; color: var(--accent); }
.more { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Guide: filter shelf with the cat ---------- */
.shelf { position: relative; margin-top: clamp(124px, 34vw, 160px); }
.cat {
  position: absolute; right: 14px; bottom: 100%; z-index: 2;
  width: clamp(130px, 38vw, 180px); height: auto; display: block;
  margin-bottom: -9px; pointer-events: none;
}
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.filter-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.filter-row > span {
  flex: 0 0 62px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; min-width: 0;
  padding: 2px; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font: 500 14px/1 var(--body);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

.status {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 22px 0 14px;
}
.status p { margin: 0; color: var(--muted); font-size: 14px; }
.btn {
  font: 600 14px/1 var(--body);
  padding: 12px 16px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--on-accent); cursor: pointer;
}

/* ---------- Grid ---------- */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-margin-top: 20px;
}
.card.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.meta {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.meta .tier { color: var(--accent); letter-spacing: 0.02em; text-transform: none; font-size: 13px; white-space: nowrap; }
.card h2 {
  font-family: var(--display); font-weight: 400;
  font-size: 23px; line-height: 1.1; margin: 0; text-wrap: balance;
  overflow-wrap: break-word; hyphens: auto;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.card a {
  align-self: flex-start;
  font-weight: 600; font-size: 15px;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--accent); padding-bottom: 2px;
}
.card a:hover { color: var(--accent); }
.empty {
  grid-column: 1 / -1; padding: 40px 18px; text-align: center;
  color: var(--muted); border: 1px dashed var(--line); border-radius: 14px;
}

/* ---------- Legal pages ---------- */
.legal { max-width: 65ch; margin-top: 40px; }
.legal h1 { font-size: clamp(34px, 7vw, 56px); max-width: none; margin: 0 0 18px; }
.legal h2 { font: 600 18px/1.3 var(--body); margin: 28px 0 6px; }
.legal p { margin: 0 0 10px; }
.todo {
  padding: 12px 14px; border: 1px dashed var(--accent); border-radius: 10px;
  color: var(--accent); font-weight: 600; font-size: 14px;
}

footer { margin: 56px 0 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer p { margin: 0 0 8px; max-width: 70ch; }

@media (max-width: 480px) {
  .filter-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .filter-row > span { flex: none; }
  .brand .tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
