/* ==========================================================================
   Celia Noire — Selected Work
   One full-bleed feature, then an asymmetric grid of further pieces.
   ========================================================================== */

.cn-work {
	--cn-focal-d: center center;
}

.cn-work__feature {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin-top: clamp(2.5rem, 6vw, 4rem);
	overflow: hidden;
	background: rgba(0, 0, 0, 0.2);
}

.cn-work__feature-image,
.cn-work__feature-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--cn-focal-d);
}

.cn-work__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(2rem, 4vw, 4rem) clamp(1.75rem, 3vw, 3rem);
	margin-top: clamp(3.5rem, 7vw, 6rem);
}

.cn-work__card-link {
	display: block;
}

/* Every card uses the same 4:5 ratio — a consistent thumbnail shape keeps
   titles and meta lined up row by row instead of drifting with whatever
   ratio a given position happened to be assigned. */
.cn-work__card-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
}

/* A single visible project doesn't get the tall 4-card-rhythm portrait slot
   (that ratio is tuned for a 2x2 grid, not one card with an empty seat next
   to it) — it gets a contained, wide editorial card of its own, centred with
   generous negative space rather than stretched edge to edge. */
.cn-work__grid--single {
	grid-template-columns: 1fr;
	justify-items: center;
}

.cn-work__grid--single .cn-work__card {
	width: min(100%, 44rem);
}

.cn-work__grid--single .cn-work__card .cn-work__card-media {
	aspect-ratio: 16 / 9;
}

.cn-work__card-image,
.cn-work__card-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--cn-focal-d);
	transition: transform var(--cn-dur-zoom) var(--cn-ease);
}

.cn-work__card-link:hover .cn-work__card-image,
.cn-work__card-link:focus-visible .cn-work__card-image {
	transform: scale(1.045);
}

.cn-work__card-title {
	display: block;
	margin-top: 1.25rem;
	font-family: var(--cn-font-display);
	font-size: var(--cn-text-h3);
	color: var(--cn-fg-strong);
	transition: color var(--cn-dur-hover) var(--cn-ease);
}

.cn-work__card-link:hover .cn-work__card-title,
.cn-work__card-link:focus-visible .cn-work__card-title {
	color: var(--cn-accent);
}

.cn-work__card-meta {
	display: block;
	margin-top: 0.35rem;
	font-size: var(--cn-text-xs);
	letter-spacing: var(--cn-tracking-wide);
	text-transform: uppercase;
	color: var(--cn-fg);
}

@media (max-width: 767px) {
	.cn-work__grid {
		grid-template-columns: 1fr;
		gap: clamp(2.5rem, 8vw, 3.5rem);
	}

	.cn-work__feature {
		aspect-ratio: 3 / 4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cn-work__card-image,
	.cn-work__card-title {
		transition: none;
	}
}
