/* Zpepe: kraft paper, marker ink, one frog green. Spacing on a 4px grid. */
:root {
  --paper: #ebe2d3;        /* page, sampled from the line-up print */
  --card: #f5efe3;         /* archive sheet and cards */
  --raised: #e2d8c6;       /* inputs, active rows */
  --ink: #1f1b16;
  --ink-2: #5e554a;
  --ink-3: #74695b;
  --line: rgba(31, 27, 22, .1);
  --accent: #2c6a33;       /* frog green */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/22px var(--sans); }
/* paper grain: fine noise printed into the two paper surfaces only, so pictures and text stay clean */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .1 0 0 0 0 .08 0 0 0 .2 -.045'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body, .archive, .foot { background-image: var(--grain); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; }
.count { font: 400 12px/16px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---- navigation ---- */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none;
  font-size: 18px; font-weight: 600; line-height: 1; }
.mark { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.text-link { color: var(--ink-2); text-decoration: none; transition: color 150ms var(--ease); }
.text-link:hover { color: var(--ink); }
.player { display: flex; align-items: center; gap: 4px; }
.track-name { margin-left: 4px; color: var(--ink-2); font-size: 13px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease), transform 150ms var(--ease); }
.btn:hover { background: var(--raised); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--card); }
.btn-primary:hover { background: #38322a; }
.btn-small { height: 36px; padding: 0 16px; }
/* the bag: the print's yellow */
.btn-bag { margin-top: 12px; background: #e8a72c; border-color: rgba(31, 27, 22, .25); color: var(--ink); }
.btn-bag:hover { background: #dc9c22; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--ink-2); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.icon-btn:hover { background: var(--raised); color: var(--ink); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px;
  max-width: 1280px; margin: 0 auto; padding: 16px 32px 64px; }
.hero-text { animation: rise 400ms var(--ease) both; }
h1 { margin: 0; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; font-weight: 500; letter-spacing: -.03em;
  text-wrap: balance; white-space: pre-line; }
.sub { margin: 20px 0 0; max-width: 32rem; font-size: 19px; line-height: 28px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.contract { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 40px; }
.contract-label { font-size: 13px; color: var(--ink-3); flex-basis: 100%; }
.ca { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; max-width: 100%; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  font: 400 13px/20px var(--mono); text-align: left; overflow-wrap: anywhere;
  transition: background-color 150ms var(--ease); }
.ca:hover { background: var(--raised); }
.ca .icon { color: var(--ink-3); }
.copied { font-size: 13px; color: var(--accent); }
.buy-link { font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.hero-art { display: block; width: 100%; max-width: 560px; height: auto; justify-self: end;
  /* the print's paper is levelled to white, so multiply lets the page show through it */
  mix-blend-mode: multiply; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- archive sheet, with the bag's cut edge on top ---- */
.archive { position: relative; background: var(--card); margin-top: 12px; }
.archive::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; background: var(--card);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 24px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 24px 100%; }
.archive-inner { max-width: 1280px; margin: 0 auto; padding: 40px 32px 96px; }

.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--raised); }
.tab { height: 36px; padding: 0 20px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-weight: 500;
  transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(31, 27, 22, .08); }
.search { display: flex; align-items: center; gap: 8px; width: 280px; max-width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink-3); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

.channels { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.channels.collapsed { max-height: 88px; overflow: hidden; }  /* two rows of 40 plus the 8 gap */
.text-btn { margin-top: 12px; padding: 4px 0; border: 0; background: none; font-size: 14px; font-weight: 500;
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; transition: color 150ms var(--ease); }
.text-btn:hover { color: var(--ink); }
.channel { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 4px;
  border: 1px solid var(--line); border-radius: 10px; background: none; font-weight: 500; color: var(--ink-2);
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease); }
.channel:hover { background: var(--raised); color: var(--ink); }
.channel img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.channel[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--accent); }

.grid-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 40px 0 16px; }
h2 { margin: 0; font-size: 28px; line-height: 32px; font-weight: 500; letter-spacing: -.01em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: block; padding: 0; border: 0; background: none; text-align: left; }
.card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px;
  background: var(--raised); box-shadow: 0 0 0 1px var(--line);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.grid.wide .card img { aspect-ratio: auto; }
.card:hover img { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(31, 27, 22, .12); }
.card:active img { transform: scale(.98); }
.card-cap { display: block; padding: 8px 4px 0; }
.card-name { display: block; font-weight: 500; }
.empty { margin: 0; padding: 64px 0; text-align: center; color: var(--ink-3); }

/* ---- footer ---- */
.foot { background: var(--card); border-top: 1px solid var(--line); padding: 24px 32px; text-align: center;
  font-size: 13px; color: var(--ink-3); }

/* ---- viewer ---- */
.viewer { width: min(600px, calc(100vw - 32px)); padding: 16px; border: 0; border-radius: 20px;
  background: var(--card); color: var(--ink); box-shadow: 0 24px 64px rgba(31, 27, 22, .3); }
.viewer[open] { animation: rise 220ms var(--ease) both; }
.viewer::backdrop { background: rgba(31, 27, 22, .6); }
.viewer-head, .viewer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.viewer-head strong { display: block; font-size: 18px; font-weight: 500; }
.viewer-body { display: flex; align-items: center; gap: 4px; margin: 12px 0 16px; }
.viewer-body img { flex: 1; min-width: 0; max-height: 68vh; object-fit: contain; border-radius: 12px; }

.tryon { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px;
  border-radius: 12px; background: var(--paper); }
.tryon img { border-radius: 50%; object-fit: cover; background: var(--raised); }
.tryon-lg { width: 64px; height: 64px; }
.tryon-sm { width: 32px; height: 32px; }
.tryon-text { margin-left: 4px; }
.tryon-name { display: block; font-weight: 500; }
.viewer-body img { max-height: 56vh; }

@media (max-width: 860px) {
  .nav { padding: 0 20px; }
  #communityLink { display: none; }  /* the hero's Join us covers it on small screens */
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px 48px; }
  .hero-art { justify-self: center; max-width: 420px; }
  h1 { font-size: 40px; }
  .sub { font-size: 17px; line-height: 26px; }
  .archive-inner { padding: 32px 20px 64px; }
  .search { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
  .grid.wide { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
