/* Peek Footer — tiles that peek up from the bottom edge and rise on hover. */

.peek-footer {
	--pf-gap: 24px;
	--pf-ease: cubic-bezier(.2, .75, .2, 1);
	--pf-speed: .45s;
	position: relative;
	height: var(--pf-h);
	overflow: hidden;
	box-sizing: border-box;
	font-family: inherit;
}

.peek-footer *,
.peek-footer *::before,
.peek-footer *::after { box-sizing: border-box; }

/* Fixed to the viewport, like etterstudio.com */
.peek-footer--fixed {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900;
	overflow: visible;
	pointer-events: none;   /* clicks pass through the empty space between tiles */
}

/* Inline: sits at the end of the page and clips the tiles at its bottom edge */
.peek-footer--inline {
	margin-top: 4rem;
	width: 100%;
}

.peek-footer__list {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: var(--pf-gap);
	height: 100%;
	margin: 0;
	padding: 0 var(--pf-side);
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.peek-footer__list::-webkit-scrollbar { display: none; }

.peek-footer__item {
	flex: 0 0 var(--pf-w);
	height: 100%;
	margin: 0;
	padding: 0;
}

.peek-footer__tile {
	position: relative;
	display: block;
	width: 100%;
	height: var(--pf-h);
	overflow: hidden;
	background: var(--pf-tile-bg, var(--pf-bg));
	color: var(--pf-title);
	text-decoration: none;
	pointer-events: auto;
	transform: translateY(calc(var(--pf-h) - var(--pf-peek)));
	transition: transform var(--pf-speed) var(--pf-ease);
	will-change: transform;
}

.peek-footer__tile:hover,
.peek-footer__tile:focus-visible,
.peek-footer__tile.is-raised {
	transform: translateY(0);
}

.peek-footer__tile:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

.peek-footer__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
	margin: 0;
}

.peek-footer__title {
	position: relative;
	z-index: 1;
	display: block;
	padding: 10px 10px 0;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--pf-title);
}

/* Vertical copyright line at the left edge */
.peek-footer__copy {
	position: absolute;
	left: max(8px, calc(var(--pf-side) / 2 - .6em));
	bottom: 38px;
	z-index: 1;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 11px;
	line-height: 1;
	letter-spacing: .02em;
	white-space: nowrap;
	color: #9a9a9a;
	text-decoration: none;
	pointer-events: auto;
}
a.peek-footer__copy:hover { color: #111; }

/* Phones: the first N tiles (default 4) shrink to share the screen width,
   keep their shape, and peek/rise exactly like on desktop. */
@media (max-width: 600px) {
	.peek-footer {
		--pf-gap: 10px;
		height: auto;
	}
	.peek-footer__list {
		justify-content: flex-start;
		height: auto;
		padding: 0 16px;
		overflow: hidden;
	}
	.peek-footer__item {
		flex: 0 0 calc((100% - (var(--pf-m-count) - 1) * var(--pf-gap)) / var(--pf-m-count));
		height: auto;
		min-width: 0;
	}
	.peek-footer__item--desktop { display: none; }
	.peek-footer__tile {
		height: auto;
		aspect-ratio: 1 / var(--pf-ratio);
		transform: translateY(calc((1 - var(--pf-peek-ratio)) * 100%));
	}
	.peek-footer__title {
		padding: 6px 6px 0;
		font-size: clamp(11px, 3.4vw, 15px);
		line-height: 1.15;
		overflow-wrap: anywhere;
	}
	.peek-footer__copy { display: none; }
	.peek-footer--hide-mobile { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.peek-footer__tile { transition: none; }
}

@media print {
	.peek-footer--fixed { display: none; }
}
