/**
 * Our Projects — frontend styles.
 * Everything is scoped to .op-projects / .op-lightbox. Fonts are inherited
 * from the theme; override the custom properties below to re-skin.
 */

.op-projects,
.op-lightbox {
	--op-accent: #7aaa55;
	--op-accent-contrast: #ffffff;
	--op-bg: #0d0d0d;
	--op-text: #ffffff;
	--op-muted: #b9b9b9;
	--op-border: rgba(255, 255, 255, 0.24);
	--op-radius: 6px;
	--op-gap: 24px;
	--op-grid-max: 1400px;
	--op-grid-ratio: 1 / 1;
	--op-single-max: 1240px;
	--op-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.op-projects,
.op-projects *,
.op-projects *::before,
.op-projects *::after,
.op-lightbox,
.op-lightbox * {
	box-sizing: border-box;
}

.op-projects [hidden],
.op-lightbox [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ *
 * Filters
 * ------------------------------------------------------------------ */

.op-projects .op-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.op-projects .op-filter {
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	height: auto;
	min-height: 0;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.op-projects .op-filter:focus {
	outline: 0;
	box-shadow: none;
}

.op-projects .op-filter:focus-visible {
	outline: 2px solid var(--op-accent);
	outline-offset: 3px;
}

/* Pills (carousel) */
.op-projects .op-filters--pills {
	gap: 12px;
}

.op-projects .op-filters--pills .op-filter,
.op-projects .op-filters--pills .op-filter:focus {
	padding: 16px 28px;
	border: 1px solid var(--op-border);
	border-radius: 999px;
	background: transparent;
	color: var(--op-text);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.1em;
}

.op-projects .op-filters--pills .op-filter:hover {
	border-color: rgba(255, 255, 255, 0.62);
	background: transparent;
	color: var(--op-text);
}

.op-projects .op-filters--pills .op-filter.is-active,
.op-projects .op-filters--pills .op-filter.is-active:hover,
.op-projects .op-filters--pills .op-filter.is-active:focus {
	border-color: var(--op-accent);
	background: var(--op-accent);
	color: var(--op-accent-contrast);
}

/* Text links (grid) */
.op-projects .op-filters--text {
	gap: 8px clamp(20px, 3vw, 42px);
	margin-bottom: clamp(28px, 3.4vw, 48px);
}

.op-projects .op-filters--text .op-filter,
.op-projects .op-filters--text .op-filter:hover,
.op-projects .op-filters--text .op-filter:focus {
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0.04em;
	opacity: 0.68;
}

.op-projects .op-filters--text .op-filter:hover {
	opacity: 1;
}

.op-projects .op-filters--text .op-filter.is-active,
.op-projects .op-filters--text .op-filter.is-active:hover,
.op-projects .op-filters--text .op-filter.is-active:focus {
	color: var(--op-accent);
	opacity: 1;
}

/* ------------------------------------------------------------------ *
 * Project card
 * ------------------------------------------------------------------ */

.op-projects .op-card {
	position: relative;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.op-projects .op-card__link,
.op-projects .op-card__link:hover,
.op-projects .op-card__link:focus {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--op-radius);
	background: #181818;
	color: #ffffff;
	text-decoration: none;
	box-shadow: none;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-drag: none;
}

.op-projects .op-card__link:focus {
	outline: 0;
}

.op-projects .op-card__link:focus-visible {
	outline: 2px solid var(--op-accent);
	outline-offset: -3px;
}

.op-projects .op-card__media {
	display: block;
	overflow: hidden;
	aspect-ratio: 10 / 7;
}

.op-projects .op-card--grid .op-card__media {
	aspect-ratio: var(--op-grid-ratio);
}

.op-projects .op-card__img {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	transition: transform 0.9s var(--op-ease);
	-webkit-user-drag: none;
	user-select: none;
}

.op-projects .op-card__placeholder {
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 60%),
		#1c1c1c;
}

/* Lower gradient that keeps the photograph visible. */
.op-projects .op-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.8) 0%,
		rgba(0, 0, 0, 0.5) 24%,
		rgba(0, 0, 0, 0.16) 56%,
		rgba(0, 0, 0, 0.1) 100%
	);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.45s var(--op-ease);
}

