/* The Impression Archive — design tokens v1.0 (from wireframes) */
:root {
  --ground: #0E0E0C;
  --surface: #161614;
  --bone: #ECE6D8;
  --muted: #8C867A;
  --film: #C8553D;
  --tv: #5E8C8A;
  --books: #C9A24A;
  --music: #7A8FD1;
  --line: rgba(236, 230, 216, 0.12);
  /* these two were referenced but never defined, so the hero label fell back to
     inherited bone and the "via …" source line had no colour at all */
  --amber: #D9A441;
  --faint: #6B665C;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--ground);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bone); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 72px; }

/* ---------- header ---------- */
.site-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--font-display); font-size: 24px; font-style: italic; }
.wordmark a:hover { text-decoration: none; }
.site-nav { display: flex; gap: 32px; font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.12em; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a.active { color: var(--bone); }

/* ---------- year switcher ---------- */
.year-nav { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; overflow-x: auto; }
.year-nav a { color: var(--muted); white-space: nowrap; }
.year-nav a:hover { color: var(--bone); }
.year-nav a.active { color: var(--amber); }

/* ---------- type ---------- */
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.display em { font-style: italic; }
h1.display { font-size: 88px; }
h2.display { font-size: 40px; }
h3.display { font-size: 24px; }
.meta { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); }
.lede { font-size: 19px; color: var(--muted); max-width: 62ch; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.4em; }
.prose blockquote { border-left: 2px solid var(--film); padding-left: 24px;
  font-family: var(--font-display); font-style: italic; font-size: 22px;
  line-height: 1.4; margin: 2em 0; }

/* ---------- category accents ---------- */
.tag { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); white-space: nowrap; }
.tag.film { color: var(--film); border-color: rgba(200, 85, 61, 0.4); }
.tag.tv { color: var(--tv); border-color: rgba(94, 140, 138, 0.4); }
.tag.books { color: var(--books); border-color: rgba(201, 162, 74, 0.4); }
.tag.music { color: var(--music); border-color: rgba(122, 143, 209, 0.4); }

/* sample-data marker: dashed, muted, unmistakable */
.tag.sample { color: var(--muted); border-style: dashed; }

/* ---------- impression tiers ---------- */
.tier { font-family: var(--font-display); font-style: italic; font-size: 18px;
  border: 1px solid var(--line); padding: 8px 18px; border-radius: 2px; display: inline-block; }
.tier .tier-code { font-family: var(--font-mono); font-style: normal; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  display: block; margin-bottom: 2px; }
.tier.t3 { border-color: rgba(200, 85, 61, 0.55); }
.tier.t4 { border-style: dashed; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 24px; transition: transform 0.22s ease, border-color 0.22s ease; display: block; }
.card:hover { transform: translateY(-2px); text-decoration: none; }
.card.film:hover { border-color: var(--film); }
.card.books:hover { border-color: var(--books); }
.card.music:hover { border-color: var(--music); }
.card.tv:hover { border-color: var(--tv); }
.card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400;
  margin: 12px 0 8px; line-height: 1.25; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.card .meta { margin-top: 16px; }

/* ---------- sections ---------- */
section.block { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 32px; }
.section-head .meta { margin-bottom: 8px; display: block; }

/* week entry */
.week { padding: 32px 0; border-bottom: 1px solid var(--line); }
.week-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.week-head h3 { font-family: var(--font-display); font-size: 28px; font-weight: 400; }
.picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pick { border-top: 2px solid var(--line); padding-top: 16px; }
.pick.music { border-top-color: var(--music); }
.pick.books { border-top-color: var(--books); }
.pick.film { border-top-color: var(--film); }
.pick .pick-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); display: block; margin-bottom: 8px; }
.pick .pick-title { font-family: var(--font-display); font-size: 20px; line-height: 1.3; }
.pick .pick-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pick .pick-note { font-size: 15px; color: var(--muted); margin-top: 10px; line-height: 1.6; }

/* out-now shelf */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.release { background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  padding: 20px; transition: transform 0.22s ease, border-color 0.22s ease; }
.release:hover { transform: translateY(-2px); border-color: var(--music); }
.release .rel-cover { aspect-ratio: 1; background: #22221e; border-radius: 2px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.release .rel-title { font-family: var(--font-display); font-size: 18px; line-height: 1.3; }
.release .rel-artist { color: var(--muted); font-size: 14px; }
.release .rel-note { font-size: 13px; color: var(--books); font-style: italic; margin-top: 8px; }

/* stats strip */
.stats { display: flex; gap: 56px; padding: 32px 0; flex-wrap: wrap; }
.stat .stat-num { font-family: var(--font-display); font-size: 48px; line-height: 1; }
.stat .stat-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); margin-top: 8px; }

