/* Catalog style "demo15" — the wall: warm stone, deep green, Bricolage Grotesque; the demos hang as one tilted wall of covers that settle flat. Mirrors /demo15/. */
@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,700;12..96,800&display=swap");

:root {
    --ground: #d6d2ca;
    --paper: #e5e2dc;
    --stone: #c6c1b7;
    --ink: #1b1c18;
    --soft: #45463f;
    --deep: #13321f;
    --deep-2: #1a3f28;
    --green: #469a58;
    --yellow: #ffb500;
    --on-deep: #edeae3;
    --font: "Bricolage Grotesque", "Lato", system-ui, sans-serif;
    --edge: clamp(16px, 3vw, 48px);
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.5 var(--font); font-optical-sizing: auto; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
code { font: 400 0.86em/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 10px; z-index: 20; padding: 10px 18px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; text-decoration: none; }
.skip:focus { left: 12px; }
.deco { display: none; }

.page { display: flex; flex-direction: column; width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 var(--edge); }

/* ── deep green band on top, like the demo's header ───────────────────────────────────────── */
.stylebar { order: -1; margin: 0 calc(-1 * var(--edge)); padding: 12px var(--edge); background: var(--deep); color: var(--on-deep); }
.stylebar :focus-visible { outline-color: var(--yellow); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.stylebar__label { font-weight: 800; font-size: 15px; }
.stylebar__value { flex: 0 1 460px; min-width: 0; padding: 8px 14px; overflow-x: auto; white-space: nowrap; border-radius: 999px; background: var(--deep-2); color: #fff; font-size: 13px; }
.stylebar__copy { min-height: 40px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer; transition: background 220ms ease, transform 160ms var(--ease); }
.stylebar__copy:hover { background: var(--on-deep); }
.stylebar__copy:active { transform: scale(0.96); }
.stylebar__copy.is-done { background: var(--green); color: #fff; }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.stylebar__item { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 999px; color: #c9d3cb; font-size: 13px; font-weight: 500; text-decoration: none; }
.stylebar__item:hover { background: var(--deep-2); color: #fff; }
.stylebar__item.is-active { background: var(--on-deep); color: var(--deep); font-weight: 700; }

/* ── masthead: the headline over the wall ─────────────────────────────────────────────────── */
.masthead { padding: clamp(56px, 8vw, 128px) 0 clamp(24px, 3vw, 40px); text-align: center; }
.masthead__inner { display: flex; flex-direction: column; align-items: center; }
.brand { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.brand__mark { font: 800 clamp(80px, 13vw, 220px)/0.86 var(--font); letter-spacing: -0.055em; }
.brand__name { margin-top: 10px; font: 700 clamp(26px, 3vw, 44px)/1 var(--font); letter-spacing: -0.03em; color: var(--deep); }
.masthead__tagline { max-width: 40ch; margin: 22px auto 0; color: var(--soft); font-size: clamp(18px, 1.25vw, 21px); }
.masthead__count { margin: 14px 0 0; color: var(--soft); font-size: 15px; }
.masthead__num { font-weight: 800; color: var(--ink); }

/* ── categories: the magazine filter under the wall ───────────────────────────────────────── */
.categories { margin: 4px 0 0; }
.categories__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.categories__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--paper); font-size: 15px; font-weight: 700; text-decoration: none; transition: background 220ms ease, color 220ms ease, transform 160ms var(--ease); }
.categories__link:hover { background: var(--stone); }
.categories__link:active { transform: scale(0.96); }
.categories__link.is-active { background: var(--deep); color: var(--on-deep); }
.categories__count { color: var(--soft); font-size: 13px; font-weight: 500; }
.categories__link.is-active .categories__count { color: #b9cdbf; }

/* ── the wall ─────────────────────────────────────────────────────────────────────────────── */
.content { padding: clamp(40px, 5vw, 72px) 0 96px; }
.listing__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: clamp(28px, 3vw, 44px); }
.listing__title { margin: 0; font: 800 clamp(40px, 5.4vw, 92px)/0.94 var(--font); letter-spacing: -0.045em; }
.listing__intro { flex-basis: 100%; order: 2; max-width: 44ch; margin: 0; color: var(--soft); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; color: var(--soft); font-size: 15px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 4px; }
.toolbar__label { margin-right: 6px; }
.toolbar__opt { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 999px; background: var(--paper); font-weight: 700; text-decoration: none; }
.toolbar__opt:hover { background: var(--stone); color: var(--ink); }
.toolbar__opt.is-active { background: var(--ink); color: var(--ground); }

.listing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 24px); perspective: 1600px; }
.post--card {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 6px; background: var(--paper);
    box-shadow: 0 30px 50px -36px rgb(27 28 24 / 0.55);
    transform: rotateX(5deg) rotateY(-4deg) translateZ(-30px); transform-origin: 50% 100%;
    transition: transform 700ms var(--ease), box-shadow 700ms var(--ease);
}
.post--card.post--even { transform: rotateX(5deg) rotateY(4deg) translateZ(-30px); }
.post--card:hover, .post--card:focus-within, .post--card.post--even:hover, .post--card.post--even:focus-within { transform: none; box-shadow: 0 40px 70px -40px rgb(27 28 24 / 0.7); }
/* the first cover is the one the camera dives into: twice as wide */
.post--card:first-child { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); background: var(--deep); color: var(--on-deep); transform: none; }
.post--card:first-child :focus-visible { outline-color: var(--yellow); }
.post__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); }
.post--card:first-child .post__media { aspect-ratio: auto; height: 100%; min-height: 280px; }
.post__thumb { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 900ms var(--ease); }
.post--card:hover .post__thumb { transform: scale(1.04); }
.post__body { display: flex; flex: 1; flex-direction: column; padding: 16px 18px 18px; }
.post--card:first-child .post__body { padding: clamp(20px, 2.4vw, 36px); }
.post__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0 0 8px; color: var(--soft); font-size: 13px; font-weight: 500; }
.post--card:first-child .post__meta { color: #c3d0c6; }
.post__num { color: var(--ink); font-weight: 800; }
.post--card:first-child .post__num { color: var(--yellow); }
.post__cat { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 3px; }
.post__cat:hover { color: var(--green); }
.post--card:first-child .post__cat:hover { color: #fff; }
.post__title { margin: 0 0 8px; font: 800 clamp(22px, 1.7vw, 30px)/1 var(--font); letter-spacing: -0.035em; }
.post--card:first-child .post__title { font-size: clamp(34px, 3.6vw, 64px); letter-spacing: -0.045em; margin-bottom: 14px; }
.post__title a { text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--green); text-underline-offset: 4px; }
.post__excerpt { margin: 0 0 16px; color: var(--soft); font-size: 15px; line-height: 1.45; }
.post--card:first-child .post__excerpt { color: #d9dfd9; font-size: clamp(16px, 1.2vw, 19px); }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: auto 0 0; }
.btn {
    display: inline-flex; align-items: center; min-height: 40px; font: 700 15px/1.2 var(--font);
    text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: var(--green);
    transition: color 200ms ease, background 220ms ease, transform 160ms var(--ease);
}
.btn:hover { color: var(--green); }
.post--card:first-child .btn:hover { color: #fff; }
.btn--primary { gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--deep); color: var(--on-deep); text-decoration: none; }
.btn--primary:hover { background: var(--green); color: #fff; }
.btn--primary:active { transform: scale(0.96); }
.post--card:first-child .btn--primary { background: var(--yellow); color: var(--ink); }
.post--card:first-child .btn--primary:hover { background: var(--on-deep); color: var(--ink); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 64px; }
.pager__link { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 14px; border-radius: 999px; background: var(--paper); font-weight: 800; text-decoration: none; }
.pager__link:hover { background: var(--stone); }
.pager__link.is-active { background: var(--deep); color: var(--on-deep); }
.pager__link--prev, .pager__link--next { padding: 0 22px; font-weight: 700; }

/* ── one post: headline, the shot on a deep green ground, the doc on paper ────────────────── */
.post__header { max-width: 1100px; margin: 0 auto; padding-bottom: clamp(32px, 4vw, 56px); text-align: center; }
.post--full .post__meta { justify-content: center; margin-bottom: 16px; font-size: 15px; }
.post--full .post__title { font-size: clamp(54px, 8.2vw, 140px); line-height: 0.92; letter-spacing: -0.05em; margin-bottom: 20px; }
.post--full .post__excerpt { max-width: 44ch; margin: 0 auto 26px; font-size: clamp(18px, 1.25vw, 21px); }
.post--full .post__actions { justify-content: center; }
.post__shot { margin: 0 0 clamp(48px, 6vw, 88px); padding: clamp(24px, 5vw, 80px) 0; background: var(--deep); box-shadow: 0 0 0 100vmax var(--deep); clip-path: inset(0 -100vmax); }
.post__zoom { display: block; max-width: 1180px; max-height: 760px; margin: 0 auto; overflow: hidden; border-radius: 6px; background: var(--deep-2); cursor: zoom-in; transform: perspective(1600px) rotateX(4deg); transform-origin: 50% 100%; transition: transform 700ms var(--ease); box-shadow: 0 50px 80px -40px #000; }
.post__zoom:hover, .post__zoom:focus-visible { transform: none; }
.post__zoom:focus-visible { outline-color: var(--yellow); }
.post__zoom img { width: 100%; }
.post__caption { margin-top: 16px; color: #c3d0c6; font-size: 14px; text-align: center; }

.doc { max-width: 880px; margin: 0 auto; padding: clamp(28px, 4vw, 64px); border-radius: 8px; background: var(--paper); color: #26271f; font-size: 18px; line-height: 1.6; }
.doc h2 { margin: 64px 0 16px; font: 800 clamp(34px, 3.6vw, 60px)/0.94 var(--font); letter-spacing: -0.045em; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 32px 0 10px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 8px; font-size: 18px; font-weight: 700; }
.doc p, .doc ul, .doc ol { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--green); }
.doc a { color: var(--deep); text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.doc a:hover { color: var(--green); }
.doc code { padding: 1px 6px; border-radius: 4px; background: var(--ground); overflow-wrap: anywhere; }
.doc pre { margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; border-radius: 6px; background: var(--deep); color: var(--on-deep); }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 20px; padding: 18px 22px; border-radius: 6px; background: var(--ground); border-left: 4px solid var(--deep); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { margin: 40px 0; border: 0; border-top: 2px solid var(--stone); }
.doc-table { margin: 0 0 20px; 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(--stone); text-align: left; vertical-align: top; }
.doc th { background: var(--deep); color: var(--on-deep); font-weight: 700; }
.doc td:first-child { font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 880px; margin: 32px auto 0; padding: 0; list-style: none; }
.tags__item { padding: 6px 14px; border-radius: 999px; background: var(--paper); font-size: 14px; font-weight: 700; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1180px; margin: 56px auto 0; }
.post__nav-link { padding: 22px 26px; border-radius: 8px; background: var(--paper); font: 800 clamp(22px, 2.2vw, 36px)/1 var(--font); letter-spacing: -0.035em; text-decoration: none; transition: background 220ms ease, color 220ms ease; }
.post__nav-link:hover { background: var(--deep); color: var(--on-deep); }
.post__nav-link:hover .post__nav-label { color: #c3d0c6; }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 6px; color: var(--soft); font-size: 14px; font-weight: 500; letter-spacing: 0; }

.notice { max-width: 880px; margin: 0 auto; padding: 28px 32px; border-radius: 8px; background: var(--paper); font-size: 20px; font-weight: 500; text-align: center; }
.notice p { margin: 0; }
.notice--error { background: #f2d9d3; color: #7a2418; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px 0 44px; border-top: 2px solid var(--stone); color: var(--soft); font-size: 14px; }
.colophon p { margin: 0; }
.colophon a { text-decoration-color: var(--green); text-underline-offset: 4px; }

/* ── screenshot dialog ───────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 0; border-radius: 10px; background: var(--deep); color: var(--on-deep); }
.zoom::backdrop { background: rgb(19 50 31 / 0.82); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 12px; background: var(--deep); }
.zoom__close { min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: 700 15px/1 var(--font); cursor: pointer; }
.zoom__close:focus-visible { outline-color: var(--on-deep); }
.zoom__scroll { height: calc(94vh - 64px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 1200px) {
    .listing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .post--card:first-child { grid-column: span 3; }
}
@media (max-width: 860px) {
    .listing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post--card:first-child { grid-column: span 2; grid-template-columns: minmax(0, 1fr); }
    .post--card:first-child .post__media { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
    .stylebar__list { margin-left: 0; }
}
@media (max-width: 560px) {
    .listing { grid-template-columns: minmax(0, 1fr); perspective: none; }
    .post--card, .post--card.post--even { transform: none; }
    .post--card:first-child { grid-column: auto; }
    .stylebar__value { flex: 1 1 100%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; }
    .post__zoom { transform: none; }
}
@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%; }