.op-projects .op-card__badge {
	position: absolute;
	top: clamp(14px, 4.4%, 22px);
	left: clamp(14px, 4.4%, 22px);
	z-index: 2;
	max-width: calc(100% - 44px);
	overflow: hidden;
	padding: 10px 14px;
	border-radius: 999px;
	background: rgba(24, 24, 24, 0.74);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #ffffff;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.09em;
	line-height: 1;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.op-projects .op-card__info {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	padding: 0 clamp(18px, 6.4%, 32px) clamp(18px, 7.4%, 37px);
	text-align: left;
	opacity: 0;
	transform: translate3d(0, 10px, 0);
	transition: opacity 0.45s var(--op-ease), transform 0.45s var(--op-ease);
}

.op-projects .op-card__title {
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-size: clamp(19px, 1.5vw, 28px);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
}

.op-projects .op-card__location {
	margin: 10px 0 0;
	padding: 0;
	color: var(--op-accent);
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
}

.op-projects .op-card__link:focus-visible::after,
.op-projects .op-card--no-image .op-card__link::after {
	opacity: 1;
}

.op-projects .op-card__link:focus-visible .op-card__info,
.op-projects .op-card--no-image .op-card__info {
	opacity: 1;
	transform: none;
}

@media (hover: hover) {
	.op-projects .op-card__link:hover::after {
		opacity: 1;
	}

	.op-projects .op-card__link:hover .op-card__info {
		opacity: 1;
		transform: none;
	}

	.op-projects .op-card__link:hover .op-card__img {
		transform: scale(1.03);
	}
}

/* Touch devices: never hide the essentials behind hover. */
@media (hover: none) {
	.op-projects .op-card__link::after {
		background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.3) 34%, rgba(0, 0, 0, 0) 62%);
		opacity: 1;
	}

	.op-projects .op-card__info {
		opacity: 1;
		transform: none;
	}
}

/* ------------------------------------------------------------------ *
 * Carousel
 * ------------------------------------------------------------------ */

.op-projects.op-carousel {
	position: relative;
	overflow: hidden;
	padding: clamp(56px, 6.4vw, 112px) 0 clamp(60px, 6.2vw, 112px);
	background: var(--op-bg);
	color: var(--op-text);
}

.op-projects.op-carousel--bleed {
	width: var(--op-bleed-width, auto);
	max-width: none;
	margin-left: var(--op-bleed-left, 0);
}

.op-projects .op-carousel__head {
	padding: 0 20px;
	text-align: center;
}

.op-projects .op-carousel__title {
	margin: 0;
	padding: 0;
	color: var(--op-text);
	font-size: clamp(30px, 3.1vw, 54px);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.12;
	text-transform: none;
}

.op-projects .op-carousel__title + .op-filters {
	margin-top: clamp(28px, 2.8vw, 46px);
}

.op-projects .op-carousel__viewport {
	margin-top: clamp(36px, 3.4vw, 64px);
	overflow-x: auto;
	overflow-y: hidden;
	direction: ltr;
	container: op-carousel / inline-size;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.op-projects .op-carousel__viewport::-webkit-scrollbar {
	display: none;
}

/* Once the script takes over, the belt is moved with transforms only. */
.op-projects.op-carousel.is-looping .op-carousel__viewport {
	overflow: hidden;
	touch-action: pan-y;
}

.op-projects .op-carousel__track {
	display: flex;
	gap: var(--op-gap);
	width: max-content;
	margin: 0;
	padding: 0 20px;
	transition: opacity 0.22s ease;
}

.op-projects.op-carousel.is-looping .op-carousel__track {
	padding: 0;
	will-change: transform;
}

.op-projects.op-carousel.is-static .op-carousel__track {
	margin: 0 auto;
}

.op-projects.op-carousel.is-switching .op-carousel__track {
	opacity: 0;
}

.op-projects.op-carousel.is-dragging .op-carousel__track {
	cursor: grabbing;
}

.op-projects .op-card--carousel {
	flex: 0 0 auto;
	width: clamp(260px, 26.2vw, 520px);
	width: clamp(260px, 26.2cqw, 520px);
}

.op-projects .op-carousel__empty {
	margin: clamp(36px, 3.4vw, 64px) 0 0;
	padding: 48px 20px;
	color: var(--op-muted);
	font-size: 16px;
	text-align: center;
}

@media (max-width: 1024px) {
	.op-projects .op-card--carousel {
		width: 44vw;
	}
}

@media (max-width: 600px) {
	.op-projects.op-carousel {
		--op-gap: 14px;
	}

	.op-projects .op-card--carousel {
		width: 78vw;
	}

	.op-projects .op-filters--pills {
		gap: 8px;
	}

	.op-projects .op-filters--pills .op-filter,
	.op-projects .op-filters--pills .op-filter:focus {
		padding: 13px 20px;
		font-size: 12px;
	}
}

/* Size cards from the carousel's own width, so it also works in a narrow column. */
@container op-carousel (max-width: 1024px) {
	.op-projects .op-card--carousel {
		width: 44cqw;
	}
}

@container op-carousel (max-width: 600px) {
	.op-projects .op-card--carousel {
		width: 78cqw;
	}
}

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

.op-projects.op-grid {
	width: 100%;
	max-width: var(--op-grid-max);
	margin: 0 auto;
	padding: clamp(32px, 4.5vw, 72px) 20px;
	color: inherit;
}

.op-projects .op-grid__items {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.6vw, 38px);
	margin: 0;
	padding: 0;
	transition: opacity 0.25s ease;
}