/* lists */
.list-items { counter-reset: listn; }
.list-item { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
  padding: 16px 0; 
  border-bottom: 1px solid var(--line); 
}
.list-item::before { 
  counter-increment: listn; 
  content: counter(listn, decimal-leading-zero);
  font-family: var(--font-mono); 
  color: var(--muted); 
  font-size: 15px; 
  font-weight: 500;
  min-width: 28px; 
  flex-shrink: 0;
  text-align: right;
  line-height: 1;
}
.list-item .li-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}
.list-item .li-title { 
  font-family: var(--font-display); 
  font-size: 21px; 
  line-height: 1.25;
  color: var(--fg);
}
.list-item .li-sub {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.list-item .li-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-left: auto;
  flex-shrink: 0;
  text-align: right;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.list-item .li-cat.film { color: var(--film); border-color: rgba(200, 85, 61, 0.35); }
.list-item .li-cat.tv { color: var(--tv); border-color: rgba(94, 140, 138, 0.35); }
.list-item .li-cat.music { color: var(--music); border-color: rgba(122, 143, 209, 0.35); }
.list-item .li-cat.books { color: var(--books); border-color: rgba(201, 162, 74, 0.35); }
.list-item .li-meta { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }

/* poster + cover grids (real data) */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 16px; }
.poster-card { display: block; }
.poster-card:hover { text-decoration: none; }
.poster-card .p-img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--line); transition: transform 0.22s ease, border-color 0.22s ease;
  display: block; background: var(--surface); }
.poster-card:hover .p-img { transform: translateY(-2px); border-color: var(--film); }
.poster-card .p-empty { width: 100%; aspect-ratio: 2/3; border-radius: 3px; border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; padding: 12px;
  font-family: var(--font-display); font-style: italic; font-size: 15px; color: var(--muted);
  text-align: center; background: var(--surface); }
.poster-card .p-title { font-family: var(--font-display); font-size: 15px; line-height: 1.3; margin-top: 8px; }
.poster-card .p-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 2px; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px 16px; }
.cover-card .p-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--line); transition: transform 0.22s ease, border-color 0.22s ease;
  display: block; background: var(--surface); }
.cover-card:hover .p-img { transform: translateY(-2px); border-color: var(--music); }
.cover-card .p-title { font-family: var(--font-display); font-size: 14px; line-height: 1.3; margin-top: 8px; }
.cover-card .p-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 20px 16px; }
.book-card .p-img { width: 100%; aspect-ratio: 2/3; object-fit: contain; border-radius: 3px;
  border: 1px solid var(--line); display: block; background: #1B1B19;
  transition: transform 0.22s ease, border-color 0.22s ease; }
.book-card:hover .p-img { transform: translateY(-2px); border-color: var(--books); }
.book-card .p-title { font-family: var(--font-display); font-size: 13px; line-height: 1.3; margin-top: 8px; }
.book-card .p-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.li-poster { width: 46px; aspect-ratio: 2/3; object-fit: cover; border-radius: 2px; flex-shrink: 0;
  border: 1px solid var(--line); display: block; }
.li-poster-sq { width: 46px; aspect-ratio: 1; object-fit: cover; border-radius: 2px; flex-shrink: 0;
  border: 1px solid var(--line); display: block; }
.li-poster-fit { width: 46px; aspect-ratio: 2/3; object-fit: contain; background: #1B1B19;
  border-radius: 2px; flex-shrink: 0; border: 1px solid var(--line); display: block; }

/* footer */
.site-footer { padding: 56px 0; color: var(--muted); font-size: 14px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer .meta { color: var(--muted); }

/* hero */
.hero { padding: 72px 0 56px; }
.hero .meta { display: block; margin-bottom: 16px; }
.hero h1 { margin-bottom: 24px; }

/* breadcrumb */
.crumb { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); padding: 32px 0 0; }
.crumb a { color: var(--muted); }

/* focus */
a:focus-visible, .card:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  h1.display { font-size: 48px; }
  .card-grid, .picks { grid-template-columns: 1fr; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 32px; }
}

