/* =========================================================================
   Imprint Catalog Links
   ====================================================================== */

.icl-wrap {
	--icl-accent: #4f46e5;
	--icl-accent-2: var(--icl-accent);
	--icl-tint: rgba(79, 70, 229, .1);
	--icl-bg: #ffffff;
	--icl-text: #111111;
	--icl-muted: #6b7280;
	--icl-line: rgba(15, 23, 42, .08);
	--icl-soft: #f1f3f5;
	--icl-divider: #b5b5b5;
	--icl-cols: 3;
	--icl-radius: 20px;
	--icl-ease: cubic-bezier(.2, .8, .2, 1);
	--icl-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -18px rgba(15, 23, 42, .25);
	--icl-shadow-hover: 0 2px 4px rgba(15, 23, 42, .04), 0 28px 56px -20px rgba(15, 23, 42, .35);
	--icl-grad: linear-gradient(135deg, var(--icl-accent), var(--icl-accent-2));

	margin: 2em 0;
	color: var(--icl-text);
}

/* Catalog layout defaults: Imprint orange, 5 covers per row */
.icl-wrap-catalog {
	--icl-accent: #f26522;
	--icl-cols: 5;
	--icl-gap-x: 28px;
}

@supports (color: color-mix(in srgb, red, blue)) {
	.icl-wrap {
		--icl-accent-2: color-mix(in oklab, var(--icl-accent) 55%, #ffb347);
		--icl-tint: color-mix(in srgb, var(--icl-accent) 12%, transparent);
	}
}

.icl-dark {
	--icl-bg: #111827;
	--icl-text: #f8fafc;
	--icl-muted: #94a3b8;
	--icl-line: rgba(255, 255, 255, .08);
	--icl-soft: #1f2937;
	--icl-divider: rgba(255, 255, 255, .25);
	--icl-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .8);
	--icl-shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 28px 56px -20px rgba(0, 0, 0, .9);
}

/* ---------- Page title + sections ---------- */

.icl-wrap .icl-main-title {
	margin: 0 0 30px;
	color: var(--icl-text);
	font-family: inherit;
	font-size: clamp(32px, 5vw, 52px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: .04em;
	text-align: center;
	text-transform: uppercase;
}

.icl-wrap .icl-section {
	position: relative;
	padding: 28px 0 34px;
}

.icl-wrap .icl-section:first-of-type {
	padding-top: 0;
}

.icl-wrap-catalog .icl-section {
	padding-right: 16px;
	padding-left: 16px;
}

/* divider line between sections (draws in from the left) */
.icl-wrap .icl-section + .icl-section::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 2px;
	background: var(--icl-divider);
	transform-origin: left center;
	transition: transform 1.2s var(--icl-ease);
}

.icl-wrap .icl-section-title {
	margin: 0 0 24px;
	padding: 0;
	color: var(--icl-text);
	font-family: inherit;
	font-size: clamp(20px, 2.4vw, 26px);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: .03em;
	text-transform: uppercase;
	transition: opacity .8s ease, translate .8s var(--icl-ease);
}

/* ---------- Shared item parts ---------- */

.icl-items {
	display: grid;
	gap: 14px;
}

.icl-items .icl-item {
	--icl-d: calc(min(var(--i, 0), 10) * 70ms);
	position: relative;
	transition:
		opacity .7s ease var(--icl-d),
		translate .7s var(--icl-ease) var(--icl-d),
		transform .45s var(--icl-ease),
		box-shadow .45s var(--icl-ease),
		border-color .45s ease;
}

.icl-items .icl-open {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	outline: none;
}

.icl-items .icl-open:focus-visible {
	outline: 3px solid var(--icl-accent);
	outline-offset: 4px;
	border-radius: 6px;
}

.icl-items .icl-num {
	flex: 0 0 auto;
	min-width: 2ch;
	color: var(--icl-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
	font-variant-numeric: tabular-nums;
	transition: color .3s ease;
}

.icl-items .icl-body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.icl-items .icl-badge {
	align-self: flex-start;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--icl-tint);
	color: var(--icl-accent);
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .1em;
}

