/* Catalog style "demo38" — the album as a spotlight stack: dark DEPO ground with a green glow, Bodoni Moda names, every demo a wide sticky card that the next one slides over. Mirrors /demo38/. */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..700;1,6..96,400..600&family=Lato:wght@400;700&display=swap");

:root {
    --bg: #18171a;
    --card: #1f1e22;
    --card-2: #26252a;
    --ink: #f4efe8;
    --soft: rgb(244 239 232 / 0.72);
    --faint: rgb(244 239 232 / 0.5);
    --rule: rgb(244 239 232 / 0.14);
    --gold: #ffb500;
    --green: #53f57e;
    --serif: "Bodoni Moda", "Didot", Georgia, serif;
    --sans: "Lato", system-ui, sans-serif;
    --radius: 22px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font: 400 16px/1.6 var(--sans);
    background:
        radial-gradient(circle 46vmax at 82% 8%, rgb(83 245 126 / 0.13), transparent 70%),
        radial-gradient(circle 40vmax at 8% 70%, rgb(83 245 126 / 0.08), transparent 70%),
        var(--bg);
    background-attachment: fixed;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 400 0.88em/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

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

.page { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3.4vw, 48px); }

/* small caps labels */
.brand__name, .masthead__count, .stylebar__label, .post__meta, .categories__link, .toolbar, .post__nav-label, .listing__intro, .post__caption, .doc th {
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
}
.listing__intro { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 15px; }

/* masthead */
.masthead { padding: clamp(40px, 6vw, 88px) 0 32px; border-bottom: 1px solid var(--rule); }
.masthead__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px 40px; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand__mark { font: 500 clamp(64px, 11vw, 168px)/0.86 var(--serif); letter-spacing: -0.03em; }
.brand__name { margin-top: 16px; color: var(--green); }
.masthead__tagline { grid-column: 1; max-width: 40ch; margin: 0; color: var(--soft); font: italic 400 clamp(19px, 1.7vw, 24px)/1.35 var(--serif); }
.masthead__count { grid-column: 2; grid-row: 1 / 3; align-self: end; margin: 0; color: var(--faint); text-align: right; }
.masthead__num { display: block; color: var(--ink); font: 400 clamp(56px, 6vw, 88px)/1 var(--serif); letter-spacing: 0; text-transform: none; }

/* style bar */
.stylebar { margin: 24px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.stylebar__label { color: var(--faint); }
.stylebar__value { flex: 1 1 280px; min-width: 0; padding: 8px 12px; overflow-x: auto; white-space: nowrap; border-radius: 10px; background: rgb(255 255 255 / 0.05); color: var(--ink); }
.stylebar__copy { padding: 10px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 13px/1 var(--sans); letter-spacing: 0.06em; cursor: pointer; }
.stylebar__copy.is-done { background: var(--green); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.stylebar__item { padding: 4px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--soft); font-size: 13px; text-decoration: none; }
.stylebar__item:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--soft); }
.stylebar__item.is-active { background: var(--gold); color: #18171a; box-shadow: none; }
.stylebar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; width: 100%; padding-top: 6px; font-size: 14px; }
.stylebar__guide, .stylebar__download { color: var(--soft); text-underline-offset: 3px; }
.stylebar__guide:hover, .stylebar__download:hover { color: var(--ink); }

/* categories */
.categories { margin: 32px 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: 10px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--soft); text-decoration: none; font-size: 11px; }
.categories__link:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--soft); }
.categories__link.is-active { background: var(--ink); color: var(--bg); box-shadow: none; }
.categories__count { opacity: 0.6; }

/* listing head */
.content { padding: 32px 0 96px; }
.listing__header { margin-bottom: 40px; }
.listing__title { margin: 0; font: 500 clamp(40px, 5.4vw, 84px)/0.95 var(--serif); letter-spacing: -0.02em; }
.listing__intro { max-width: 60ch; margin: 12px 0 0; color: var(--soft); }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 11px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 6px; }
.toolbar__opt { min-width: 34px; padding: 5px 9px; border-radius: 999px; text-align: center; text-decoration: none; color: var(--soft); }
.toolbar__opt.is-active { background: var(--ink); color: var(--bg); }

