/* The Journal (page-journal.php): the list of articles and the article itself, built on the parts in v3.css and the
   work cards in hook.css. Only what those don't cover is here. Loaded only on those pages. */

/* ---------- Reading progress: an orange line under the header, as long as the part of the article read. ---------- */
.bkJ-progress { position: fixed; top: var(--bkHdr); right: 0; left: 0; z-index: 40; height: 2px; pointer-events: none; transition: opacity .5s ease; }
.bkJ-progress.is-done { opacity: 0; } /* past the end of the article */
.bkJ-progress span { display: block; height: 100%; background: #ff5e00; transform: scaleX(var(--p, 0)); transform-origin: left center; }

/* ---------- Article hero: the case study hero, with a headline sized for a sentence. ---------- */
.bkJ-hero .bkA-chero__title { max-width: 20ch; font-size: clamp(36px, min(5.6vw, 9.2vh), 100px); line-height: .92; letter-spacing: -.025em; }
.bkJ-hero .bkA-chero__title span { display: inline; }

/* ---------- The short answer: the article's first paragraph, large, in the serif, filling in as it scrolls. ---------- */
.bkA-intro.--inline.bkJ-answer { padding: clamp(64px, 8vw, 132px) 0 clamp(56px, 7vw, 116px); }
.bkJ-answer .bkA__head { margin-bottom: clamp(28px, 3.4vw, 52px); }
.bkA-intro__text.bkJ-answer__text { max-width: 1360px; margin: 0; font-family: var(--font3), serif; font-weight: 400; font-size: clamp(25px, min(3.1vw, 5.4vh), 50px); line-height: 1.18; letter-spacing: -.008em; text-align: left; text-transform: none; text-wrap: pretty; }

/* ---------- Body: contents on the left that follow the reader, chapters on the right. ---------- */
.bkJ-body { padding: clamp(40px, 5vw, 80px) 0 clamp(88px, 10vw, 168px); border-top: 1px solid rgba(20, 20, 20, .12); }
.bkJ-body__grid { display: grid; grid-template-columns: minmax(210px, 3fr) minmax(0, 9fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.bkJ-toc { position: sticky; top: calc(var(--bkHdr) + 40px); padding-top: clamp(24px, 3vw, 44px); font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.45; letter-spacing: .14em; text-transform: uppercase; }
.bkJ-toc__label { margin-bottom: 18px; opacity: .5; }
.bkJ-toc__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(20, 20, 20, .14); }
.bkJ-toc__list a { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 0 6px; padding: 11px 0 11px 0; border-bottom: 1px solid rgba(20, 20, 20, .14); text-decoration: none; opacity: .5; transition: opacity .3s var(--ease), padding .4s var(--ease); }
.bkJ-toc__list a::before { content: ""; position: absolute; top: 15px; left: 0; width: 7px; height: 7px; background: var(--accent); transform: scale(0); transition: transform .4s var(--ease); }
.bkJ-toc__list a:hover { opacity: 1; }
.bkJ-toc__list a.is-on { padding-left: 18px; opacity: 1; }
.bkJ-toc__list a.is-on::before { transform: scale(1); }
.bkJ-toc__all { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding-bottom: 4px; border-bottom: 1px solid currentColor; text-decoration: none; transition: gap .3s var(--ease), border-color .3s var(--ease); }
.bkJ-toc__all:hover { gap: 18px; border-color: var(--accent); }

.bkJ-main { min-width: 0; }
.bkJ-ch { padding-top: clamp(24px, 3vw, 44px); scroll-margin-top: calc(var(--bkHdr) + 16px); }
.bkJ-ch + .bkJ-ch, .bkJ-film + .bkJ-ch, .bkJ-pull + .bkJ-ch { margin-top: clamp(48px, 6vw, 96px); }
.bkJ-ch__head { margin-bottom: clamp(20px, 2.4vw, 34px); }
.bkJ-ch__title { max-width: 18ch; margin-bottom: clamp(22px, 2.6vw, 38px); font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(32px, min(4.2vw, 7.4vh), 68px); line-height: .94; letter-spacing: -.02em; text-transform: uppercase; }

/* Running text. */
.bkJ-text { max-width: 720px; font-family: "Inter", sans-serif; font-size: clamp(17px, 1.22vw, 19.5px); line-height: 1.68; }
.bkJ-text > * + * { margin-top: 1.15em; }
.bkJ-text a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: color .25s var(--ease); }
.bkJ-text a:hover { color: var(--accent); }
/* The chapter's first paragraph answers its question: set it a size up. */
.bkJ-ch .bkJ-text > p:first-child:not(.bkJ-def) { font-size: 1.22em; line-height: 1.5; letter-spacing: -.005em; }
/* Lists: ruled rows with a running number. */
.bkJ-text :is(ul, ol) { margin: 1.6em 0; padding: 0; list-style: none; counter-reset: bkj; border-bottom: 1px solid rgba(20, 20, 20, .16); }
.bkJ-text li { position: relative; padding: 15px 0 15px 54px; border-top: 1px solid rgba(20, 20, 20, .16); counter-increment: bkj; line-height: 1.5; }
.bkJ-text li::before { content: counter(bkj, decimal-leading-zero); position: absolute; top: 19px; left: 0; font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.5; letter-spacing: .14em; color: var(--accent); }
/* A paragraph that opens on a bold term: the term stands above it as a label. */
.bkJ-text .bkJ-def { padding-top: 18px; border-top: 1px solid rgba(20, 20, 20, .16); }
.bkJ-text .bkJ-def strong { display: block; margin-bottom: 8px; font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: 1.16em; line-height: 1.1; letter-spacing: -.005em; text-transform: uppercase; }
/* Tables: ruled like the lists, mono column heads. Wider than a phone, they scroll sideways inside their box. */
.bkJ-text .bkJ-table { max-width: none; margin: 1.8em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bkJ-main .bkJ-text:has(.bkJ-table) { max-width: 920px; }
.bkJ-main .bkJ-text:has(.bkJ-table) > :not(.bkJ-table) { max-width: 720px; }
.bkJ-table table { width: 100%; min-width: 560px; border-collapse: collapse; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 15.5px; line-height: 1.45; }
.bkJ-table th { padding: 14px 20px 14px 0; border-bottom: 1px solid var(--ink); font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 11px; line-height: 1.4; letter-spacing: .14em; text-align: left; text-transform: uppercase; vertical-align: bottom; }
.bkJ-table td { padding: 14px 20px 14px 0; border-top: 1px solid rgba(20, 20, 20, .16); vertical-align: top; }
.bkJ-table tr > :last-child { padding-right: 0; }
.bkJ-table td:first-child { font-family: "Inter Tight", sans-serif; font-weight: 700; letter-spacing: -.005em; text-transform: uppercase; white-space: nowrap; }
/* Notes before the first chapter (the legal note on the usage article). */
.bkJ-note { margin-top: clamp(24px, 3vw, 44px); padding: 18px 0 18px 22px; border-left: 2px solid var(--accent); font-size: 15px; line-height: 1.6; }
.bkJ-note + .bkJ-ch { margin-top: clamp(32px, 4vw, 56px); }

/* A related project's loop between chapters, with the orange corners. */
.bkJ-film { margin: clamp(56px, 7vw, 112px) 0 0; }
.bkJ-film__frame { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.bkJ-film__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.bkJ-film__frame:hover .bkJ-film__img, .bkJ-film__frame:hover .bkA-vloop { transform: scale(1.025); }
.bkJ-film__frame .bkA-vloop { background: transparent; transition: transform 1.2s var(--ease); }
.bkJ-film__frame .bkA-vloop:not([src]) { visibility: hidden; }
.bkJ-film__frame .bkA-corner.--tl, .bkJ-film__frame .bkA-corner.--tr { top: 20px; }
.bkJ-film__frame .bkA-corner.--bl, .bkJ-film__frame .bkA-corner.--br { bottom: 20px; }
.bkJ-film__frame .bkA-corner.--tl, .bkJ-film__frame .bkA-corner.--bl { left: 20px; }
.bkJ-film__frame .bkA-corner.--tr, .bkJ-film__frame .bkA-corner.--br { right: 20px; }
.bkJ-film__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 14px; font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; }
.bkJ-film__cap span { opacity: .6; }
.bkJ-film__cap a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; transition: gap .3s var(--ease), color .3s var(--ease); }
.bkJ-film__cap a:hover { gap: 16px; color: var(--accent); }

/* A client's words between chapters. */
.bkJ-pull { margin: clamp(56px, 7vw, 112px) 0 0; padding: clamp(28px, 3.4vw, 52px) 0 0; border-top: 1px solid var(--ink); }
.bkJ-pull__text { max-width: 22em; margin: 0; font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(24px, min(2.9vw, 5vh), 46px); line-height: 1.04; letter-spacing: -.015em; text-transform: uppercase; }
.bkJ-pull__text span { font-family: var(--font3), serif; font-weight: 400; letter-spacing: 0; }
.bkJ-pull__by { display: flex; align-items: center; gap: 10px; margin-top: clamp(20px, 2.4vw, 32px); font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; }
.bkJ-pull__by::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); }