.icl-items .icl-title {
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.icl-items .icl-sub {
	color: var(--icl-muted);
	font-size: .88em;
	line-height: 1.4;
}

/* ---------- Copy button ---------- */

.icl-items .icl-copy {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 40px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--icl-line);
	border-radius: 999px;
	background: var(--icl-bg);
	color: var(--icl-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: color .25s ease, border-color .25s ease, background .25s ease, transform .2s ease;
}

.icl-items .icl-copy:hover {
	border-color: var(--icl-accent);
	background: var(--icl-tint);
	color: var(--icl-accent);
}

.icl-items .icl-copy:focus-visible {
	outline: 3px solid var(--icl-accent);
	outline-offset: 2px;
}

.icl-items .icl-copy svg {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

.icl-items .icl-copy .icl-ico-check {
	display: none;
}

.icl-items .icl-copy.is-copied {
	border-color: transparent;
	background: var(--icl-grad);
	color: #fff;
}

.icl-items .icl-copy.is-copied .icl-ico-copy {
	display: none;
}

.icl-items .icl-copy.is-copied .icl-ico-check {
	display: block;
	animation: icl-pop .45s var(--icl-ease);
}

@keyframes icl-pop {
	0% { transform: scale(0) rotate(-30deg); }
	60% { transform: scale(1.3) rotate(0); }
	100% { transform: scale(1); }
}

/* =========================================================================
   Catalog layout (default): framed covers in sections
   ====================================================================== */

.icl-catalog {
	grid-template-columns: repeat(auto-fill, minmax(max(128px, calc((100% - (var(--icl-cols) - 1) * var(--icl-gap-x)) / var(--icl-cols))), 1fr));
	gap: 36px var(--icl-gap-x);
	align-items: start;
}

.icl-catalog .icl-item {
	display: block;
}

.icl-catalog .icl-open {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	text-align: center;
}

/* the white frame around the cover, like a printed catalog */
.icl-catalog .icl-cover {
	position: relative;
	display: block;
	width: 100%;
	padding: 5px;
	background: #fff;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .04),
		0 2px 4px rgba(0, 0, 0, .06),
		0 10px 22px -12px rgba(0, 0, 0, .3);
	transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
	transition: transform .6s var(--icl-ease), box-shadow .6s var(--icl-ease);
}

.icl-catalog .icl-cover-in {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--icl-soft);
}

.icl-catalog .icl-cover-in img {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	margin: 0;
	transition: transform 1.2s var(--icl-ease);
}

/* soft light that sweeps across the cover on hover */
.icl-catalog .icl-cover-in::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%);
	transform: translateX(-120%);
	transition: transform 1s var(--icl-ease);
	pointer-events: none;
}

.icl-catalog .icl-cover-empty {
	display: grid;
	place-items: center;
	aspect-ratio: 3 / 4;
	background: var(--icl-grad);
	color: #fff;
	font-size: 56px;
	font-weight: 300;
	text-transform: uppercase;
}

.icl-catalog .icl-item:hover .icl-cover {
	--lift: -8px;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .03),
		0 6px 10px -4px rgba(0, 0, 0, .12),
		0 30px 42px -18px rgba(0, 0, 0, .45);
}

.icl-catalog .icl-item:hover .icl-cover-in img {
	transform: scale(1.04);
}

.icl-catalog .icl-item:hover .icl-cover-in::after {
	transform: translateX(120%);
}

.icl-catalog .icl-body {
	align-items: center;
	gap: 3px;
}

.icl-catalog .icl-badge {
	align-self: center;
}

.icl-catalog .icl-title {
	position: relative;
	padding-bottom: 5px;
	color: var(--icl-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: .05em;
	text-transform: uppercase;
	transition: color .3s ease;
}

/* small orange line that grows under the name */
.icl-catalog .icl-title::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 26px;
	height: 2px;
	margin-left: -13px;
	border-radius: 2px;
	background: var(--icl-accent);
	transform: scaleX(0);
	transition: transform .45s var(--icl-ease);
}

.icl-catalog .icl-item:hover .icl-title {
	color: var(--icl-accent);
}

.icl-catalog .icl-item:hover .icl-title::after {
	transform: scaleX(1);
}

.icl-catalog .icl-sub {
	font-size: 12px;
	letter-spacing: .02em;
}

/* round copy button on the corner of the cover; opens into a pill with text */
.icl-catalog .icl-copy {
	position: absolute;
	z-index: 3;
	top: 13px;
	right: 13px;
	height: 32px;
	padding: 0 8px;
	gap: 0;
	border: 0;
	background: rgba(255, 255, 255, .95);
	color: #1f2937;
	font-size: 12px;
	box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
	opacity: 0;
	transform: translateY(-4px) scale(.85);
	transition: opacity .3s ease, transform .5s var(--icl-ease), background .25s ease, color .25s ease;
}

