/**
 * Journal front page (/blog/, first page).
 *
 * Uses the Home page's editorial voice (Instrument Serif headings, ink and
 * paper colours) with the site's seafont for everything else.
 */

@font-face {
	font-family: "Instrument Serif";
	src: url("/wp-content/mu-plugins/aduk-homepage/fonts/instrument-serif-regular.woff2") format("woff2");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Instrument Serif";
	src: url("/wp-content/mu-plugins/aduk-homepage/fonts/instrument-serif-italic.woff2") format("woff2");
	font-style: italic;
	font-weight: 400;
	font-display: swap;
}

.aduk-jh {
	--jh-ink: #2b2b2f;
	--jh-soft: #6b6b70;
	--jh-paper: #f5f1ea;
	--jh-line: rgba(43, 43, 47, 0.16);
	--jh-serif: "Instrument Serif", Georgia, serif;
	--jh-sans: "seafont-regular", helvetica, sans-serif;
	--jh-thin: "seafont-thin", helvetica, sans-serif;
	--jh-wide: 91.6667%;
	--jh-years-h: 78px;
	display: block;
	padding: 0 0 96px;
	background: #fff;
	color: var(--jh-ink);
	font-family: var(--jh-sans);
	font-size: 16px;
	line-height: 1.5;
}

.aduk-jh *,
.aduk-jh *::before,
.aduk-jh *::after {
	box-sizing: border-box;
}

.aduk-jh a {
	color: inherit;
	text-decoration: none;
	border: 0;
	box-shadow: none;
}

.aduk-jh p,
.aduk-jh h1,
.aduk-jh h2,
.aduk-jh h3 {
	margin: 0;
	padding: 0;
	color: inherit;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.aduk-jh h1,
.aduk-jh h2,
.aduk-jh h3 {
	font-family: var(--jh-serif);
	line-height: 1.05;
}

.aduk-jh em {
	font-style: italic;
}

.aduk-jh img {
	display: block;
	max-width: 100%;
	border: 0;
	border-radius: 0;
}

.aduk-jh :focus-visible {
	outline: 2px solid var(--jh-ink);
	outline-offset: 3px;
}

.aduk-jh__shell {
	width: var(--jh-wide);
	margin: 0 auto;
}

.aduk-jh-meta {
	color: var(--jh-soft);
	font-size: 14px;
}

.aduk-jh-excerpt {
	color: var(--jh-soft);
	font-size: 15px;
}

.aduk-jh-link {
	border-bottom: 1px solid currentColor !important;
	padding-bottom: 3px;
	font-size: 16px;
	white-space: nowrap;
}

/* Heading */
.aduk-jh-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding: 40px 0 28px;
}

.aduk-jh-head h1 {
	font-size: clamp(56px, 7vw, 104px);
	line-height: 0.98;
}

.aduk-jh-head p {
	max-width: 360px;
	color: var(--jh-soft);
}

/* Year row */
.aduk-jh-years {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: stretch;
	gap: 24px;
	min-height: var(--jh-years-h);
	border-top: 1px solid var(--jh-ink);
	border-bottom: 1px solid var(--jh-line);
	background: #fff;
	box-shadow: 0 0 0 100vmax #fff;
	clip-path: inset(0 -100vmax);
}

.admin-bar .aduk-jh-years {
	top: 32px;
}