.op-projects .op-grid__items[aria-busy="true"] {
	opacity: 0.4;
	pointer-events: none;
}

.op-projects .op-grid__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 56px 0;
	text-align: center;
	opacity: 0.7;
}

.op-projects .op-card.is-entering {
	animation: op-card-in 0.55s var(--op-ease) both;
}

@keyframes op-card-in {
	from {
		opacity: 0;
		transform: translate3d(0, 14px, 0);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.op-projects .op-grid__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-top: clamp(36px, 4vw, 60px);
}

.op-projects .op-loadmore,
.op-projects .op-loadmore:focus {
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	height: auto;
	min-width: 190px;
	min-height: 0;
	margin: 0;
	padding: 18px 40px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.op-projects .op-loadmore:hover {
	border-color: var(--op-accent);
	background: var(--op-accent);
	color: var(--op-accent-contrast);
}

.op-projects .op-loadmore:focus-visible {
	outline: 2px solid var(--op-accent);
	outline-offset: 3px;
}

.op-projects .op-loadmore[disabled],
.op-projects .op-loadmore[disabled]:hover {
	border-color: currentColor;
	background: transparent;
	color: inherit;
	cursor: default;
	opacity: 0.55;
}

.op-projects .op-grid__status {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	opacity: 0.75;
}

.op-projects .op-grid__status:empty {
	display: none;
}

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

@media (max-width: 600px) {
	.op-projects .op-grid__items {
		grid-template-columns: minmax(0, 1fr);
	}

	.op-projects .op-filters--text .op-filter {
		font-size: 14px;
	}
}

/* ------------------------------------------------------------------ *
 * Single project
 * ------------------------------------------------------------------ */

.op-projects.op-single {
	width: 100%;
	max-width: var(--op-single-max);
	margin: 0 auto;
	padding: clamp(56px, 8vw, 120px) 20px clamp(64px, 9vw, 130px);
	text-align: center;
}

.op-projects .op-single__title {
	margin: 0;
	padding: 0;
	font-size: clamp(32px, 5vw, 64px);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.08;
	overflow-wrap: anywhere;
}

.op-projects .op-single__location {
	margin: clamp(12px, 1.4vw, 20px) 0 0;
	padding: 0;
	font-size: clamp(13px, 1.1vw, 16px);
	font-weight: 300;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
	opacity: 0.66;
}

.op-projects .op-single__gallery {
	margin-top: clamp(32px, 5vw, 72px);
	line-height: 0;
}

.op-projects .op-single__trigger,
.op-projects .op-single__trigger:hover,
.op-projects .op-single__trigger:focus {
	position: relative;
	display: inline-block;
	max-width: 100%;
	overflow: hidden;
	border-radius: var(--op-radius);
	box-shadow: none;
	cursor: zoom-in;
	text-decoration: none;
	vertical-align: top;
}

.op-projects .op-single__trigger:focus {
	outline: 0;
}

.op-projects .op-single__trigger:focus-visible {
	outline: 2px solid var(--op-accent);
	outline-offset: 4px;
}

.op-projects .op-single__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 86vh;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transition: transform 0.9s var(--op-ease);
}

@media (hover: hover) {
	.op-projects .op-single__trigger:hover .op-single__image {
		transform: scale(1.015);
	}
}

.op-projects .op-single__placeholder {
	margin-top: clamp(32px, 5vw, 72px);
	border-radius: var(--op-radius);
	background:
		linear-gradient(135deg, rgba(127, 127, 127, 0.18) 0%, rgba(127, 127, 127, 0.06) 100%);
	aspect-ratio: 16 / 9;
}

/* ------------------------------------------------------------------ *
 * Lightbox
 * ------------------------------------------------------------------ */

html.op-lightbox-open {
	overflow: hidden;
}

.op-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	padding: 24px 0 18px;
	background: rgba(7, 7, 7, 0.93);
	color: #ffffff;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	-webkit-tap-highlight-color: transparent;
}