.icl-catalog .icl-copy-label {
	max-width: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-width .45s var(--icl-ease), opacity .25s ease, margin .45s var(--icl-ease);
}

.icl-catalog .icl-item:hover .icl-copy,
.icl-catalog .icl-item:focus-within .icl-copy {
	opacity: 1;
	transform: translateY(-8px);
}

.icl-catalog .icl-copy:hover,
.icl-catalog .icl-copy:focus-visible {
	background: #fff;
	color: var(--icl-accent);
}

.icl-catalog .icl-copy:hover .icl-copy-label,
.icl-catalog .icl-copy:focus-visible .icl-copy-label {
	max-width: 140px;
	margin-left: 6px;
	opacity: 1;
}

.icl-catalog .icl-copy.is-copied {
	background: var(--icl-accent);
	color: #fff;
	opacity: 1;
}

/* phones and tablets: no hover, so the copy button is always visible */
@media (hover: none) {
	.icl-catalog .icl-copy {
		opacity: 1;
		transform: none;
	}
}

/* =========================================================================
   List + grid layouts (cards)
   ====================================================================== */

.icl-list {
	grid-template-columns: minmax(0, 1fr);
}

.icl-list .icl-item,
.icl-grid .icl-item {
	isolation: isolate;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px 12px 12px;
	background: var(--icl-bg);
	border: 1px solid var(--icl-line);
	border-radius: var(--icl-radius);
	box-shadow: var(--icl-shadow);
}

.icl-list .icl-item:hover,
.icl-grid .icl-item:hover {
	box-shadow: var(--icl-shadow-hover);
	border-color: transparent;
}

.icl-list .icl-open,
.icl-grid .icl-open {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
	min-width: 0;
}

.icl-list .icl-body,
.icl-grid .icl-body {
	flex: 1;
}

.icl-list .icl-item:hover .icl-num,
.icl-grid .icl-item:hover .icl-num {
	color: var(--icl-accent);
}

.icl-items .icl-thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 14px;
	background: var(--icl-soft);
}

.icl-items .icl-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform .8s var(--icl-ease);
}

.icl-items .icl-item:hover .icl-thumb img {
	transform: scale(1.07);
}

.icl-items .icl-thumb-empty {
	display: grid;
	place-items: center;
	background: var(--icl-grad);
	color: #fff;
	font-size: 28px;
	font-weight: 800;
	text-transform: uppercase;
}

.icl-items .icl-arrow {
	flex: 0 0 40px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--icl-soft);
	color: var(--icl-text);
	transition: background .35s ease, color .35s ease, transform .45s var(--icl-ease);
}

.icl-items .icl-arrow svg {
	width: 18px;
	height: 18px;
}

.icl-items .icl-item:hover .icl-arrow {
	background: var(--icl-grad);
	color: #fff;
	transform: rotate(-45deg);
}

/* list */
.icl-list .icl-item::before {
	content: "";
	position: absolute;
	top: 14px;
	bottom: 14px;
	left: -1px;
	width: 4px;
	border-radius: 0 4px 4px 0;
	background: var(--icl-grad);
	transform: scaleY(0);
	transition: transform .45s var(--icl-ease);
}

.icl-list .icl-item:hover {
	transform: translateY(-3px);
}

.icl-list .icl-item:hover::before {
	transform: scaleY(1);
}

.icl-list .icl-num {
	padding-left: 6px;
}

.icl-list .icl-thumb {
	flex: 0 0 76px;
	width: 76px;
	height: 76px;
}

.icl-list .icl-title {
	font-size: 1.05em;
}

/* grid */
.icl-grid {
	grid-template-columns: repeat(var(--icl-cols, 3), minmax(0, 1fr));
	gap: 22px;
	perspective: 1200px;
}

.icl-grid .icl-item {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	padding: 10px;
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transform-style: preserve-3d;
}

.icl-grid .icl-item:hover {
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
}

.icl-grid .icl-open {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.icl-grid .icl-thumb {
	aspect-ratio: 3 / 4;
	border-radius: calc(var(--icl-radius) - 8px);
}

.icl-grid .icl-thumb-empty {
	font-size: 64px;
}

.icl-grid .icl-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .45), transparent 45%),
		linear-gradient(to top, rgba(0, 0, 0, .35), transparent 40%);
	opacity: 0;
	transition: opacity .4s ease;
	pointer-events: none;
}

