:root {
	--motm-sphere-header-height: 74px;
	--motm-sphere-gap: 3px;
	--motm-sphere-row-height: 27vh;
	--motm-sphere-ink: #f7f4ed;
	--motm-sphere-backdrop: #080808;
}

html,
body.motm-layout-sphere {
	margin: 0;
	min-height: 100%;
	background: var(--motm-sphere-backdrop);
}

html {
	overflow: hidden;
}

body.motm-layout-sphere {
	color: var(--motm-sphere-ink);
	font-family: Arial, Helvetica, sans-serif;
	overflow: hidden;
}

body.motm-layout-sphere.admin-bar {
	--motm-sphere-admin-offset: 32px;
}

.motm-sphere-skip {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 9px 12px;
	color: #111;
	background: #fff;
	transform: translateY(-180%);
}

.motm-sphere-skip:focus {
	transform: none;
}

.motm-sphere-header {
	position: fixed;
	top: var(--motm-sphere-admin-offset, 0px);
	left: 0;
	right: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: baseline;
	min-height: var(--motm-sphere-header-height);
	padding: 26px 30px 0;
	box-sizing: border-box;
	pointer-events: none;
}

.motm-sphere-header a {
	color: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	pointer-events: auto;
}

.motm-sphere-brand {
	position: relative;
	justify-self: start;
	font-size: clamp(19px, 1.35vw, 25px) !important;
	white-space: nowrap;
}

.motm-sphere-brand__title {
	display: block;
}

.motm-sphere-brand__tagline {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	width: auto;
	font-size: 0.31em;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1;
	text-align: left;
	white-space: nowrap;
}

.motm-sphere-filters {
	display: flex;
	gap: 24px;
	justify-content: center;
}

.motm-sphere-filter {
	opacity: 0.68;
	transition: opacity 140ms ease;
}

.motm-sphere-filter:hover,
.motm-sphere-filter:focus-visible,
.motm-sphere-filter.is-current {
	opacity: 1;
}

.motm-sphere-stage.is-filter-loading {
	cursor: progress;
}

.motm-sphere-stage {
	position: relative;
	height: 100vh;
	min-height: 520px;
	overflow: hidden;
	overscroll-behavior: none;
	touch-action: none;
}

body.motm-layout-sphere.admin-bar .motm-sphere-stage {
	height: calc(100vh - 32px);
}

.motm-sphere-canvas {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	width: 100%;
	height: 100%;
}

.motm-sphere-canvas.has-active-project {
	cursor: pointer;
}

.motm-sphere-hover-title {
	position: fixed;
	left: 30px;
	bottom: 25px;
	z-index: 20;
	max-width: min(620px, calc(100vw - 60px));
	margin: 0;
	color: var(--motm-sphere-ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.05;
	text-shadow: 0 1px 16px rgba(0, 0, 0, 0.68);
	opacity: 0;
	transform: translateY(5px);
	transition: opacity 150ms ease, transform 150ms ease;
	pointer-events: none;
}

.motm-sphere-hover-title.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.motm-sphere-bandcamp {
	display: block;
	width: 126px;
	margin-top: -8px;
	color: var(--motm-sphere-ink);
	justify-self: end;
	align-self: start;
	opacity: 0.82;
	transition: opacity 140ms ease;
}

.motm-sphere-bandcamp:hover,
.motm-sphere-bandcamp:focus-visible {
	opacity: 1;
}

.motm-sphere-bandcamp img {
	display: block;
	width: 100%;
	height: auto;
}

body.motm-project-overlay-open {
	overflow: hidden;
}

.motm-project-overlay[hidden] {
	display: none;
}

.motm-project-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: clamp(18px, 4vw, 72px);
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.72);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 220ms ease;
}

.motm-project-overlay.is-open {
	opacity: 1;
}