/* ---------- How Black Koles does it: the dark closing block. ---------- */
.bkJ-close { padding: clamp(96px, 11vw, 190px) 0; background: var(--ink); color: #fff; scroll-margin-top: var(--bkHdr); }
.bkJ-close .bkA__head::after { opacity: .3; }
.bkJ-close__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.bkJ-close__title { font-size: clamp(40px, min(5.4vw, 9.6vh), 92px); }
.bkJ-close__title span { display: block; }
.bkJ-close .bkJ-text { max-width: 680px; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.58; color: rgba(255, 255, 255, .9); }
.bkJ-close .bkJ-text a { color: #fff; }
.bkJ-close .bkJ-text a:hover { color: var(--accent); }
.bkJ-close__btn { margin-top: clamp(28px, 3vw, 44px); background: #fff; color: var(--ink); }
.bkJ-close__btn:hover { background: var(--accent); color: #fff; }

/* ---------- Related work (cards from hook.css) and Keep reading. ---------- */
.bkJ-work { border-top: 0; }
.bkJ-more { padding: clamp(72px, 9vw, 140px) 0; border-top: 1px solid rgba(20, 20, 20, .12); }
.bkJ-more__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.bkJ-more__row { position: relative; isolation: isolate; display: grid; grid-template-columns: 96px minmax(0, 6fr) minmax(0, 5fr) auto; gap: 10px clamp(20px, 3vw, 56px); align-items: center; padding: clamp(22px, 2.6vw, 40px) clamp(12px, 1.6vw, 28px) clamp(22px, 2.6vw, 40px) 4px; border-bottom: 1px solid var(--ink); text-decoration: none; transition: color .45s var(--ease), padding .45s var(--ease); }
.bkJ-more__row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .55s cubic-bezier(.7, 0, .2, 1); }
.bkJ-more__row:hover, .bkJ-more__row:focus-visible { padding-left: clamp(12px, 1.6vw, 28px); color: #fff; }
.bkJ-more__row:hover::before, .bkJ-more__row:focus-visible::before { transform: scaleY(1); }
.bkJ-more__no, .bkJ-more__min { font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.bkJ-more__row:hover .bkJ-more__no { color: var(--accent); }
.bkJ-more__min { display: inline-flex; align-items: center; gap: 14px; }
.bkJ-more__name { font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(22px, min(2.5vw, 4.4vh), 40px); line-height: .98; letter-spacing: -.015em; text-transform: uppercase; text-wrap: balance; }
.bkJ-more__name span, .bkJ-idx__name span { font-family: var(--font3), serif; font-weight: 400; letter-spacing: 0; }
.bkJ-more__desc { font-family: "Inter", sans-serif; font-size: 15px; line-height: 1.5; opacity: .7; }
.bkJ-more__all { margin-top: clamp(40px, 4.4vw, 72px); }

/* ---------- The Journal page: the articles listed over the footage of the one under the pointer. ---------- */
.bkJ-idx { z-index: 1; min-height: calc(100vh - var(--bkHdr)); background: var(--ink); color: #fff; }
.bkJ-idx__stage { position: sticky; top: var(--bkHdr); z-index: 0; height: calc(100vh - var(--bkHdr)); margin-bottom: calc(-100vh + var(--bkHdr)); overflow: hidden; }
.bkJ-idx__bg { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.bkJ-idx__bg.is-on { opacity: 1; }
.bkJ-idx__img, .bkJ-idx__vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bkJ-idx__vid:not([src]) { visibility: hidden; }
.bkJ-idx__bg .bkJ-idx__img, .bkJ-idx__bg .bkJ-idx__vid { transform: scale(1.06); transition: transform 2.4s var(--ease); }
.bkJ-idx__bg.is-on .bkJ-idx__img, .bkJ-idx__bg.is-on .bkJ-idx__vid { transform: none; }
.bkJ-idx__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 20, 20, .62) 0%, rgba(20, 20, 20, .74) 45%, rgba(20, 20, 20, .9) 100%); }
.bkJ-idx__body { padding-top: clamp(72px, 12vh, 150px); padding-bottom: clamp(88px, 10vw, 160px); }
.bkJ-idx__top { margin-bottom: clamp(56px, 8vw, 128px); }
.bkJ-idx__title { margin: 0; font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(64px, min(15vw, 26vh), 250px); line-height: .82; letter-spacing: -.04em; text-transform: uppercase; }
.bkJ-idx__title span { font-family: var(--font3), serif; font-weight: 400; letter-spacing: -.01em; }
.bkJ-idx__lede { max-width: 30em; margin-top: clamp(24px, 3vw, 44px); font-family: var(--font3), serif; font-size: clamp(21px, 2vw, 32px); line-height: 1.22; }
.bkJ-idx__head { margin-bottom: 0; }
.bkJ-idx__head::after { opacity: .3; }
.bkJ-idx__list { margin: clamp(20px, 2.4vw, 34px) 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .3); }
.bkJ-idx__row { display: grid; grid-template-columns: 72px minmax(0, 7fr) minmax(0, 4fr) auto; gap: 10px clamp(20px, 3vw, 56px); align-items: center; padding: clamp(22px, 2.8vw, 44px) 0; border-bottom: 1px solid rgba(255, 255, 255, .3); color: #fff; text-decoration: none; transition: opacity .45s var(--ease), padding .5s var(--ease); }
.bkJ-idx__no, .bkJ-idx__min { font-family: "IBM Plex Mono", monospace; font-size: 12px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; transition: color .3s var(--ease); }
.bkJ-idx__min { display: inline-flex; align-items: center; gap: 14px; transition: gap .4s var(--ease); }
.bkJ-idx__name { font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: clamp(26px, min(3.5vw, 6.2vh), 60px); line-height: .96; letter-spacing: -.02em; text-transform: uppercase; text-wrap: balance; }
.bkJ-idx__desc { font-family: "Inter", sans-serif; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .78); }
@media (hover: hover) and (pointer: fine) {
	.bkJ-idx__list:hover .bkJ-idx__row { opacity: .38; }
	.bkJ-idx__list .bkJ-idx__row:hover, .bkJ-idx__list .bkJ-idx__row:focus-visible { padding-left: clamp(10px, 1.4vw, 24px); opacity: 1; }
	.bkJ-idx__row:hover .bkJ-idx__no { color: var(--accent); }
	.bkJ-idx__row:hover .bkJ-idx__min { gap: 22px; }
}
/* Touch screens: the row nearest the middle of the screen is the lit one (journal.js). */
@media (hover: none) {
	.bkJ-idx__row { opacity: .5; }
	.bkJ-idx__row.is-on { opacity: 1; }
	.bkJ-idx__row.is-on .bkJ-idx__no { color: var(--accent); }
}

/* ---------- Narrow screens. ---------- */
@media (max-width: 991px) {
	.bkJ-body__grid, .bkJ-close__grid { grid-template-columns: minmax(0, 1fr); }
	/* Contents sit above the text and stop following. */
	.bkJ-toc { position: static; padding-top: clamp(16px, 3vw, 28px); }
	.bkJ-toc__list a, .bkJ-toc__list a.is-on { padding-left: 0; opacity: 1; }
	.bkJ-toc__list a::before { display: none; }
	.bkJ-toc__all { display: none; }
	.bkJ-more__row { grid-template-columns: minmax(0, 1fr) auto; }
	.bkJ-more__no { grid-column: 1 / -1; }
	.bkJ-more__desc { grid-column: 1 / -1; grid-row: 3; }
	.bkJ-idx__row { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
	.bkJ-idx__no { padding-top: .5em; }
	.bkJ-idx__desc, .bkJ-idx__min { grid-column: 2; }
}
@media (max-width: 767px) {
	.bkJ-hero .bkA-chero__title { max-width: none; font-size: clamp(32px, 9.6vw, 46px); }
	.bkJ-hero .bkA-chero__foot { flex-direction: column; align-items: flex-start; }
	.bkJ-hero .bkA-chero__meta { gap: 6px 24px; }
	.bkJ-ch__title { max-width: none; }
	.bkJ-text li { padding-left: 40px; }
	.bkJ-film { margin-right: calc(-1 * var(--gut)); margin-left: calc(-1 * var(--gut)); }
	.bkJ-film__cap { padding: 0 var(--gut); }
	.bkJ-film__frame .bkA-corner { display: none; }
	.bkJ-idx__title { font-size: clamp(56px, 19vw, 110px); }
}
@media (prefers-reduced-motion: reduce) {
	.bkJ-idx__bg, .bkJ-idx__bg *, .bkJ-more__row::before, .bkJ-toc__list a { transition: none; }
}
