/* Jason Yurkovic -- site stylesheet
 *
 * Translated from the Claude Design handoff ("Jason Yurkovic.dc.html"). One
 * layout, two behaviours: below 700px the masonry drops to ~150px columns,
 * the piece page stacks image over details, About stacks, and the header
 * splits into a brand row plus a scrolling row of category pills.
 */

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: #111;
	font-family: Helvetica, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a {
	color: #111;
	text-decoration: none;
}

a:hover {
	color: #777;
}

img {
	max-width: 100%;
}

h1 {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.site {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1 0 auto;
}

/* ----- Header ----- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 2;
	background: #fff;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	flex-wrap: wrap;
	padding: 22px 24px 18px;
}

.brand {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-right: auto;
}

.cats-wrap {
	display: contents;
}

.cats {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
}

.cats a {
	padding-bottom: 2px;
	border-bottom: 1px solid transparent;
	color: #555;
}

.cats a:hover {
	color: #777;
}

.cats a.is-active {
	border-bottom-color: #111;
	color: #111;
}

.pages {
	display: flex;
	gap: 22px;
	margin-left: 12px;
}

.pages a {
	color: #777;
}

.pages a.is-active {
	color: #111;
}

/* ----- Grid ----- */

.grid {
	column-width: 220px;
	column-gap: 6px;
	padding: 0 6px 6px;
}

.card {
	display: block;
	position: relative;
	margin-bottom: 6px;
	break-inside: avoid;
	background: #f2f2f2;
}

.card img {
	width: 100%;
	height: auto;
	display: block;
}

.card-info {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 12px;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	background: linear-gradient(transparent 55%, rgba(0, 0, 0, .55));
	opacity: 0;
	transition: opacity .15s;
}

.card:hover .card-info,
.card:focus-visible .card-info {
	opacity: 1;
}

.card-title {
	font-weight: 700;
}

.card-sub {
	opacity: .85;
}

.empty {
	padding: 16px 24px 64px;
	color: #888;
}

/* ----- Piece ----- */

.piece {
	padding: 8px 24px 48px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
	gap: 24px 32px;
	align-items: start;
}

.piece-image {
	width: 100%;
	height: auto;
	max-height: calc(100vh - 110px);
	object-fit: contain;
	object-position: top left;
	display: block;
	/* Sideways drags are the swipe to previous/next (piece.php), not a pan. */
	touch-action: pan-y pinch-zoom;
}

.piece-side {
	font-size: 13px;
	line-height: 1.5;
	position: sticky;
	top: 72px;
	max-width: 560px;
	text-wrap: pretty;
}

.piece-back {
	font-size: 12px;
	color: #888;
	display: block;
	margin-bottom: 14px;
	padding: 6px 0;
}

.piece-title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.piece-meta {
	color: #666;
	margin: 4px 0 18px;
}

.piece-story {
	margin: 0 0 18px;
	text-wrap: pretty;
}

.row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid #e6e6e6;
}

.row .label {
	color: #666;
}

.piece-rows .row {
	padding-top: 12px;
}

.piece-rows .row + .row {
	margin-top: 12px;
}

.piece-rows .inquire {
	text-decoration: underline;
}

.piece-rows .row.nav,
.piece-rows .row.nav a {
	color: #888;
}

.piece-rows .row.nav a {
	padding: 8px 0;
}

.piece-rows .row.nav a:hover {
	color: #111;
}

/* ----- About ----- */

.about {
	padding: 16px 24px 64px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 28px 40px;
	max-width: 1100px;
}

.about img {
	width: 100%;
	max-width: 320px;
	height: auto;
	display: block;
}

.prose {
	font-size: 16px;
	line-height: 1.55;
	text-wrap: pretty;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.prose p {
	margin: 0;
}

.headline {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.note {
	color: #888;
	font-size: 13px;
}

.links {
	display: flex;
	gap: 22px;
	font-size: 13px;
	margin-top: 8px;
}

.links a {
	text-decoration: underline;
}

/* ----- Contact (and the 404 page) ----- */

.contact {
	padding: 16px 24px 64px;
	max-width: 640px;
	font-size: 16px;
	line-height: 1.55;
	display: flex;
	flex-direction: column;
	gap: 22px;
	text-wrap: pretty;
}

.contact p {
	margin: 0;
}

.contact p a {
	text-decoration: underline;
}

.contact-rows {
	display: flex;
	flex-direction: column;
	font-size: 13px;
}

.contact-rows .row {
	padding: 12px 0;
}

.contact-rows .row:last-child {
	border-bottom: 1px solid #e6e6e6;
}

.contact-rows a {
	text-decoration: underline;
}

/* ----- Footer ----- */

.site-footer {
	margin-top: auto;
	padding: 28px 24px;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	font-size: 11px;
	color: #999;
	border-top: 1px solid #eee;
}

/* ----- Narrow screens ----- */

@media (max-width: 699px) {
	.site-header {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"brand pages"
			"cats cats";
		align-items: center;
		gap: 0;
		padding: env(safe-area-inset-top) 0 0;
	}

	.brand {
		grid-area: brand;
		font-size: 17px;
		margin: 0;
		padding: 22px 12px 14px 20px;
	}

	.pages {
		grid-area: pages;
		gap: 18px;
		margin: 0;
		padding: 24px 20px 16px 0;
	}

	.cats-wrap {
		grid-area: cats;
		display: block;
		position: relative;
	}

	.cats-wrap::after {
		content: "";
		position: absolute;
		right: 0;
		top: 0;
		bottom: 0;
		width: 36px;
		background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
		pointer-events: none;
	}

	.cats {
		gap: 6px;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding: 6px 20px 12px;
	}

	.cats::-webkit-scrollbar {
		display: none;
	}

	.cats::after {
		content: "";
		flex: none;
		width: 8px;
	}

	.cats a {
		flex: none;
		font-size: 13px;
		line-height: 20px;
		padding: 8px 14px;
		border-radius: 999px;
		border: 1px solid #ddd;
		background: #fff;
		color: #333;
		white-space: nowrap;
	}

	.cats a.is-active {
		border-color: #111;
		background: #111;
		color: #fff;
	}

	.grid {
		column-width: 150px;
		padding: 4px 6px 6px;
	}

	.piece {
		padding: 8px 20px 48px;
		grid-template-columns: minmax(0, 1fr);
	}

	.piece-image {
		max-height: none;
	}

	.piece-side {
		position: static;
		font-size: 15px;
	}

	.piece-title {
		font-size: 22px;
	}

	.about {
		padding: 16px 20px 64px;
		grid-template-columns: minmax(0, 1fr);
	}

	.contact,
	.empty {
		padding: 16px 20px 64px;
	}
}