.motm-project-overlay__panel {
	--motm-project-panel-color: #315f9b;
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	width: min(1480px, 90vw);
	height: min(800px, 82vh);
	min-height: 520px;
	color: #f7f4ed;
	background: var(--motm-project-panel-color);
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
	overflow: visible;
	transform: translateY(18px) scale(0.985);
	transition: transform 240ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.motm-project-overlay.is-open .motm-project-overlay__panel {
	transform: translateY(0) scale(1);
}

.motm-project-overlay__close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	width: 50px;
	height: 50px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, 0.3);
	cursor: pointer;
}

.motm-project-overlay__close span::before,
.motm-project-overlay__close span::after {
	position: absolute;
	top: 24px;
	left: 11px;
	width: 28px;
	height: 3px;
	background: currentColor;
	content: "";
}

.motm-project-overlay__close span::before {
	transform: rotate(45deg);
}

.motm-project-overlay__close span::after {
	transform: rotate(-45deg);
}

.motm-project-overlay__close:hover,
.motm-project-overlay__close:focus-visible {
	background: rgba(0, 0, 0, 0.55);
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.motm-project-overlay__copy {
	display: flex;
	flex-direction: column;
	justify-content: safe center;
	min-width: 0;
	padding: clamp(54px, 6vh, 92px) clamp(56px, 8vw, 152px);
	box-sizing: border-box;
	overflow: auto;
}

.motm-project-overlay__categories {
	margin: 0 0 clamp(38px, 4vh, 52px);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
	opacity: 0.72;
}

.motm-project-overlay__categories:empty {
	display: none;
}

.motm-project-overlay__title {
	margin: 0 0 clamp(52px, 7vh, 72px);
	font-size: clamp(32px, 1.9vw, 36px);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.02;
}

.motm-project-overlay__content {
	max-width: 430px;
	font-size: 16px;
	line-height: 1.48;
}

.motm-project-overlay__content > :first-child {
	margin-top: 0;
}

.motm-project-overlay__content > :last-child {
	margin-bottom: 0;
}

.motm-project-overlay__content a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.motm-project-overlay__content img,
.motm-project-overlay__content video,
.motm-project-overlay__content iframe {
	max-width: 100%;
}

.motm-project-overlay__media {
	position: relative;
	min-width: 0;
	min-height: 0;
	margin: 0;
	background: var(--motm-project-panel-color);
	overflow: hidden;
}

.motm-project-overlay__media.has-gallery {
	touch-action: pan-y;
}

.motm-project-overlay__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.motm-project-overlay__video {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--motm-project-panel-color);
	object-fit: contain;
	object-position: center;
}

.motm-project-overlay__image[hidden],
.motm-project-overlay__video[hidden] {
	display: none;
}

.motm-project-overlay__arrow[hidden] {
	display: none;
}

.motm-project-overlay__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	color: #fff;
	background: rgba(0, 0, 0, 0.3);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.motm-project-overlay__arrow:hover,
.motm-project-overlay__arrow:focus-visible {
	border-color: #fff;
	background: rgba(0, 0, 0, 0.58);
	outline: none;
	transform: translateY(-50%) scale(1.06);
}

.motm-project-overlay__arrow--previous {
	left: 18px;
}

.motm-project-overlay__arrow--next {
	right: 18px;
}

.motm-project-overlay__arrow span {
	display: block;
	width: 12px;
	height: 12px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
}

.motm-project-overlay__arrow--previous span {
	margin-left: 4px;
	transform: rotate(-135deg);
}

.motm-project-overlay__arrow--next span {
	margin-right: 4px;
	transform: rotate(45deg);
}

.motm-project-overlay__loader {
	position: absolute;
	top: 50%;
	left: 25%;
	width: 34px;
	height: 34px;
	margin: -17px 0 0 -17px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
}

.motm-project-overlay__panel.is-loading .motm-project-overlay__copy {
	opacity: 0;
}

.motm-project-overlay__panel.is-loading .motm-project-overlay__loader {
	opacity: 1;
	animation: motm-project-loader 700ms linear infinite;
}