/* the stack: each card sticks and the next one slides over it */
.listing { display: grid; gap: 10vh; }
.post--card {
    position: sticky;
    top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(20px, 3.4vw, 56px);
    min-height: min(78vh, 640px);
    padding: clamp(16px, 2vw, 28px);
    border-radius: var(--radius);
    background: linear-gradient(110deg, var(--card-2), var(--card) 60%);
    box-shadow: 0 -30px 60px -36px rgb(0 0 0 / 0.95), inset 0 0 0 1px rgb(255 255 255 / 0.07);
}
.post--card:nth-child(2) { top: 32px; }
.post--card:nth-child(3) { top: 40px; }
.post--card:nth-child(n+4) { top: 48px; }
.post__media { display: block; overflow: hidden; border-radius: 14px; background: #111; }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.post--card:hover .post__thumb { transform: scale(1.025); }
.post__body { display: flex; flex-direction: column; min-width: 0; padding: 8px 8px 4px 0; }
.post__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; color: var(--faint); font-size: 11px; }
.post__num { color: var(--ink); }
.post__cat { text-decoration: none; color: var(--green); }
.post__cat:hover { text-decoration: underline; }
.post__title { margin: auto 0 14px; font: 500 clamp(40px, 5vw, 80px)/0.92 var(--serif); letter-spacing: -0.03em; }
.post__title a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s ease; }
.post__title a:hover { background-size: 100% 1px; }
.post__excerpt { margin: 0 0 24px; max-width: 46ch; color: var(--soft); font: italic 400 clamp(17px, 1.3vw, 20px)/1.45 var(--serif); }
.post__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: auto 0 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); font: 700 13px/1 var(--sans); letter-spacing: 0.04em; text-decoration: none; }
.btn:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--primary { background: var(--ink); color: var(--bg); box-shadow: none; }
.btn--primary:hover { background: #fff; box-shadow: none; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 56px; }
.pager__link { min-width: 42px; padding: 9px 13px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); text-align: center; text-decoration: none; color: var(--soft); }
.pager__link:hover { color: var(--ink); }
.pager__link.is-active { background: var(--ink); color: var(--bg); box-shadow: none; }

/* one post */
.post--full { max-width: 1040px; margin: 0 auto; }
.post__header { padding: 16px 0 36px; }
.post--full .post__title { margin: 6px 0 16px; font-size: clamp(52px, 8vw, 128px); }
.post--full .post__excerpt { max-width: 56ch; font-size: clamp(19px, 1.6vw, 24px); }
.post__shot { margin: 0 0 48px; }
.post__zoom { display: block; max-height: 760px; overflow: hidden; border-radius: var(--radius); background: #111; box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9), inset 0 0 0 1px var(--rule); cursor: zoom-in; }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 12px; color: var(--faint); font-size: 11px; }
.doc { font-size: 17px; color: var(--soft); }
.doc h2 { margin: 56px 0 14px; color: var(--ink); font: 500 clamp(30px, 3vw, 44px)/1.05 var(--serif); letter-spacing: -0.015em; }
.doc h3 { margin: 34px 0 8px; color: var(--ink); font: 500 24px/1.2 var(--serif); }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 6px; color: var(--ink); font-size: 17px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc strong { color: var(--ink); }
.doc a { color: var(--green); text-underline-offset: 3px; }
.doc code { padding: 1px 6px; border-radius: 5px; background: rgb(255 255 255 / 0.07); color: var(--ink); }
.doc pre { margin: 0 0 18px; padding: 18px 20px; overflow-x: auto; border-radius: 14px; background: #0f0e11; color: #e9e4dc; box-shadow: inset 0 0 0 1px var(--rule); }
.doc pre code { padding: 0; background: none; }
.doc blockquote { margin: 0 0 18px; padding: 4px 0 4px 20px; border-left: 2px solid var(--gold); font: italic 400 19px/1.5 var(--serif); }
.doc hr { margin: 36px 0; border: 0; border-top: 1px solid var(--rule); }
.doc-table { margin: 0 0 18px; overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.doc th { color: var(--faint); font-size: 11px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 36px 0 0; padding: 0; list-style: none; }
.tags__item { padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); color: var(--soft); font-size: 13px; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rule); }
.post__nav-link { padding: 18px 22px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); font: 500 24px/1.15 var(--serif); text-decoration: none; }
.post__nav-link:hover { box-shadow: inset 0 0 0 1px var(--soft); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 6px; color: var(--faint); font: 700 11px/1.2 var(--sans); }

.notice { padding: 20px 24px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.notice--error { box-shadow: inset 0 0 0 1px #ff6b5a; color: #ffb4a8; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 28px 0 44px; border-top: 1px solid var(--rule); color: var(--faint); font-size: 13px; }
.colophon p { margin: 0; }
.colophon a { color: var(--soft); }

/* screenshot dialog */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 18px; background: #0f0e11; color: var(--ink); }
.zoom::backdrop { background: rgb(8 8 10 / 0.86); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px; background: #0f0e11; }
.zoom__close { padding: 10px 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 13px/1 var(--sans); cursor: pointer; }
.zoom__scroll { height: calc(94vh - 58px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 860px) {
    .masthead__inner { grid-template-columns: 1fr; }
    .masthead__count { grid-column: 1; grid-row: auto; text-align: left; }
    .listing { gap: 28px; }
    .post--card, .post--card:nth-child(n) { position: relative; top: 0; grid-template-columns: 1fr; min-height: 0; }
    .post__media { aspect-ratio: 4 / 3; }
    .post__title { margin-top: 4px; }
}
@media (max-width: 520px) {
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; }
}
/* short screens: the stack would not fit, so it becomes a plain list */
@media (max-height: 620px) {
    .post--card, .post--card:nth-child(n) { position: relative; top: 0; }
    .listing { gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.doc p, .doc li, .doc blockquote, .doc td, .doc th, .comment__body { overflow-wrap: anywhere; }
.doc pre, .doc-table { max-width: 100%; }
