/*
 * Catalog style "demo52" — the album as a shelf of magazine covers: lilac cover paper, VOÍD red, huge
 * condensed uppercase, every card a tall 4:5 cover with its name printed across the top. Mirrors /demo52/.
 */
@import url("https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&display=swap");

:root {
    --paper: #d6d3e0;
    --card: #eceaf2;
    --ink: #101014;
    --muted: #4b4955;
    --line: rgba(16, 16, 20, .26);
    --accent: #b4141a;
    --accent-ink: #fff;
    --hot: #b4141a;
    --radius: 0;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 "Archivo", system-ui, sans-serif; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 500 0.88em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

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

.page { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* masthead */
.masthead { padding: 56px 0 28px; border-bottom: 1px solid var(--line); }
.masthead__inner { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 12px 40px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 0.9; }
.brand__mark { font-size: clamp(56px, 9vw, 112px); font-weight: 900; letter-spacing: -0.04em; color: var(--accent); }
.brand__name { margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.masthead__tagline { max-width: 34ch; margin: 0; color: var(--muted); font-size: 17px; }
.masthead__count { margin: 0; text-align: right; color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; }
.masthead__num { display: block; color: var(--ink); font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }

/* style bar */
.stylebar { margin: 20px 0 0; padding: 14px 16px; background: #101014; color: #f3f1ec; border-radius: var(--radius); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.stylebar__label { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.stylebar__value { flex: 1 1 280px; min-width: 0; padding: 7px 12px; overflow-x: auto; white-space: nowrap; background: rgb(255 255 255 / 0.08); border-radius: 8px; }
.stylebar__copy { padding: 8px 16px; border: 0; border-radius: 999px; background: var(--hot); color: #fff; font: 700 14px/1 "Archivo", system-ui, sans-serif; cursor: pointer; }
.stylebar__copy.is-done { background: #f3f1ec; color: #101014; }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.stylebar__item { padding: 3px 10px; border: 1px solid rgb(255 255 255 / 0.22); border-radius: 999px; font-size: 13px; text-decoration: none; opacity: 0.8; }
.stylebar__item:hover, .stylebar__item.is-active { background: var(--accent); color: #fff; opacity: 1; }

/* categories */
.categories { margin: 28px 0 8px; }
.categories__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; text-decoration: none; }
.categories__link:hover { border-color: var(--ink); }
.categories__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.categories__count { font-size: 12px; opacity: 0.6; }

/* listing */
.content { padding: 24px 0 64px; }
.listing__header { margin-bottom: 28px; }
.listing__title { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; }
.listing__intro { max-width: 60ch; margin: 8px 0 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 6px; }
.toolbar__label { margin-right: 6px; }
.toolbar__opt { min-width: 34px; padding: 4px 8px; border-radius: 8px; text-align: center; text-decoration: none; }
.toolbar__opt.is-active { background: var(--ink); color: var(--paper); }

.listing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post--card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.post--card:hover { transform: translateY(-3px); box-shadow: none; }
.post__media { display: block; aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.post--card:hover .post__thumb { transform: scale(1.03); }
.post__body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 24px; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
.post__num { color: var(--accent); font-weight: 700; }
.post__cat { text-decoration: none; }
.post__cat:hover { text-decoration: underline; }
.post__title { margin: 0 0 10px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post__excerpt { margin: 0 0 20px; color: var(--muted); }
.post__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: auto 0 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 40px; }
.pager__link { min-width: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: center; text-decoration: none; }
.pager__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* one post */
.post--full { max-width: 980px; margin: 0 auto; }
.post__header { padding: 12px 0 28px; }
.post--full .post__title { font-size: clamp(40px, 6vw, 72px); font-weight: 900; letter-spacing: -0.035em; line-height: 1; }
.post--full .post__excerpt { max-width: 62ch; font-size: 19px; }
.post__shot { margin: 0 0 40px; }
.post__zoom { display: block; max-height: 720px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: zoom-in; }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.doc { font-size: 17px; }
.doc h2 { margin: 44px 0 12px; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.doc h3 { margin: 32px 0 8px; font-size: 20px; }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 6px; font-size: 17px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc code { padding: 1px 6px; background: rgba(16, 16, 20, .1); border-radius: 5px; }
.doc pre { margin: 0 0 18px; padding: 16px 18px; overflow-x: auto; background: #0f1411; color: #e8efe9; border-radius: 10px; }
.doc pre code { padding: 0; background: none; }
.doc blockquote { margin: 0 0 18px; padding: 4px 0 4px 18px; border-left: 3px solid var(--hot); color: var(--muted); }
.doc hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.doc-table { margin: 0 0 18px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc th { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 32px 0 0; padding: 0; list-style: none; }
.tags__item { padding: 3px 10px; border-radius: 999px; background: rgba(16, 16, 20, .1); font-size: 13px; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post__nav-link { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.post__nav-link:hover { border-color: var(--ink); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }

.notice { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.notice--error { border-color: #b4141a; color: #8d0f14; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.colophon p { margin: 0; }

/* screenshot dialog */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 12px; background: #111; color: #fff; }
.zoom::backdrop { background: rgb(16 16 20 / 0.82); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: #111; }
.zoom__close { padding: 8px 16px; border: 0; border-radius: 999px; background: #fff; color: #111; font: 700 14px/1 "Archivo", system-ui, sans-serif; cursor: pointer; }
.zoom__scroll { height: calc(94vh - 56px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 860px) {
    .masthead__inner { grid-template-columns: 1fr; }
    .masthead__count { text-align: left; }
    .listing { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .page { padding: 0 16px; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
}
@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%; }


/* the shelf: tall covers, the name printed huge in condensed red */
.brand__mark { color: var(--accent); font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(88px, 15vw, 200px); letter-spacing: -0.01em; line-height: .84; }
.brand__name { font-stretch: 75%; }
.masthead { border-bottom: 3px solid var(--accent); }
.listing { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 20px; }
.post--card { background: none; border: 0; overflow: visible; }
.post--card:hover { transform: none; }
.post--card .post__media { aspect-ratio: 4 / 5; background: #101014; box-shadow: 0 14px 30px rgba(16, 16, 20, .22); transition: transform .12s ease-out; }
.post--card:hover .post__media { transform: translateY(-6px) rotate(-1deg); }
.post--card:hover .post__thumb { transform: none; }
.post--card .post__body { padding: 16px 0 0; }
.post__title, .listing__title, .post--full .post__title, .doc h2 { font-stretch: 62%; font-weight: 900; text-transform: uppercase; letter-spacing: 0; }
.post--card .post__title { font-size: 34px; line-height: .95; }
.post--full .post__title { font-size: clamp(64px, 11vw, 150px); line-height: .86; color: var(--accent); }
.listing__title { font-size: clamp(48px, 7vw, 96px); line-height: .9; }
.doc h2 { font-size: 40px; }
.doc a { color: #8d0f14; }
.btn, .categories__link, .stylebar__item, .pager__link, .tags__item, .post__nav-link { border-radius: 0; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.categories__link.is-active, .toolbar__opt.is-active, .pager__link.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.post__zoom { border: 0; box-shadow: 0 24px 60px rgba(16, 16, 20, .3); }
@media (max-width: 1100px) { .listing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; } .post--card .post__title { font-size: 26px; } .post__excerpt { font-size: 14px; } }
@media (max-width: 420px) { .listing { grid-template-columns: minmax(0, 1fr); } }
