/* Catalog style "demo9" — the album as an exhibition: a salon hang of matted works with museum labels on a stone wall, a floor plan for the categories, and the post page as a charcoal room. Mirrors /demo9/. */
@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,300;6..72,400;6..72,500&family=Hanken+Grotesk:wght@400;500;600&display=swap");

:root {
    --stone: #d2cec7;
    --stone-2: #c6c1b9;
    --ink: #1d1c1f;
    --soft: #4d4943;
    --green: #1e3a2d;
    --green-ink: #e9ede6;
    --green-soft: #b4c5b8;
    --charcoal: #252427;
    --charcoal-2: #302f33;
    --charcoal-ink: #e6e5e3;
    --charcoal-soft: #b2ada5;
    --mat: #f4f3f0;
    --brand: #2f6e3e;
    --yellow: #ffb500;
    --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
    --sans: "Hanken Grotesk", "Lato", system-ui, sans-serif;
    --edge: clamp(16px, 4vw, 64px);
    --hang: 0 1px 1px rgb(0 0 0 / 0.08), 0 18px 32px -14px rgb(29 28 31 / 0.38), 0 40px 60px -40px rgb(29 28 31 / 0.4);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 17px/1.6 var(--sans); transition: background-color 700ms var(--ease); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 500 0.86em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; padding: 10px 16px; background: var(--ink); color: var(--mat); border-radius: 999px; }
.skip:focus { left: 16px; }
.deco { display: none; }

.page { max-width: 1640px; margin: 0 auto; padding: 0 var(--edge); }

/* masthead: the entrance wall text */
.masthead { padding: clamp(56px, 8vw, 128px) 0 clamp(32px, 4vw, 56px); }
.masthead__inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-areas: "brand tag" "brand count"; align-items: end; gap: 12px clamp(32px, 6vw, 120px); }
.brand { grid-area: brand; display: grid; text-decoration: none; }
.brand__mark { font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(88px, 15vw, 248px); line-height: 0.84; letter-spacing: -0.035em; }
.brand__name { margin-top: 12px; font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.4vw, 54px); line-height: 1; letter-spacing: -0.015em; }
.masthead__tagline { grid-area: tag; max-width: 34ch; margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(21px, 1.9vw, 28px); line-height: 1.35; }
.masthead__count { grid-area: count; margin: 0; color: var(--soft); font-size: 15px; }
.masthead__num { font-weight: 600; color: var(--ink); }

/* style bar: a mat-white plaque */
.stylebar { padding: 18px 20px; background: var(--mat); box-shadow: var(--hang); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.stylebar__label { font-family: var(--serif); font-size: 20px; }
.stylebar__value { flex: 1 1 280px; min-width: 0; padding: 6px 0; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid var(--stone-2); color: var(--soft); }
.stylebar__copy {
    min-height: 44px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--ink); color: var(--mat);
    font: 600 15px/1 var(--sans); cursor: pointer; transition: background 220ms ease, transform 160ms ease;
}
.stylebar__copy:hover { background: var(--brand); }
.stylebar__copy:active { transform: scale(0.97); }
.stylebar__copy.is-done { background: var(--brand); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 2px 16px; width: 100%; padding-top: 8px; border-top: 1px solid var(--stone-2); }
.stylebar__item { padding: 4px 0; font-size: 14px; color: var(--soft); text-decoration: none; }
.stylebar__item:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.stylebar__item.is-active { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--brand); text-underline-offset: 4px; }