.icl-grid .icl-item:hover .icl-thumb::after {
	opacity: 1;
}

.icl-grid .icl-arrow {
	position: absolute;
	z-index: 2;
	right: 14px;
	bottom: 14px;
	width: 48px;
	height: 48px;
	background: var(--icl-grad);
	color: #fff;
	box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
	opacity: 0;
	transform: translateY(12px) scale(.8);
}

.icl-grid .icl-item:hover .icl-arrow {
	opacity: 1;
	transform: translateY(0) scale(1) rotate(-45deg);
}

.icl-grid .icl-num {
	position: absolute;
	z-index: 3;
	top: 22px;
	left: 22px;
	padding: 6px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .82);
	color: #0f172a;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .25);
}

.icl-grid .icl-item:hover .icl-num {
	color: #0f172a;
}

.icl-grid .icl-badge {
	position: absolute;
	z-index: 3;
	top: 22px;
	right: 22px;
	padding: 6px 9px;
	background: var(--icl-grad);
	color: #fff;
	box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .3);
}

.icl-grid .icl-body {
	padding: 14px 8px 6px;
}

.icl-grid .icl-copy {
	margin: 4px 6px 6px;
}

/* ---------- Reveal on scroll (classes added by JS) ---------- */

.icl-anim .icl-item {
	opacity: 0;
	translate: 0 24px;
}

.icl-anim .icl-item.is-in {
	opacity: 1;
	translate: 0 0;
}

.icl-anim .icl-section-title {
	opacity: 0;
	translate: -14px 0;
}

.icl-anim .icl-section.is-in .icl-section-title {
	opacity: 1;
	translate: 0 0;
}

.icl-anim .icl-section + .icl-section::before {
	transform: scaleX(0);
}

.icl-anim .icl-section.is-in + .icl-section::before,
.icl-anim .icl-section + .icl-section.is-in::before {
	transform: scaleX(1);
}

/* ---------- "Link copied" toast ---------- */

.icl-toast {
	position: fixed;
	z-index: 999999;
	left: 50%;
	bottom: 24px;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100vw - 32px);
	padding: 10px 20px 10px 10px;
	border-radius: 999px;
	background: rgba(17, 17, 17, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.25;
	box-shadow: 0 24px 48px -12px rgba(0, 0, 0, .45);
	opacity: 0;
	transform: translate(-50%, 150%);
	transition: transform .5s cubic-bezier(.2, 1.2, .3, 1), opacity .3s ease;
	pointer-events: none;
}

.icl-toast.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.icl-toast-ico {
	flex: 0 0 32px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--icl-accent, #f26522);
}

.icl-toast-ico svg {
	width: 16px;
	height: 16px;
}

.icl-toast-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.icl-toast-url {
	overflow: hidden;
	opacity: .7;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.icl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 560px) {
	.icl-wrap-catalog {
		--icl-gap-x: 16px;
	}

	.icl-wrap-catalog .icl-section {
		padding-right: 2px;
		padding-left: 2px;
	}

	.icl-catalog {
		row-gap: 28px;
	}

	.icl-catalog .icl-title {
		font-size: 12.5px;
	}

	.icl-list .icl-item {
		gap: 8px;
		padding: 10px;
	}

	.icl-list .icl-open {
		gap: 12px;
	}

	.icl-list .icl-num,
	.icl-list .icl-arrow {
		display: none;
	}

	.icl-list .icl-thumb {
		flex-basis: 64px;
		width: 64px;
		height: 64px;
	}

	.icl-list .icl-copy {
		width: 44px;
		height: 44px;
		padding: 0;
	}

	.icl-list .icl-copy-label {
		display: none;
	}

	.icl-grid .icl-item {
		padding: 8px;
	}

	.icl-grid .icl-num,
	.icl-grid .icl-badge {
		top: 16px;
	}

	.icl-grid .icl-num {
		left: 16px;
	}

	.icl-grid .icl-badge {
		right: 16px;
	}

	.icl-grid .icl-body {
		padding: 10px 4px 4px;
	}

	.icl-grid .icl-copy {
		margin: 4px 0 0;
		padding: 0 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.icl-wrap *,
	.icl-wrap *::before,
	.icl-wrap *::after,
	.icl-toast {
		transition: none !important;
		animation: none !important;
	}

	.icl-anim .icl-item,
	.icl-anim .icl-section-title {
		opacity: 1;
		translate: none;
	}

	.icl-anim .icl-section + .icl-section::before {
		transform: none;
	}
}
