/* Catalog style "demo14" — a dark photo studio: one warm key light, Instrument Serif, demos as set cards that switch on in a zig-zag. Mirrors /demo14/. */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Lato:wght@400;700&display=swap");

:root {
    --ground: #0c110f;
    --wall: #131a16;
    --raise: #18211c;
    --line: #26302a;
    --ink: #f1ebe0;
    --soft: #b4afa3;
    --warm: #ffcf94;
    --green: #469a58;
    --yellow: #ffb500;
    --dark: #0c110f;
    --serif: "Instrument Serif", Georgia, serif;
    --sans: "Lato", system-ui, sans-serif;
    --edge: clamp(16px, 3.4vw, 56px);
    --ease: cubic-bezier(.2, .7, .15, 1);
    color-scheme: dark;
}

*, *::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.6 var(--sans); 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: 2px solid var(--warm); outline-offset: 3px; }

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

.page { position: relative; isolation: isolate; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--edge); }

/* the key light: a warm pool on the wall behind the masthead, a cool spill lower down */
.deco { position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.deco--1 { top: -24vh; right: 0; width: min(1100px, 100%); height: min(1000px, 100vw); background: radial-gradient(closest-side, rgb(255 207 148 / 0.22), rgb(255 207 148 / 0.07) 55%, transparent); }
.deco--2 { top: 40vh; left: 0; width: 70%; height: 60vw; background: radial-gradient(closest-side, rgb(70 154 88 / 0.10), transparent); }
.deco--3 { display: none; }

/* ── masthead: "set the light" ─────────────────────────────────────────────────────────────── */
.masthead { padding: clamp(56px, 9vw, 140px) 0 clamp(32px, 4vw, 56px); }
.masthead__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 20px 48px; align-items: end; }
.brand { display: block; text-decoration: none; }
.brand__mark { display: block; font: 400 clamp(88px, 14vw, 220px)/0.86 var(--serif); letter-spacing: -0.02em; text-shadow: 0 0 80px rgb(255 207 148 / 0.25); }
.brand__name { display: block; margin-top: 8px; font: italic 400 clamp(36px, 4.4vw, 72px)/1 var(--serif); color: var(--warm); }
.masthead__tagline { grid-column: 2; margin: 0; max-width: 34ch; color: var(--soft); font-size: 18px; line-height: 1.55; }
.masthead__count { grid-column: 2; margin: 0; color: var(--soft); font-size: 15px; }
.masthead__num { color: var(--ink); font: 400 32px/1 var(--serif); margin-right: 4px; }

/* ── style bar: the lighting console ───────────────────────────────────────────────────────── */
.stylebar { padding: 18px 20px; border-radius: 20px; background: rgb(24 33 28 / 0.85); border: 1px solid var(--line); }
.stylebar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.stylebar__label { font: italic 400 22px/1 var(--serif); color: var(--warm); }
.stylebar__value { flex: 1 1 260px; min-width: 0; padding: 10px 16px; overflow-x: auto; white-space: nowrap; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); }
.stylebar__copy { min-height: 46px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--dark); font: 700 15px/1 var(--sans); cursor: pointer; transition: background 220ms ease, transform 180ms var(--ease); }
.stylebar__copy:hover { background: #ffc83d; transform: translateY(-2px); }
.stylebar__copy.is-done { background: var(--warm); }
.stylebar__list { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.stylebar__item { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); color: var(--soft); font-size: 13px; text-decoration: none; transition: color 200ms ease, border-color 200ms ease; }
.stylebar__item::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3a453e; }
.stylebar__item:hover { color: var(--ink); border-color: var(--soft); }
.stylebar__item.is-active { color: var(--ink); border-color: var(--warm); }
.stylebar__item.is-active::before { background: var(--warm); box-shadow: 0 0 10px var(--warm); }

/* ── categories: switches on the console ──────────────────────────────────────────────────── */
.categories { margin: 18px 0 0; }
.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: 10px; min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--wall); border: 1px solid var(--line); font-size: 15px; font-weight: 700; text-decoration: none; transition: border-color 200ms ease, background 200ms ease; }
.categories__link::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #3a453e; transition: background 200ms ease, box-shadow 200ms ease; }
.categories__link:hover { border-color: var(--soft); }
.categories__link.is-active { background: var(--raise); border-color: var(--warm); }
.categories__link.is-active::before { background: var(--warm); box-shadow: 0 0 12px var(--warm); }
.categories__count { color: var(--soft); font-size: 13px; font-weight: 400; }