/* categories: the floor plan of the rooms */
.categories { margin: clamp(40px, 5vw, 72px) 0 0; }
.categories__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.categories__link {
    display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; height: 100%; min-height: 76px; padding: 12px 16px;
    background: var(--stone-2); font-family: var(--serif); font-size: clamp(19px, 1.6vw, 24px); line-height: 1.15; text-decoration: none;
    transition: background 300ms var(--ease), color 300ms var(--ease);
}
.categories__count { font-family: var(--sans); font-size: 13px; color: var(--soft); }
.categories__count::before { content: "Works: "; }
.categories__link:hover { background: #bcb6ad; }
.categories__link.is-active { background: var(--green); color: var(--green-ink); }
.categories__link.is-active .categories__count { color: var(--green-soft); }
.categories__link:focus-visible { outline-offset: 2px; }

/* listing: the salon hang */
.content { padding: clamp(48px, 6vw, 96px) 0 clamp(72px, 9vw, 140px); }
.listing__header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px clamp(32px, 6vw, 120px); margin-bottom: clamp(40px, 5vw, 80px); }
.listing__title { margin: 0; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(52px, 6.4vw, 104px); line-height: 1; letter-spacing: -0.02em; }
.listing__intro { grid-column: 1; max-width: 40ch; margin: 0; color: var(--soft); font-size: 18px; }
.toolbar { grid-column: 2; grid-row: 1 / span 2; align-self: end; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; color: var(--soft); font-size: 15px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 2px; }
.toolbar__label { margin-right: 8px; }
.toolbar__opt { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.toolbar__opt:hover { border-bottom-color: var(--soft); }
.toolbar__opt.is-active { border-bottom: 2px solid var(--ink); font-weight: 600; }

.listing { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: clamp(56px, 6vw, 96px) clamp(32px, 4vw, 72px); }
.post--card { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; flex: 0 0 auto; width: 30%; }
.post--card:nth-child(6n + 1) { width: 46%; }
.post--card:nth-child(6n + 2) { width: 26%; margin-top: clamp(40px, 8vw, 140px); }
.post--card:nth-child(6n + 3) { width: 18%; margin-top: clamp(16px, 3vw, 48px); }
.post--card:nth-child(6n + 4) { width: 28%; margin-top: clamp(24px, 4vw, 64px); }
.post--card:nth-child(6n + 5) { width: 38%; }
.post--card:nth-child(6n) { width: 22%; margin-top: clamp(60px, 9vw, 160px); }
.post__media { display: block; overflow: hidden; background: #b9b3aa; box-shadow: var(--hang); transition: transform 500ms var(--ease), box-shadow 500ms var(--ease); }
.post--card:nth-child(odd) .post__media { padding: clamp(14px, 2.2vw, 36px); background: var(--mat); }
.post--card:hover .post__media { transform: translateY(-4px); box-shadow: 0 1px 1px rgb(0 0 0 / 0.08), 0 28px 44px -16px rgb(29 28 31 / 0.45), 0 56px 80px -48px rgb(29 28 31 / 0.45); }
.post__thumb { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; object-position: top; }
.post--card:nth-child(6n + 3) .post__thumb, .post--card:nth-child(6n) .post__thumb { aspect-ratio: 3 / 4; }
.post--card .post__body { display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 16px; max-width: 34ch; }
.post--card .post__title { order: -2; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.2; letter-spacing: -0.005em; }
.post--card .post__meta { order: -1; margin: 2px 0 8px; }
.post--card .post__excerpt { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: var(--soft); }
.post--card .post__actions { gap: 4px 18px; }
.post--card .btn { min-height: 36px; font-size: 14px; }
.post--card .btn--primary { padding: 0; background: none; color: var(--ink); border: 0; }
.post--card .btn--primary:hover { background: none; color: var(--brand); }
.post__meta { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--soft); font-size: 13px; }
.post__meta > * + *::before { content: ""; }
.post__cat { text-decoration: none; }
.post__cat:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 0; }
.btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 48px; font: 500 16px/1.2 var(--sans); text-decoration: underline;
    text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: currentColor; transition: color 200ms ease, background 220ms ease, transform 160ms ease;
}
.btn:hover { color: var(--brand); }
.btn--primary { padding: 0 28px; border-radius: 999px; background: var(--ink); color: var(--mat); text-decoration: none; }
.btn--primary:hover { background: var(--brand); color: #fff; }
.btn--primary:active { transform: scale(0.97); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 20px; margin-top: clamp(72px, 9vw, 140px); font-family: var(--serif); }
.pager__link { display: inline-grid; place-items: center; min-width: 40px; min-height: 44px; font-size: 22px; text-decoration: none; }
.pager__link:hover { color: var(--brand); }
.pager__link.is-active { border-bottom: 2px solid var(--ink); }
.pager__link--prev, .pager__link--next { font-family: var(--sans); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }

/* one post: the charcoal room — the shot hung as one large work, the doc as the curator's wall text */
body.catalog--post { background: var(--charcoal); color: var(--charcoal-ink); }
.catalog--post :focus-visible { outline-color: var(--yellow); }
.catalog--post .masthead__count, .catalog--post .post__meta, .catalog--post .post__caption, .catalog--post .categories__count, .catalog--post .post__nav-label { color: var(--charcoal-soft); }
.catalog--post .masthead__num { color: var(--charcoal-ink); }
.catalog--post .stylebar { background: var(--charcoal-2); box-shadow: none; }
.catalog--post .stylebar__value { color: var(--charcoal-soft); border-bottom-color: rgb(230 229 227 / 0.2); }
.catalog--post .stylebar__list { border-top-color: rgb(230 229 227 / 0.14); }
.catalog--post .stylebar__item { color: var(--charcoal-soft); }
.catalog--post .stylebar__item:hover, .catalog--post .stylebar__item.is-active { color: var(--charcoal-ink); }
.catalog--post .stylebar__copy { background: var(--yellow); color: var(--ink); }
.catalog--post .stylebar__copy:hover { background: var(--mat); }
.catalog--post .categories__link { background: var(--charcoal-2); }
.catalog--post .categories__link:hover { background: #3b3a3f; }
.catalog--post .categories__link.is-active { background: var(--green); }
.catalog--post .btn:hover { color: var(--yellow); }
.catalog--post .btn--primary { background: var(--mat); color: var(--ink); }
.catalog--post .btn--primary:hover { background: var(--yellow); color: var(--ink); }

.post--full { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 0 clamp(40px, 6vw, 120px); align-items: start; }
.post--full .post__header { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 16px clamp(40px, 6vw, 120px); align-items: end; padding-bottom: clamp(40px, 5vw, 80px); }
.post--full .post__meta { grid-column: 1 / -1; font-size: 14px; }
.post--full .post__title { grid-column: 1; margin: 0; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(56px, 7vw, 128px); line-height: 0.95; letter-spacing: -0.025em; }
.post--full .post__excerpt { grid-column: 2; margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.4; }
.post--full .post__actions { grid-column: 2; }
.post--full .post__shot { grid-column: 1; grid-row: 2 / span 3; position: sticky; top: 32px; margin: 0; }
.post--full .post__doc { grid-column: 2; grid-row: 2; }
.post--full .post__tags { grid-column: 2; grid-row: 3; }
.post--full .post__nav { grid-column: 1 / -1; grid-row: 5; }
.post__zoom { display: block; max-height: calc(100vh - 140px); overflow: hidden; padding: clamp(18px, 2.6vw, 44px); background: var(--mat); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7); cursor: zoom-in; }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 16px; font-size: 13px; line-height: 1.5; }
.post__caption::before { content: "Screenshot, DEPO demo album"; display: block; font-family: var(--serif); font-size: 18px; color: var(--charcoal-ink); }