.op-lightbox.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.3s ease;
}

.op-lightbox .op-lightbox__stage {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	max-width: 1360px;
	min-height: 0;
	margin: 0 auto;
}

.op-lightbox .op-lightbox__figure {
	position: absolute;
	inset: 0 clamp(72px, 7vw, 110px);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.op-lightbox .op-lightbox__image {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	margin: 0;
	border: 0;
	border-radius: var(--op-radius);
	box-shadow: none;
	object-fit: contain;
	transition: opacity 0.28s ease;
	-webkit-user-drag: none;
	user-select: none;
}

.op-lightbox .op-lightbox__image.is-loading {
	opacity: 0;
}

.op-lightbox .op-lightbox__btn,
.op-lightbox .op-lightbox__btn:focus {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	min-width: 0;
	height: 56px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.26);
	border-radius: 50%;
	background: rgba(12, 12, 12, 0.55);
	box-shadow: none;
	color: #ffffff;
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.25s ease, border-color 0.25s ease;
}

.op-lightbox .op-lightbox__btn:hover {
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(40, 40, 40, 0.8);
	color: #ffffff;
}

.op-lightbox .op-lightbox__btn:focus {
	outline: 0;
}

.op-lightbox .op-lightbox__btn:focus-visible {
	outline: 2px solid var(--op-accent);
	outline-offset: 3px;
}

.op-lightbox .op-lightbox__btn svg {
	display: block;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.op-lightbox .op-lightbox__close {
	top: 18px;
	right: 22px;
}

.op-lightbox .op-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
}

.op-lightbox .op-lightbox__nav--prev {
	left: 8px;
}

.op-lightbox .op-lightbox__nav--next {
	right: 8px;
}

.op-lightbox .op-lightbox__caption {
	flex: 0 0 auto;
	padding: 26px 20px 0;
	text-align: center;
}

.op-lightbox .op-lightbox__title {
	margin: 0;
	padding: 0;
	color: #ffffff;
	font-size: clamp(18px, 1.5vw, 26px);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.25;
}

.op-lightbox .op-lightbox__location {
	margin: 9px 0 0;
	padding: 0;
	color: var(--op-accent);
	font-size: 13px;
	letter-spacing: 0.16em;
	line-height: 1.3;
	text-transform: uppercase;
}

.op-lightbox .op-lightbox__counter {
	margin: 12px 0 0;
	padding: 0;
	color: var(--op-muted);
	font-size: 14px;
	letter-spacing: 0.04em;
	line-height: 1.3;
}

@media (max-width: 700px) {
	.op-lightbox {
		padding: 72px 0 16px;
	}

	.op-lightbox .op-lightbox__figure {
		inset: 0 12px;
	}

	.op-lightbox .op-lightbox__btn,
	.op-lightbox .op-lightbox__btn:focus {
		width: 44px;
		height: 44px;
	}

	.op-lightbox .op-lightbox__btn svg {
		width: 18px;
		height: 18px;
	}

	.op-lightbox .op-lightbox__close {
		top: 14px;
		right: 14px;
	}

	.op-lightbox .op-lightbox__nav--prev {
		left: 18px;
	}

	.op-lightbox .op-lightbox__nav--next {
		right: 18px;
	}

	.op-lightbox .op-lightbox__caption {
		padding-top: 18px;
	}
}

/* Short viewports (phones in landscape): keep the image dominant. */
@media (max-height: 520px) {
	.op-lightbox {
		padding: 12px 0 10px;
	}

	.op-lightbox .op-lightbox__figure {
		inset: 0 72px;
	}

	.op-lightbox .op-lightbox__close {
		top: 10px;
		right: 12px;
	}

	.op-lightbox .op-lightbox__caption {
		padding-top: 8px;
	}

	.op-lightbox .op-lightbox__title {
		font-size: 15px;
	}

	.op-lightbox .op-lightbox__location {
		display: none;
	}

	.op-lightbox .op-lightbox__counter {
		margin-top: 2px;
		font-size: 12px;
	}
}

/* ------------------------------------------------------------------ *
 * Reduced motion
 * ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.op-projects *,
	.op-projects *::after,
	.op-lightbox,
	.op-lightbox * {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