/* ── listing: set cards in a zig-zag, each switches on under its own beam ─────────────────── */
.content { padding: clamp(56px, 7vw, 112px) 0 96px; }
.listing__header { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }
.listing__title { margin: 0; font: 400 clamp(48px, 6vw, 96px)/1 var(--serif); letter-spacing: -0.02em; }
.listing__intro { grid-column: 1; margin: 0; max-width: 40ch; color: var(--soft); }
.toolbar { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 8px; color: var(--soft); font-size: 15px; }
.toolbar p { margin: 0; }
.toolbar__view { display: flex; align-items: center; gap: 4px; }
.toolbar__label { margin-right: 8px; }
.toolbar__opt { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border-radius: 999px; text-decoration: none; }
.toolbar__opt:hover { color: var(--ink); background: var(--wall); }
.toolbar__opt.is-active { color: var(--dark); background: var(--warm); font-weight: 700; }

.listing { display: flex; flex-direction: column; gap: clamp(64px, 9vw, 140px); }
.post--card {
    position: relative; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 64px); align-items: center;
}
.post--card.post--even { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
.post--even .post__media { order: 2; }
/* the beam from above */
.post--card::before {
    content: ""; position: absolute; z-index: -1; left: 50%; top: -18%; width: 90%; height: 120%; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgb(255 207 148 / 0.16), transparent);
    opacity: 0.35; transition: opacity 700ms var(--ease);
}
.post--card:hover::before, .post--card:focus-within::before { opacity: 1; }
.post__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--wall); box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9); }
.post__thumb {
    width: 100%; height: 100%; object-fit: cover; object-position: top;
    filter: brightness(0.5) saturate(0.25); transform: scale(1.03);
    transition: filter 900ms var(--ease), transform 1200ms var(--ease);
}
.post--card:hover .post__thumb, .post--card:focus-within .post__thumb { filter: none; transform: scale(1); }
.post__body { display: flex; flex-direction: column; }
.post__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 14px; color: var(--soft); font-size: 14px; }
.post__num { display: inline-flex; align-items: center; gap: 8px; color: var(--warm); font: italic 400 22px/1 var(--serif); }
.post__num::before { content: ""; width: 28px; height: 2px; background: var(--warm); border-radius: 2px; box-shadow: 0 0 10px var(--warm); }
.post__cat { text-decoration: underline; text-decoration-color: rgb(255 207 148 / 0.45); text-underline-offset: 4px; }
.post__cat:hover { color: var(--warm); }
.post__title { margin: 0 0 14px; font: 400 clamp(40px, 4.4vw, 72px)/1 var(--serif); letter-spacing: -0.02em; }
.post__title a { text-decoration: none; }
.post__title a:hover { color: var(--warm); }
.post__excerpt { margin: 0 0 26px; max-width: 40ch; color: var(--soft); }
.post__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 0; }
.btn {
    display: inline-flex; align-items: center; min-height: 44px; font: 700 16px/1.2 var(--sans);
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; text-decoration-color: rgb(255 207 148 / 0.6);
    transition: color 200ms ease, text-decoration-color 200ms ease, background 220ms ease, transform 180ms var(--ease);
}
.btn:hover { color: var(--warm); text-decoration-color: var(--warm); }
.btn--primary { justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--yellow); color: var(--dark); text-decoration: none; }
.btn--primary:hover { background: #ffc83d; color: var(--dark); transform: translateY(-2px); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: clamp(72px, 9vw, 120px); }
.pager__link { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 14px; border-radius: 999px; background: var(--wall); border: 1px solid var(--line); font: 400 24px/1 var(--serif); text-decoration: none; }
.pager__link:hover { border-color: var(--soft); }
.pager__link.is-active { border-color: var(--warm); color: var(--warm); box-shadow: 0 0 24px -6px rgb(255 207 148 / 0.6); }
.pager__link--prev, .pager__link--next { font: 700 15px/1 var(--sans); padding: 0 22px; }

/* ── one post: the shot hangs under the light, the doc reads on the studio wall ───────────── */
.post--full { max-width: 1120px; margin: 0 auto; }
.post__header { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); grid-template-areas: "meta meta" "title excerpt" "title actions"; gap: 18px 48px; align-items: end; padding-bottom: clamp(40px, 5vw, 72px); }
.post--full .post__meta { grid-area: meta; margin: 0; }
.post--full .post__title { grid-area: title; margin: 0; font-size: clamp(56px, 8vw, 132px); line-height: 0.92; }
.post--full .post__excerpt { grid-area: excerpt; margin: 0; font-size: 18px; }
.post--full .post__actions { grid-area: actions; }
.post__shot { position: relative; margin: 0 0 clamp(56px, 7vw, 104px); }
.post__shot::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -120px; width: 100%; height: 520px; transform: translateX(-50%); background: radial-gradient(closest-side, rgb(255 207 148 / 0.18), transparent); pointer-events: none; }
.post__zoom { display: block; max-height: 780px; overflow: hidden; border-radius: 8px; background: var(--wall); box-shadow: 0 60px 120px -50px #000; cursor: zoom-in; }
.post__zoom img { width: 100%; transition: transform 1200ms var(--ease); }
.post__zoom:hover img { transform: scale(1.015); }
.post__caption { margin-top: 14px; color: var(--soft); font-size: 14px; text-align: center; }

.doc { max-width: 720px; margin: 0 auto; color: #ddd7cb; font-size: 18px; line-height: 1.65; }
.doc h2 { margin: 72px 0 16px; color: var(--ink); font: 400 clamp(40px, 4vw, 60px)/1 var(--serif); letter-spacing: -0.015em; }
.doc h2::before { content: ""; display: block; width: 36px; height: 2px; margin-bottom: 22px; border-radius: 2px; background: var(--warm); box-shadow: 0 0 12px var(--warm); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin: 36px 0 10px; color: var(--ink); font: italic 400 28px/1.1 var(--serif); }
.doc h4, .doc h5, .doc h6 { margin: 24px 0 8px; color: var(--ink); font-size: 17px; }
.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(--warm); }
.doc strong { color: var(--ink); }
.doc a { color: var(--ink); text-decoration-color: rgb(255 207 148 / 0.6); text-underline-offset: 5px; }
.doc a:hover { color: var(--warm); }
.doc code { padding: 2px 7px; border-radius: 5px; background: var(--raise); color: var(--ink); overflow-wrap: anywhere; }
.doc pre { margin: 0 0 22px; padding: 20px 22px; overflow-x: auto; border-radius: 10px; background: var(--wall); border: 1px solid var(--line); }
.doc pre code { padding: 0; background: none; overflow-wrap: normal; }
.doc blockquote { margin: 0 0 22px; padding: 22px 26px; border-radius: 10px; background: linear-gradient(180deg, rgb(255 207 148 / 0.07), transparent 70%), var(--wall); border-top: 1px solid rgb(255 207 148 / 0.35); color: #d6cfc2; }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc hr { margin: 48px 0; border: 0; border-top: 1px solid var(--line); }
.doc-table { margin: 0 0 22px; overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--wall); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.doc th { color: var(--warm); font-weight: 700; }
.doc td:first-child { color: var(--ink); font-family: var(--serif); font-size: 19px; }

.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 720px; margin: 56px auto 0; padding: 0; list-style: none; }
.tags__item { padding: 6px 16px; border-radius: 999px; background: var(--wall); border: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 72px; }
.post__nav-link { padding: 26px 28px; border-radius: 16px; background: var(--wall); border: 1px solid var(--line); font: 400 clamp(26px, 2.6vw, 40px)/1.05 var(--serif); text-decoration: none; transition: border-color 300ms ease, box-shadow 300ms ease; }
.post__nav-link:hover { border-color: var(--warm); box-shadow: 0 0 40px -12px rgb(255 207 148 / 0.45); }
.post__nav-link--older { grid-column: 2; text-align: right; }
.post__nav-label { display: block; margin-bottom: 8px; color: var(--soft); font: 400 14px/1 var(--sans); }

.notice { max-width: 720px; margin: 0 auto; padding: 32px; border-radius: 16px; background: var(--wall); border: 1px solid var(--line); font: 400 clamp(24px, 2.4vw, 34px)/1.25 var(--serif); text-align: center; }
.notice p { margin: 0; }
.notice a { text-decoration-color: var(--warm); }
.notice--error { border-color: #e48a78; color: #ffd8cf; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px 0 44px; border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
.colophon p { margin: 0; }
.colophon a { text-decoration-color: rgb(255 207 148 / 0.6); text-underline-offset: 4px; }
.colophon code { color: var(--ink); }

/* ── screenshot dialog ───────────────────────────────────────────────────────────────────── */
.zoom { width: min(1480px, 96vw); max-width: none; height: 94vh; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--ground); color: var(--ink); }
.zoom::backdrop { background: rgb(4 7 6 / 0.88); }
.zoom__bar { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 12px; background: var(--ground); }
.zoom__close { min-height: 44px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--yellow); color: var(--dark); font: 700 15px/1 var(--sans); cursor: pointer; }
.zoom__scroll { height: calc(94vh - 66px); overflow: auto; }
.zoom__img { width: 100%; }

@media (max-width: 860px) {
    .masthead__inner, .listing__header { grid-template-columns: minmax(0, 1fr); }
    .masthead__tagline, .masthead__count, .toolbar { grid-column: 1; }
    .toolbar { grid-row: auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; }
    .post--card, .post--card.post--even { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .post--even .post__media { order: 0; }
    .post--card::before { top: -8%; height: 70%; width: 100%; }
    .post__header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "meta" "title" "excerpt" "actions"; }
}
@media (max-width: 520px) {
    .stylebar { padding: 14px; }
    .stylebar__value { flex-basis: 100%; }
    .stylebar__copy { flex: 1 1 100%; }
    .post__nav { grid-template-columns: 1fr; }
    .post__nav-link--older { grid-column: auto; text-align: left; }
}
/* touch screens have no hover: keep the pictures lit */
@media (hover: none) {
    .post__thumb { filter: none; transform: none; }
    .post--card::before { opacity: 0.8; }
}
@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%; }