@keyframes motm-project-loader {
	to {
		transform: rotate(360deg);
	}
}

.motm-sphere-stage::before,
.motm-sphere-stage::after {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 10;
	height: 23vh;
	min-height: 145px;
	content: "";
	pointer-events: none;
}

.motm-sphere-stage::before {
	top: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

.motm-sphere-stage::after {
	bottom: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}

.motm-sphere-grid {
	position: absolute;
	top: -17.5vh;
	left: 50%;
	display: grid;
	grid-template-rows: repeat(var(--motm-row-count, 5), var(--motm-sphere-row-height));
	gap: var(--motm-sphere-gap);
	width: 124vw;
	height: var(--motm-grid-height, calc(135vh + 12px));
	transform: translateX(-50%) translateY(var(--motm-scroll-y, 0px));
	will-change: transform;
}

.motm-sphere-loop-copy {
	display: contents;
}

body.motm-layout-flat .motm-sphere-grid {
	width: 106vw;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-grid {
	z-index: 3;
	pointer-events: none;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered {
	background: transparent;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-card:not(.is-webgl-rendered) {
	pointer-events: auto;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered .motm-sphere-card__image,
.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered .motm-sphere-card__video,
.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered .motm-sphere-card__placeholder {
	opacity: 0;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered:focus-within {
	outline: 3px solid #fff;
	outline-offset: -3px;
}

.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered:focus-within .motm-sphere-card__image,
.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered:focus-within .motm-sphere-card__video,
.motm-sphere-stage.is-webgl-ready .motm-sphere-card.is-webgl-rendered:focus-within .motm-sphere-card__placeholder {
	opacity: 1;
}

.motm-sphere-row {
	display: flex;
	gap: var(--motm-sphere-gap);
	width: 100%;
	min-width: 0;
	height: var(--motm-sphere-row-height);
	transform: translateX(var(--motm-row-shift, 0));
}

.motm-sphere-card {
	position: relative;
	z-index: 0;
	flex: 1 1 var(--motm-card-width);
	height: 100%;
	min-width: 19.44vh;
	margin: 0;
	background: #181818;
	overflow: hidden;
	transform: scale(1);
	transform-origin: center;
	transition: filter 190ms ease, transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 220ms ease;
	will-change: filter, transform;
}

.motm-sphere-grid.has-hovered-card .motm-sphere-card {
	filter: brightness(0.72) saturate(0.82);
}

.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor-far {
	z-index: 1;
	filter: brightness(0.8) saturate(0.9);
	transform: scale(1.015);
}

.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor {
	z-index: 2;
	filter: brightness(0.88) saturate(0.96);
	transform: scale(1.035);
}

.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hovered {
	z-index: 4;
	filter: brightness(1.06) saturate(1.1);
	transform: scale(1.1);
	box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42);
}

.motm-sphere-card__link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.motm-sphere-card__link[data-project-clickable="false"] {
	cursor: default;
}

.motm-sphere-card__image,
.motm-sphere-card__video,
.motm-sphere-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.motm-sphere-card__video {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 180ms ease;
}

.motm-sphere-card__video.is-playing {
	opacity: 1;
}

.motm-sphere-card__placeholder {
	background: #242424;
}

.motm-sphere-empty {
	position: absolute;
	top: 50%;
	left: 50%;
	margin: 0;
	transform: translate(-50%, -50%);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 782px) {
	body.motm-layout-sphere.admin-bar {
		--motm-sphere-admin-offset: 46px;
	}

	body.motm-layout-sphere.admin-bar .motm-sphere-stage {
		height: calc(100vh - 46px);
	}

	.motm-sphere-header {
		grid-template-columns: 1fr auto;
		padding: 18px 18px 0;
	}

	.motm-sphere-filters {
		position: fixed;
		left: 18px;
		right: 18px;
		bottom: 18px;
		z-index: 22;
		justify-content: center;
		gap: 16px;
	}

	.motm-sphere-card {
		min-width: 21.06vh;
	}

	.motm-sphere-hover-title {
		display: none;
	}

	.motm-sphere-bandcamp {
		grid-column: 2;
		width: 108px;
		margin-top: -4px;
	}

	.motm-sphere-brand__tagline {
		display: block;
		font-size: 0.36em;
	}

	.motm-project-overlay {
		height: 100vh;
		height: -webkit-fill-available;
		height: 100dvh;
		min-height: 0;
		padding:
			calc(12px + env(safe-area-inset-top, 0px))
			calc(12px + env(safe-area-inset-right, 0px))
			calc(12px + env(safe-area-inset-bottom, 0px))
			calc(12px + env(safe-area-inset-left, 0px));
		overflow: hidden;
	}

	.motm-project-overlay__panel {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(190px, 40dvh) minmax(0, 1fr);
		width: 100%;
		height: 100%;
		max-height: 100%;
		min-height: 0;
		overflow: hidden;
	}

	.motm-project-overlay__media {
		grid-row: 1;
	}

	.motm-project-overlay__arrow {
		width: 40px;
		height: 40px;
	}

	.motm-project-overlay__arrow--previous {
		left: 12px;
	}

	.motm-project-overlay__arrow--next {
		right: 12px;
	}

	.motm-project-overlay__copy {
		grid-row: 2;
		justify-content: flex-start;
		min-height: 0;
		padding: 36px 26px calc(36px + env(safe-area-inset-bottom, 0px));
		overflow-x: hidden;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		touch-action: pan-y;
	}

	.motm-project-overlay__title {
		margin-bottom: 28px;
		font-size: clamp(30px, 10vw, 46px);
	}

	.motm-project-overlay__close {
		top: 14px;
		right: 14px;
	}

	.motm-project-overlay__loader {
		top: 71%;
		left: 50%;
	}
}

@media (max-width: 782px) and (orientation: portrait) {
	.motm-sphere-grid,
	body.motm-layout-flat .motm-sphere-grid {
		left: 0;
		display: block;
		width: 100%;
		height: auto !important;
		transform: translateY(var(--motm-scroll-y, 0px));
	}

	.motm-sphere-loop-copy {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: var(--motm-sphere-row-height);
		gap: var(--motm-sphere-gap);
		width: 100%;
	}

	.motm-sphere-row {
		display: contents;
		transform: none;
	}

	.motm-sphere-card {
		order: var(--motm-mobile-order, 0);
		width: auto;
		height: auto;
		min-width: 0;
	}

	.motm-sphere-grid.has-hovered-card .motm-sphere-card,
	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor-far,
	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor,
	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hovered {
		filter: none;
		transform: none;
		box-shadow: none;
	}
}

@supports (height: 100svh) {
	.motm-sphere-stage {
		height: 100svh;
	}

	body.motm-layout-sphere.admin-bar .motm-sphere-stage {
		height: calc(100svh - 32px);
	}

	@media (max-width: 782px) {
		body.motm-layout-sphere.admin-bar .motm-sphere-stage {
			height: calc(100svh - 46px);
		}
	}
}

@media (orientation: landscape) and (max-height: 519px) {
	.motm-sphere-stage,
	body.motm-layout-sphere.admin-bar .motm-sphere-stage {
		height: 100vh;
		min-height: 0;
	}

	.motm-sphere-stage::before,
	.motm-sphere-stage::after {
		min-height: 0;
	}
}

@supports (height: 100svh) {
	@media (orientation: landscape) and (max-height: 519px) {
		.motm-sphere-stage,
		body.motm-layout-sphere.admin-bar .motm-sphere-stage {
			height: 100svh;
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.motm-sphere-hover-title {
		transform: none;
	}

	.motm-project-overlay__panel {
		transform: none;
	}

	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hovered,
	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor,
	.motm-sphere-grid.has-hovered-card .motm-sphere-card.is-hover-neighbor-far {
		transform: none;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
