@font-face {
  font-family: "Austin Cyr";
  src: url("assets/austin-cyr-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root { --paper:#e9e7df; --light:#f6f4ed; --ink:#11110f; --muted:#68665f; --line:#cfccc3; --dark:#151513; --dark-line:#393936; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin-top: 0; }
p { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
main { display: flex; flex-direction: column; gap: 18px; padding: 18px; }
.page-head, .catalog, footer { border-radius: 6px; }
.page-head { min-height: calc(74svh - 18px); display: grid; grid-template-rows: auto 1fr auto; padding: 28px 34px 34px; background: var(--light); }
.page-meta { display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
.page-meta a:hover { color: var(--ink); }
.page-title { align-self: center; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 430px); align-items: end; gap: 60px; padding: 70px 0; }
h1 { margin: 0; font-family: "Austin Cyr", Georgia, serif; font-size: clamp(82px, 11vw, 158px); font-weight: 400; line-height: .76; letter-spacing: -.055em; }
.page-title p { margin: 0 0 5px; max-width: 420px; font-size: clamp(21px, 2.1vw, 30px); line-height: 1.14; letter-spacing: -.035em; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filters button { appearance: none; padding: 9px 14px; border: 1px solid #d3d0c8; border-radius: 30px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.filters button:hover, .filters button.is-active { border-color: var(--ink); background: var(--ink); color: var(--light); }
.catalog { overflow: hidden; background: var(--light); }
.case { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 32px; align-items: start; padding: 38px clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.case-index, .visual-head span { padding-top: 8px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.case h2, .visual-head h2 { margin-bottom: 10px; font-family: "Austin Cyr", Georgia, serif; font-size: clamp(40px, 5vw, 68px); font-weight: 400; line-height: .88; letter-spacing: -.035em; }
.case-copy { max-width: 760px; }
.case-copy > p { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 17px; }
.case > a { margin-top: 8px; white-space: nowrap; color: var(--muted); font-size: 12px; }
.case > a:hover, .inline-links a:hover, .pdf-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.inline-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.inline-links a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; }
.visual-case, .marketplace-case { padding: clamp(56px, 7vw, 92px) clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.visual-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 420px); gap: 40px; align-items: end; margin-bottom: 42px; }
.visual-head h2 { margin: 8px 0 0; }
.visual-head p { margin: 0 0 4px; color: var(--muted); }
.visual-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.visual-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.visual-grid img:nth-child(1), .visual-grid img:nth-child(8) { grid-column: span 2; grid-row: span 2; }
.marketplace-case { background: var(--dark); color: var(--light); }
.marketplace-case .visual-head p, .marketplace-case .visual-head span { color: #a5a29a; }
.pdf-preview { max-height: 760px; overflow: auto; border: 1px solid var(--dark-line); background: #050505; scrollbar-color: #777 #222; }
.pdf-preview img { display: block; width: 100%; height: auto; }
.pdf-link { display: flex; justify-content: flex-end; margin-top: 18px; color: #a5a29a; font-size: 12px; }
[data-category].is-hidden { display: none; }
[data-category] { animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px 34px; background: var(--light); color: var(--muted); font-size: 12px; }
footer a:hover { color: var(--ink); }

@media (max-width: 760px) {
  main { gap: 10px; padding: 10px; }
  .page-head { min-height: calc(80svh - 10px); padding: 22px; }
  .page-meta span { display: none; }
  .page-title { grid-template-columns: 1fr; gap: 38px; padding: 60px 0; }
  h1 { font-size: clamp(76px, 24vw, 105px); }
  .page-title p { max-width: 330px; font-size: 21px; }
  .filters { gap: 6px; }
  .filters button { padding: 8px 11px; }
  .case { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 30px 22px; }
  .case h2, .visual-head h2 { font-size: 42px; }
  .case-copy > p { font-size: 15px; }
  .case > a { grid-column: 2; margin-top: 4px; }
  .case-links { grid-template-columns: 34px minmax(0, 1fr); }
  .visual-case, .marketplace-case { padding: 54px 22px; }
  .visual-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 30px; }
  .visual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .visual-grid img:nth-child(1), .visual-grid img:nth-child(8) { grid-column: span 1; grid-row: span 1; }
  .pdf-preview { max-height: 66svh; }
  footer { flex-direction: column; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-category] { animation: none; }
}
