/*
 * artworks
 */

ul.grid {
	gap: 1em;
}
.grid .artwork:hover {
	z-index: 100;
}

.grid .artwork figure {
	/* background: rgba(246, 246, 246, .04); */
	border-radius: 1em;
	/* border: 1px solid rgba(195, 195, 195, .15); */
	/* overflow: visible; */
}
.grid .artwork:hover figure {
	overflow: visible;
}
.grid .artwork figure::before {
	content: "";
	width: 1px;
	margin-left: -1px;
	float: left;
	height: 0;
	padding-top: 100%;  /* Aspect Ratio */
}

.grid .artwork figure > div {
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-content: center;
	padding: 2em;
	background: rgba(from oklch(from currentcolor .65 calc(c * .75) h) r g b / .04);
	/* background: radial-gradient(at center, rgba(from currentcolor r g b / .25) 0%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0) 100%); */
}
.grid .artwork figure img {
	position: static;
	object-fit: contain;
	font-family: 'object-fit: contain;';

	width: auto;
	height: auto;

	transition: transform .5s ease, padding .5s ease;
	transition-delay: 0s;

	/* box-shadow: rgba(from currentcolor r g b / .65) 0 4px 22px; */
	box-shadow: rgba(from oklch(from currentcolor .65 calc(c * .75) h) r g b / .5) 0 4px 22px;
}
.grid > li.artwork:hover figure img {
	transform: scale(1.2);
	transition: transform .25s ease;
}

.grid .artwork figcaption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1;

	text-align: center;
	color: var(--color-text-strong);
	text-transform: uppercase;
	line-height: 1;
}

.grid .artwork cite {
	display: block;
	margin-top: .5em;
	word-wrap: break-word;
}

#wrapper .grid .artwork cite h1 {
	display: block;
	font-size: 1em;
	/* color: inherit; */
	color: oklch(from currentcolor .45 calc(c * 1.5) h);
}

li.artwork h1 {
	font-weight: bold;
}
li.artwork[data-copy-count]::before {
	content: attr(data-copy-count) ' ex.';
	position: absolute;
	top: .5ch;
	right: 0;
	left: 0;
	z-index: 99;
	color: var(--color-text-soft);
	font-weight: bold;
	mix-blend-mode: plus-darker;
	opacity: .75;
	transition: opacity .75s, top .25s;
	transition-delay: .1s;
}
li.artwork[data-copy-count="1"]::before {
	opacity: 0;
}
li.artwork[data-copy-count]:hover::before {
	opacity: 1;
	transition: opacity .25s, top .25s;
	transition-delay: 0s;
	top: -1ch;
}

li.artwork figcaption {
	position: absolute;
	bottom: 0em;
	right: 0;
	left: 0;
	text-align: center;
	transition: bottom .25s;
	transition-delay: .05s;
}
li.artwork:hover figcaption {
	bottom: -.75ch;
	transition: bottom .25s;
	transition-delay: .05s;
}

figure.thumbnail-hover {
	float: right;
}

i.state span {
	display: inline-block;
	opacity: 0;
	overflow: hidden;
	white-space: nowrap;
	font-style: normal;
	text-transform: none;
	max-width: 0;
	transition: max-width .25s ease-in-out, opacity 5s, margin .5s ease-in-out;
	margin-right: 0;
	margin-left: 0;
	line-height: 1;
}
li.artwork:hover i.state span {
	transition: max-width .5s ease-in-out, opacity .25s, margin .25s ease-in-out;
	opacity: 1;
	max-width: 100%;
	margin-right: .5ch;
	margin-left: 1.25ch;
}
table i.state {
	display: flex;
	gap: 1ch;
}
table i.state::after {
	top: 0;
}
table i.state span {
	opacity: 1;
	max-width: none;
}

tr.copies-group td:last-child {
	border-right: 2px solid var(--color-text-soft);
}

tr.copies-group.group-start td:last-child {
	border-top-right-radius: 1em;
}
tr.copies-group.group-end td:last-child {
	border-bottom-right-radius: 1em;
}

#main ul.commas li a {
	color: oklch(from currentcolor calc(l * .25) calc(c * .5) h);
}

@media (prefers-color-scheme: dark) {
	li.artwork[data-copy-count]::before {
		mix-blend-mode: plus-lighter;
	}

	li.artwork:hover i.state span {
		color: var(--color-text-soft);
	}

	#wrapper .grid .artwork cite h1 {
		color: oklch(from currentcolor .75 calc(c * .75) h);
	}

	#main ul.commas li a {
		color: oklch(from currentcolor calc(l * .75) calc(c * .25) h);
	}
}


@media (max-width: 1364px) {
	.hideable {
		display: none!important;
	}
}