/* tap targets: anything you press on a phone should be at least ~44px tall */
@media (max-width: 900px) {
  .site-nav a { padding: 6px 2px; }
  .outlink { padding: 10px 0; display: inline-block; }
  .crumb { padding: 24px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .release { transition: none; }
  .card:hover, .release:hover { transform: none; }
}

/* ---- now row (hero) ---- */
.now-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 40px; }
@media (max-width: 760px) { .now-row { grid-template-columns: 1fr; gap: 28px; } }
.now-card { display: block; text-decoration: none; color: inherit; }
a.now-card:hover .now-title { text-decoration: underline; text-underline-offset: 3px; }
.now-label { display: block; margin-bottom: 12px; color: var(--amber); }
.now-img { display: block; overflow: hidden; border-radius: 3px; background: #1B1B19; margin-bottom: 14px; }
.now-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.now-img.now-empty { border: 1px dashed rgba(236,230,216,.18); }
.now-title { display: block; font-family: Newsreader, Georgia, serif; font-size: 24px; line-height: 1.2; }
.now-meta { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
.now-sub { display: block; color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.now-src { display: block; margin-top: 8px; font-size: 11px; color: var(--faint); }

/* an intentionally empty hero slot reads as a reserved space, not a bug */
.now-card.now-blank .now-title { color: var(--muted); font-style: italic; font-size: 20px; }
.now-card.now-blank .now-img { border: 1px dashed rgba(236, 230, 216, 0.18); }

/* release cards are links when MusicButler gave us a URL */
a.release { color: inherit; text-decoration: none; }
a.release:hover { text-decoration: none; }

/* ---------- impressions imported from the blog ---------- */
/* the "read the full essay" exit link */
.outlink { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--amber); border-bottom: 1px solid rgba(217, 164, 65, 0.4);
  padding-bottom: 3px; }
.outlink:hover { text-decoration: none; border-bottom-color: var(--amber); }
.essay-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--line); display: block; }

/* ---------- the log: what was consumed, as it happened ---------- */
.log-list { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 68px 116px 1fr; gap: 16px;
  align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.log-row:last-child { border-bottom: 0; }
.log-when { font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em; }
.log-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.log-title { font-family: var(--font-display); font-size: 19px; line-height: 1.3; }
.log-meta { color: var(--muted); font-size: 14px; }
.log-note { color: var(--muted); font-size: 14px; font-style: italic; }
/* a finished thing recedes; something in progress stays bright */
.log-row.now .log-title { color: var(--bone); }
.log-row.done .log-title { color: var(--muted); }
.log-row.film .log-when { color: rgba(200, 85, 61, 0.75); }
.log-row.books .log-when { color: rgba(201, 162, 74, 0.75); }
.log-row.music .log-when { color: rgba(122, 143, 209, 0.75); }

/* ---------- phones ---------- */
@media (max-width: 600px) {
  /* the header and every section header are flex rows that collided at 375px */
  .site-header { flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 0; }
  .site-nav { gap: 20px; flex-wrap: wrap; font-size: 11px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .week-head { gap: 8px 12px; }
  .week-head h3 { font-size: 24px; }
  h1.display { font-size: 38px; }
  h2.display { font-size: 30px; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { margin-bottom: 18px; }
  section.block { padding: 36px 0; }
  .lede { font-size: 17px; }
  .site-footer { padding: 36px 0; flex-direction: column; }

  /* the log row is a 3-column grid: 68 + 116 + gap left ~120px of body on a
     390px screen. Stack it instead. */
  .log-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .log-when { font-size: 11px; }
  .log-row .tag { justify-self: start; }
  .log-body { gap: 3px 8px; }
  .log-title { font-size: 18px; }

  /* prose and long words must not push the page sideways */
  .prose, .lede, .now-title, .log-title, .card h3, .p-title { overflow-wrap: anywhere; }
  .prose blockquote { padding-left: 16px; font-size: 19px; }
  .list-item { gap: 12px; }
  .list-item::before { font-size: 13px; min-width: 22px; }
  .list-item .li-title { font-size: 17px; }
  .list-item .li-sub { font-size: 12px; }
  .list-item .li-cat { font-size: 10px; padding: 2px 6px; }

  /* image grids: two across reads better than one huge column */
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 16px 12px; }
  .cover-grid, .book-row { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 16px 12px; }
  .essay-cover { max-height: 260px; }
}