.doc { overflow-wrap: anywhere; font-size: 17px; line-height: 1.65; }
.doc h2, .doc h3 { margin: 56px 0 14px; font-family: var(--serif); font-weight: 300; font-variation-settings: "opsz" 72; font-size: clamp(30px, 2.8vw, 44px); line-height: 1.05; letter-spacing: -0.015em; }
.doc > h2:first-child { margin-top: 0; }
.doc > h2:first-child + p { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 1.6vw, 24px); line-height: 1.45; }
.doc h4, .doc h5, .doc h6 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc li { margin-bottom: 6px; }
.doc a { color: inherit; text-decoration-color: var(--yellow); text-underline-offset: 4px; }
.doc a:hover { color: var(--yellow); }
.doc strong { font-weight: 600; }
.doc code { padding: 1px 5px; background: var(--charcoal-2); overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; background: #1b1a1d; }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 20px; padding: 20px 24px; background: var(--mat); color: var(--ink); font-family: var(--serif); font-size: 1.05em; line-height: 1.5; }
.doc blockquote code { background: var(--stone); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { margin: 40px 0; border: 0; border-top: 1px solid rgb(230 229 227 / 0.2); }
.doc-table { margin: 0 0 20px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th, .doc td { padding: 9px 12px 9px 0; border-bottom: 1px solid rgb(230 229 227 / 0.16); text-align: left; vertical-align: top; }
.doc th { font-family: var(--serif); font-weight: 400; font-size: 17px; border-bottom-color: rgb(230 229 227 / 0.5); }
.catalog--list .doc a { text-decoration-color: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 40px 0 0; padding: 16px 0 0; list-style: none; border-top: 1px solid rgb(230 229 227 / 0.2); }
.tags__item { font-size: 14px; color: var(--charcoal-soft); }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(64px, 8vw, 120px); padding-top: 24px; border-top: 1px solid rgb(230 229 227 / 0.2); }
.post__nav-link { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 2.6vw, 40px); line-height: 1.1; text-decoration: none; }
.post__nav-link:hover { color: var(--yellow); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 14px; }

.notice { max-width: 46ch; padding: 28px 32px; background: var(--mat); box-shadow: var(--hang); font-family: var(--serif); font-size: 22px; line-height: 1.4; color: var(--ink); }
.notice p { margin: 0; }
.notice a { color: var(--brand); }
.notice--error { color: #8a2219; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 28px 0 40px; border-top: 1px solid rgb(29 28 31 / 0.2); color: var(--soft); font-size: 14px; }
.catalog--post .colophon { border-top-color: rgb(230 229 227 / 0.2); color: var(--charcoal-soft); }
.colophon p { margin: 0; }
.colophon a { color: inherit; text-underline-offset: 4px; }

/* screenshot dialog: the viewer */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; background: var(--charcoal); color: var(--charcoal-ink); }
.zoom::backdrop { background: rgb(29 28 31 / 0.9); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 12px; background: var(--charcoal); }
.zoom__close { min-height: 40px; padding: 0 22px; border: 1px solid var(--charcoal-ink); border-radius: 999px; background: transparent; color: var(--charcoal-ink); font: 600 15px/1 var(--sans); cursor: pointer; }
.zoom__close:hover { background: var(--charcoal-ink); color: var(--charcoal); }
.zoom__close:focus-visible { outline-color: var(--yellow); }
.zoom__scroll { height: calc(94vh - 62px); overflow: auto; padding: 0 clamp(12px, 3vw, 40px) 40px; }
.zoom__img { width: 100%; }

@media (max-width: 1100px) {
    .categories__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .post--card, .post--card:nth-child(n) { width: 44%; margin-top: 0; }
    .post--card:nth-child(4n + 2), .post--card:nth-child(4n + 3) { width: 50%; }
    .post--card:nth-child(even) { margin-top: clamp(32px, 6vw, 72px); }
    .post--full, .post--full .post__header { grid-template-columns: minmax(0, 1fr); }
    .post--full .post__title, .post--full .post__excerpt, .post--full .post__actions, .post--full .post__shot, .post--full .post__doc, .post--full .post__tags { grid-column: 1; grid-row: auto; }
    .post--full .post__shot { position: static; margin-bottom: 56px; }
}
@media (max-width: 700px) {
    .masthead__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "tag" "count"; }
    .listing__header { grid-template-columns: minmax(0, 1fr); }
    .toolbar { grid-column: 1; grid-row: auto; }
    .categories__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .categories__item:first-child { grid-column: 1 / -1; }
    .listing { gap: 56px; }
    .post--card, .post--card:nth-child(n) { width: 100%; margin-top: 0; }
    .post--card:nth-child(even) { width: 82%; margin-left: auto; }
    .post--card:nth-child(3n) { width: 72%; }
    .post--card .post__body { max-width: none; }
}
@media (max-width: 520px) {
    body { font-size: 16px; }
    .stylebar__copy { flex: 1 0 100%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* long words and URLs in the doc and comments wrap instead of widening the page */
.doc p, .doc li, .doc blockquote, .doc td, .doc th, .comment__body { overflow-wrap: anywhere; }
.doc pre, .doc-table { max-width: 100%; }
