/* content */

/* .content {
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
} */

.content--sticky {
  position: sticky;
  top: 0;
  --offset: 0px;
  top: var(--offset);
  height: calc(100vw - 1);
  height: calc(100vh - var(--offset));
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media only screen and (max-device-width: 743px) and (orientation: landscape) {
  .content--sticky {
  	position: static;
    display: block;
    width: 100%;
    height: auto;
  }
}

/* gallery */

main {
	position: relative;
	width: 100%;
	overflow: hidden;
}


.gallery-wrap {
	position: relative;
	width: 100%;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
/* 	margin: 40vh auto; */
	overflow: hidden;
}

.gallery-wrap--auto {
	height: auto;
}

.gallery-wrap--large {
	height: 110vh;
}

.gallery-wrap--dense {
	margin: 0;
}

.gallery {
	position: relative;
	width: 100%;
	height: 100%;	
	flex: none;
}

.gallery--breakout {
	width: min-content;
}

.gallery__item {
	background-position: 50% 50%;
	background-size: cover;	
	flex: none;
	border-radius: 6px;
	position: relative;
	filter: brightness(1.0) grayscale(25%);
/* 	filter: brightness(1.0)  grayscale(90%); */
/* 	filter: saturate(1) brightness(1.0)  grayscale(50%); */
}

.gallery__item.border-radius--residence {
	border-top-left-radius: 10%;
	border-top-right-radius: 10%;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.gallery__item.gray-scale--50 {
	filter: brightness(1.0)  grayscale(50%);
/* 	filter: saturate(1) brightness(1.0)  grayscale(50%); */
}

.gallery__item.gray-scale--75 {
	filter: brightness(1.0)  grayscale(75%);
}

.gallery__item.gray-scale--90 {
	filter: brightness(1.0)  grayscale(90%);
}

.gallery__item-cut { 
	overflow: hidden;
	display: grid;
	place-items: center;
}

/* .gallery__item-inner {
	width: 100%; 
	height: 100%;
	background-position: 50% 50%;
	background-size: cover;	
	background-repeat: no-repeat;
} */

.gallery__item-inner {
	width: 100%; 
	height: 100%;
	background-position: 50% 50%;
	background-size: cover;	
	background-repeat: no-repeat;
}

.gallery__item-inner--contain {
	width: 100%; 
	height: 100%;
	background-position: 50% 50%;
	background-size: contain;	
	background-repeat: no-repeat;
}



.caption {
	font-size: clamp(1rem, 3vw, 1.75rem);
	z-index: 101;
	color: var(--color-caption);
/* 	font-weight: 400; */
}

.gallery--row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	--size-factor: 1.25;
	--item-height: 20vh;
}

.gallery--row .gallery__item {
	width: auto;
	aspect-ratio: 2 / 3;
}

.gallery--row .gallery__item--s {
	height: var(--item-height);
}

.gallery--row .gallery__item--m {
	height: calc(var(--size-factor) * var(--item-height));
}

.gallery--row .gallery__item--l {
	height: calc(var(--size-factor) * 2 * var(--item-height));
}

.gallery--row .gallery__item--xl {
	z-index: 100;
	height: calc(var(--size-factor) * 3 * var(--item-height));
}

.gallery--switch.gallery--row .gallery__item--m,
.gallery--switch.gallery--row .gallery__item--l {
	height: var(--item-height);
}

.gallery--row .gallery__item--square {
	width: auto;
	aspect-ratio: 1 / 1 !important;
}

.gallery--row .gallery__item--circle {
	width: auto;
	aspect-ratio: 1 / 1 !important;
	border-radius: 50%;
}

.gallery--row .caption {
	position: absolute;
	width: 100%;
	height: auto;
	bottom: -50vh;
	left: 0;
	padding: 4.5vw;
	max-width: 730px;
	opacity: 0;
}

.gallery--switch.gallery--row .caption {
	bottom: 0;
	opacity: 1;
}

.gallery--one {
	display: grid;
	place-items: center;
}

.gallery--one .gallery__item {
	width: 75%;
	height: 75%;
	filter: brightness(1.2) grayscale(100%);
}

.gallery--switch.gallery--one .gallery__item {
	width: 100%;
	height: 100%;
	filter: brightness(0.8) grayscale(0%);
}

.gallery--one .caption {
	position: absolute;
	width: 100vw;
	height: 100vh;
	top: 50%;
	left: 50%;
	margin: 100vh 0 0 -50vw;
	font-size: clamp(2rem,5vw,3rem);
	display: grid;
	place-items: center;
}

.gallery--switch.gallery--one .caption {
	margin-top: -50vh;
}

.gallery--grid {
	height: auto;
	display: grid;
	grid-template-columns: repeat(3,auto);
	grid-template-rows: repeat(3,auto);
/* 	row-gap: 2.5vw;
	column-gap: 3vw; */
	row-gap: 1.7vw;
	column-gap: 1.7vw;
}

.gallery--grid .gallery__item {
	width: 33vw;
	height: 33vh;
}

.gallery--switch.gallery--grid {
	gap: 0;
}

.gallery--switch.gallery--grid .gallery__item {
	height: 110vh;
	width: 110vw;
	filter: brightness(0.65);
}

.gallery--grid .caption {
	position: absolute;
	width: 100vw;
	height: 100vh;
	padding: 0;
	top: 50%;
	left: 50%;
	margin-top: 50vh;
	margin-left: -50vw;
	display: grid;
	place-items: center;
	max-width: none;
	opacity: 0;
}

.gallery--switch.gallery--grid .caption {
	margin-top: -40vh;
	opacity: 1;
}

.gallery--grid .caption p {
	padding: 50vh 45vw 10vh 10vw;
}

.gallery--switch.gallery--grid .caption p {
	margin-top: 0;
}

.gallery--stack {
	display: grid;
	grid-template-columns: repeat(6,1fr);
	align-items: center;
	justify-content: start;
	gap: 2rem;
	padding: 2rem;
	--offset: 1rem;
}

.gallery--stack .gallery__item {
	border-radius: 1.5vw;
	width: 25vw;
	height: 35vw;
	z-index: 1;
}

.gallery--stack-glass .gallery__item {
	filter: opacity(1);
}

.gallery--switch.gallery--stack .gallery__item {
	grid-area: 1 / 1 / 2 / 2;
}

.gallery--stack .caption {
	position: absolute;
	bottom: 0;
	left: 100vw;
	width: 100vw;
	padding: 5vw;
	color: var(--color-text-alt);
	opacity: 0;
	z-index: 0;
}

.gallery--stack .caption p {
	margin: 0;
}

.gallery--switch.gallery--stack .caption {
	left: 0;
	opacity: 1;
}

.gallery--stack-inverse .gallery__item:nth-child(5) {
	z-index: 2;
}
.gallery--stack-inverse .gallery__item:nth-child(4) {
	z-index: 3;
}
.gallery--stack-inverse .gallery__item:nth-child(3) {
	z-index: 4;
}
.gallery--stack-inverse .gallery__item:nth-child(2) {
	z-index: 5;
}
.gallery--stack-inverse .gallery__item:nth-child(1) {
	z-index: 6;
}

.gallery--switch.gallery--stack .gallery__item:nth-child(2) {
	margin-left: var(--offset);
}

.gallery--switch.gallery--stack .gallery__item:nth-child(3) {
	margin-left: calc(var(--offset) * 2);
}

.gallery--switch.gallery--stack .gallery__item:nth-child(4) {
	margin-left: calc(var(--offset) * 3);
}

.gallery--switch.gallery--stack .gallery__item:nth-child(5) {
	margin-left: calc(var(--offset) * 4);
}

.gallery--switch.gallery--stack .gallery__item:nth-child(6) {
	margin-left: calc(var(--offset) * 5);
}

.gallery--switch.gallery--stack-dark .gallery__item:nth-child(2) {
	filter: brightness(0.8);
}

.gallery--switch.gallery--stack-dark .gallery__item:nth-child(3) {
	filter: brightness(0.7);
}

.gallery--switch.gallery--stack-dark .gallery__item:nth-child(4) {
	filter: brightness(0.6);
}

.gallery--switch.gallery--stack-dark .gallery__item:nth-child(5) {
	filter: brightness(0.5);
}

.gallery--switch.gallery--stack-dark .gallery__item:nth-child(6) {
	filter: brightness(0.4);
}

.gallery--switch.gallery--stack-glass .gallery__item {
	opacity: 0.7;
}

.gallery--switch.gallery--stack-scale .gallery__item:nth-child(2) {
	transform: scale(0.98);
}

.gallery--switch.gallery--stack-scale .gallery__item:nth-child(3) {
	transform: scale(0.96);
}

.gallery--switch.gallery--stack-scale .gallery__item:nth-child(4) {
	transform: scale(0.94);
}

.gallery--switch.gallery--stack-scale .gallery__item:nth-child(5) {
	transform: scale(0.92);
}

.gallery--switch.gallery--stack-scale .gallery__item:nth-child(6) {
	transform: scale(0.9);
}

.gallery--gridtiny {
	display: grid;
	grid-template-columns: repeat(10,1fr);
	width: 200%;
	padding: 0 2vh;
	height: min-content;
	gap: 1vh;
}

.gallery--switch.gallery--gridtiny {
	width: 100%;
	gap: 2vh;
}

.gallery--gridtiny .gallery__item {
	aspect-ratio: 1;
	width: 100%;
	height: auto;
	filter: contrast(0.8) saturate(0) brightness(0.6) opacity(1);
}

.gallery--switch.gallery--gridtiny .gallery__item {
	filter: contrast(1) saturate(1) brightness(0.8) opacity(0.8);
}

.gallery--gridtiny .caption {
	position: absolute;
	width: 100vw;
	height: 100vh;
	left: 50%;
	top: 50%;
	margin: -50vh 0 0 -50vw;
	display: grid;
	place-items: center;
	font-size: clamp(2rem, 8vw, 3.2rem);
	opacity: 0;
}

.gallery--switch.gallery--gridtiny .caption {
	opacity: 1;
}

.gallery--switch .gallery__item--center {
	height: 100vh;
	width: 100vw;
	aspect-ratio: auto;
	filter: brightness(0.5);
}

.gallery--bento {
	display: grid;
	gap: 1vh;
	grid-template-columns: repeat(3, 32.5vw);
	grid-template-rows: repeat(4,23vh);
	justify-content: center;
    align-content: center;
}

.gallery--switch.gallery--bento {
	grid-template-columns: repeat(3, 100vw);
	grid-template-rows: repeat(4,49.5vh);
	gap: 15vh;
}

.gallery--bento .gallery__item:nth-child(1) {
	grid-area: 1 / 1 / 3 / 2;
}

.gallery--bento .gallery__item:nth-child(2) {
	grid-area: 1 / 2 / 2 / 3;
}

.gallery--bento .gallery__item:nth-child(3) {
	grid-area: 2 / 2 / 4 / 3;
}

.gallery--bento .gallery__item:nth-child(4) {
	grid-area: 1 / 3 / 3 / 3;
}

.gallery--bento .gallery__item:nth-child(5) {
	grid-area: 3 / 1 / 3 / 2;
}

.gallery--bento .gallery__item:nth-child(6) {
	grid-area: 3 / 3 / 5 / 4;
}

.gallery--bento .gallery__item:nth-child(7) {
	grid-area: 4 / 1 / 5 / 2;
}

.gallery--bento .gallery__item:nth-child(8) {
	grid-area: 4 / 2 / 5 / 3;
}

.gallery--bento .caption {
	position: absolute;
	width: 100vw;
	height: 100vh;
	top: 50%;
	left: 50%;
	margin: 100vh 0 0 -50vw;
	font-size: clamp(2rem,10vw,5rem);
	display: grid;
	place-items: center;
}

.gallery--switch.gallery--bento .caption {
	margin-top: -50vh;
}

.gallery--grid10 {
	display: grid;
	grid-template-columns: repeat(2,1fr);
	gap: 2vw;
}

.gallery--switch.gallery--grid10 {
	grid-template-columns: 1fr 300px 1fr;
	grid-template-rows: 1fr 60vh 1fr;
	grid-gap: 0;
}

.gallery--switch.gallery--grid10 .gallery__item {
	grid-area: 2 / 2 / 3 / 3; 	
}

.gallery--grid10 .caption {
    position: absolute;
	width: 100vw;
	height: 100vh;
	top: 50%;
	left: 50%;
	margin: 100vh 0 0 -50vw;
	display: grid;
	place-items: center;
    font-size: clamp(2rem, 8vw, 6rem);
}

.gallery--switch.gallery--grid10 .caption {
	opacity: 1;
	margin-top: -50vh;
}

@media screen and (min-width: 53em) {
	.frame {
		grid-template-columns: auto auto auto 1fr;
		grid-template-areas: 'title prev ... sponsor';
		align-content: space-between;
		justify-items: start;
		grid-gap: 2rem;
	}
	.frame__demos {
		justify-self: end;
	}
	.project--intro {
		grid-template-columns: auto 1fr;
		grid-template-areas: 'label-name name' 
							 'label-date date'
							 'title title'
							 'label-mission mission';
		
	}

	.project--details {
		grid-template-areas: 'label-default paragraph';
		grid-template-columns: auto auto;
	}
	.project__label {
		text-align: right;
	}
	.project__mission {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		grid-template-areas: 'p1 ...' '... p2';
		column-gap: 2rem;
	}
	.gallery--grid10 {
		grid-template-columns: repeat(10,1fr);
		grid-template-rows: repeat(4,1fr);
	}
	.gallery--grid10:not(.gallery--switch) .pos-1 { grid-area: 1 / 1; }
	.gallery--grid10:not(.gallery--switch) .pos-2 { grid-area: 1 / 2; }
	.gallery--grid10:not(.gallery--switch) .pos-3 { grid-area: 1 / 4; }
	.gallery--grid10:not(.gallery--switch) .pos-4 { grid-area: 1 / 5; }
	.gallery--grid10:not(.gallery--switch) .pos-5 { grid-area: 3 / 6; }
	.gallery--grid10:not(.gallery--switch) .pos-6 { grid-area: 1 / 7; }
	.gallery--grid10:not(.gallery--switch) .pos-7 { grid-area: 1 / 9; }
	.gallery--grid10:not(.gallery--switch) .pos-8 { grid-area: 3 / 10; }
	.gallery--grid10:not(.gallery--switch) .pos-9 { grid-area: 2 / 8; }
	.gallery--grid10:not(.gallery--switch) .pos-10 { grid-area: 4 / 9; }
	.gallery--grid10:not(.gallery--switch) .pos-11 { grid-area: 3 / 8; }
	.gallery--grid10:not(.gallery--switch) .pos-12 { grid-area: 2 / 2; }
	.gallery--grid10:not(.gallery--switch) .pos-13 { grid-area: 3 / 1; }
	.gallery--grid10:not(.gallery--switch) .pos-14 { grid-area: 3 / 4; }
	.gallery--grid10:not(.gallery--switch) .pos-15 { grid-area: 4 / 3; }
	.gallery--grid10:not(.gallery--switch) .pos-16 { grid-area: 4 / 7; }

	.gallery--stack .caption {
		bottom: 40%;
		width: 60vw;
		max-width: 800px;
	}

	.gallery--switch.gallery--stack .caption {
		left: 40vw;
	}

	body #cdawrap {
	    justify-self: end;
	}
}