.aduk-jh-years__list {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.aduk-jh-years__list::-webkit-scrollbar {
	display: none;
}

.aduk-jh-years a {
	display: flex;
	flex: 0 0 auto;
	align-items: baseline;
	gap: 8px;
	padding: 12px 36px 10px 0;
	margin-right: 36px;
	border-right: 1px solid var(--jh-line) !important;
}

.aduk-jh-years b {
	font-family: var(--jh-thin);
	font-size: 52px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.05em;
	color: var(--jh-soft);
	transition: color 0.2s ease;
}

.aduk-jh-years span {
	font-size: 13px;
	color: var(--jh-soft);
}

.aduk-jh-years a:hover b,
.aduk-jh-years a.is-current b {
	color: var(--jh-ink);
}

.aduk-jh-years a.aduk-jh-years__books {
	margin: 0;
	padding-right: 0;
	border-right: 0 !important;
}

.aduk-jh-years__books b {
	font-family: var(--jh-serif);
	font-size: 30px;
	letter-spacing: 0;
	color: var(--jh-ink);
}

/* Hero slider */
.aduk-jh-hero {
	position: relative;
	padding: 32px 0 0;
}

.aduk-jh-hero__track {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	scrollbar-width: none;
	margin-right: calc(-1 * (100vw - 100%) / 2);
	padding-right: calc((100vw - 100%) / 2);
	cursor: grab;
}

.aduk-jh-hero__track::-webkit-scrollbar {
	display: none;
}

.aduk-jh-hero__track.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.aduk-jh-hero__track.is-dragging a {
	pointer-events: none;
}

.aduk-jh-slide {
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: 340px;
	scroll-margin-top: calc(var(--jh-years-h) + 16px);
}

.aduk-jh-slide__media {
	display: block;
	height: clamp(300px, 46vh, 420px);
	overflow: hidden;
	border-radius: 18px;
	background: var(--jh-paper);
}

.aduk-jh-slide__media img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.aduk-jh-slide__copy {
	padding-top: 14px;
}

.aduk-jh-slide h2 {
	margin-top: 6px;
	font-size: 26px;
	font-style: italic;
	line-height: 1.08;
}

.aduk-jh-slide--lead {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 40px;
	width: min(860px, 62vw);
}

.aduk-jh-slide--lead .aduk-jh-slide__media {
	width: calc(clamp(300px, 46vh, 420px) * 0.8);
	border-radius: 0;
}

.aduk-jh-slide--lead .aduk-jh-slide__copy {
	padding: 0;
}

.aduk-jh-slide--lead h2 {
	margin: 12px 0 16px;
	font-size: clamp(36px, 3.4vw, 54px);
	font-style: normal;
	line-height: 1;
}

.aduk-jh-slide--lead .aduk-jh-excerpt {
	max-width: 440px;
	margin-bottom: 22px;
	font-size: 17px;
}

.aduk-jh-slide--book {
	width: 420px;
}

.aduk-jh-slide__pages {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	height: clamp(300px, 46vh, 420px);
	padding: 18px;
	background: var(--jh-paper);
}

.aduk-jh-slide__pages span {
	display: block;
	min-height: 0;
	background: #fff;
}

.aduk-jh-slide__pages img {
	width: 100%;
	height: 100% !important;
	object-fit: contain;
}

.aduk-jh-slide--book h2 {
	font-style: normal;
}

.aduk-jh-hero__controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 22px;
	padding-top: 18px;
	font-size: 16px;
}

.aduk-jh-hero__controls button {
	appearance: none;
	margin: 0;
	padding: 0 0 3px;
	border: 0;
	border-bottom: 1px solid currentColor;
	border-radius: 0;
	background: none;
	color: var(--jh-ink);
	font: inherit;
	cursor: pointer;
}

.aduk-jh-hero__controls button:disabled {
	color: var(--jh-soft);
	border-bottom-color: transparent;
	cursor: default;
}

.aduk-jh-hero__count {
	min-width: 52px;
	color: var(--jh-soft);
	font-size: 14px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

/* Sections */
.aduk-jh-sec {
	padding: 64px 0 0;
	scroll-margin-top: calc(var(--jh-years-h) + 8px);
}

.aduk-jh-sec__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 28px;
}

.aduk-jh-sec__head h2 {
	font-size: clamp(38px, 4.2vw, 60px);
}

.aduk-jh-sec__head--small h2 {
	font-size: 34px;
}

.aduk-jh-cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
}

.aduk-jh-card {
	scroll-margin-top: calc(var(--jh-years-h) + 16px);
}

.aduk-jh-card__media {
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	margin-bottom: 14px;
	border-radius: 18px;
	background: var(--jh-paper);
}

.aduk-jh-card__media img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.aduk-jh-card h3 {
	margin: 6px 0 10px;
	font-size: 28px;
	font-style: italic;
	line-height: 1.08;
}

.aduk-jh-card--small .aduk-jh-card__media {
	border-radius: 14px;
	margin-bottom: 12px;
}

.aduk-jh-card--small h3 {
	margin: 0 0 6px;
	font-size: 22px;
	font-style: normal;
}

/* Sketchbook bands */
.aduk-jh-books .aduk-jh-sec__head {
	margin-bottom: 0;
	padding-bottom: 28px;
}

.aduk-jh-band {
	padding: 48px 0 52px;
	background: var(--jh-paper);
	box-shadow: 0 0 0 100vmax var(--jh-paper);
	clip-path: inset(0 -100vmax);
}

.aduk-jh-band + .aduk-jh-band {
	padding-top: 40px;
	border-top: 1px solid var(--jh-line);
}

.aduk-jh-band__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 24px;
	margin-bottom: 28px;
}

.aduk-jh-band__head h3 {
	font-size: 52px;
	line-height: 1;
}

.aduk-jh-band__head p {
	max-width: 620px;
	margin-top: 10px;
	color: var(--jh-soft);
}

.aduk-jh-band__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.aduk-jh-band__side span {
	color: var(--jh-soft);
}

.aduk-jh-rail {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scrollbar-width: none;
	margin-right: calc(-1 * (100vw - 100%) / 2);
	padding-right: calc((100vw - 100%) / 2);
	cursor: grab;
}

.aduk-jh-rail::-webkit-scrollbar {
	display: none;
}

.aduk-jh-rail.is-dragging {
	cursor: grabbing;
	user-select: none;
}

.aduk-jh-rail.is-dragging a {
	pointer-events: none;
}

.aduk-jh-page {
	flex: 0 0 260px;
}

.aduk-jh-page img {
	width: 260px;
	height: 260px !important;
	object-fit: contain;
	background: #fff;
}

.aduk-jh-page span {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	line-height: 1.35;
}

/* All sketchbooks */
.aduk-jh-index__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0 32px;
	border-top: 1px solid var(--jh-ink);
}

.aduk-jh-book {
	display: grid;
	gap: 4px;
	padding: 18px 0 20px;
	border-bottom: 1px solid var(--jh-line) !important;
}

.aduk-jh-book__thumbs {
	display: flex;
	gap: 6px;
	margin-bottom: 8px;
}

.aduk-jh-book__thumbs img {
	width: 64px;
	height: 64px !important;
	object-fit: cover;
	background: var(--jh-paper);
}

.aduk-jh-book b {
	font-family: var(--jh-serif);
	font-size: 26px;
	font-weight: 400;
	line-height: 1.1;
}

.aduk-jh-book:hover b {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

/* Archive by year */
.aduk-jh-year {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 40px;
	margin-top: 64px;
	padding: 28px 0 8px;
	border-top: 1px solid var(--jh-ink);
	scroll-margin-top: calc(var(--jh-years-h) + 8px);
}

.aduk-jh-year__label {
	position: sticky;
	top: calc(var(--jh-years-h) + 24px);
	align-self: start;
	font-family: var(--jh-thin);
	font-size: 112px;
	line-height: 0.8;
	letter-spacing: -0.06em;
}

.aduk-jh-year__label small {
	display: block;
	margin-top: 16px;
	font-family: var(--jh-sans);
	font-size: 14px;
	letter-spacing: 0;
	color: var(--jh-soft);
}

.aduk-jh-year__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 36px 24px;
}

@media (max-width: 1100px) {
	.aduk-jh-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.aduk-jh-year__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.aduk-jh-slide--lead {
		width: min(760px, 80vw);
	}
}

@media (max-width: 700px) {
	.aduk-jh {
		--jh-wide: calc(100% - 40px);
		--jh-years-h: 58px;
		padding-bottom: 56px;
	}

	.aduk-jh-head {
		display: block;
		padding: 28px 0 22px;
	}

	.aduk-jh-head p {
		margin-top: 12px;
	}

	.admin-bar .aduk-jh-years {
		top: 0;
	}

	.aduk-jh-years {
		gap: 14px;
	}

	.aduk-jh-years a {
		padding: 10px 16px 8px 0;
		margin-right: 16px;
	}

	.aduk-jh-years b {
		font-size: 34px;
	}

	.aduk-jh-years__books b {
		font-size: 22px;
	}

	.aduk-jh-hero {
		padding-top: 22px;
	}

	.aduk-jh-hero__track {
		gap: 16px;
	}

	.aduk-jh-slide,
	.aduk-jh-slide--book {
		width: 72vw;
	}

	.aduk-jh-slide--lead {
		display: block;
		width: 84vw;
	}

	.aduk-jh-slide__media,
	.aduk-jh-slide__pages,
	.aduk-jh-slide--lead .aduk-jh-slide__media {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 5;
	}

	.aduk-jh-slide--lead .aduk-jh-slide__copy {
		padding-top: 14px;
	}

	.aduk-jh-slide--lead h2 {
		font-size: 32px;
	}

	.aduk-jh-slide--lead .aduk-jh-excerpt {
		font-size: 15px;
	}

	.aduk-jh-slide h2 {
		font-size: 22px;
	}

	.aduk-jh-slide__pages {
		gap: 8px;
		padding: 12px;
	}

	.aduk-jh-hero__controls {
		justify-content: flex-start;
	}

	.aduk-jh-sec {
		padding-top: 44px;
	}

	.aduk-jh-cards {
		gap: 24px 14px;
	}

	.aduk-jh-card h3 {
		font-size: 20px;
	}

	.aduk-jh-cards .aduk-jh-excerpt {
		display: none;
	}

	.aduk-jh-card__media {
		border-radius: 12px;
	}

	.aduk-jh-band {
		padding: 34px 0 38px;
	}

	.aduk-jh-band__head {
		grid-template-columns: 1fr;
	}

	.aduk-jh-band__head h3 {
		font-size: 36px;
	}

	.aduk-jh-band__side {
		align-items: flex-start;
	}

	.aduk-jh-page {
		flex-basis: 190px;
	}

	.aduk-jh-page img {
		width: 190px;
		height: 190px !important;
	}

	.aduk-jh-year {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-top: 40px;
	}

	.aduk-jh-year__label {
		position: static;
		font-size: 72px;
	}

	.aduk-jh-year__label small {
		margin-top: 8px;
	}

	.aduk-jh-year__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 22px 14px;
	}

	.aduk-jh-card--small h3 {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aduk-jh-years b {
		transition: none;
	}
}
