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

:root {
  --color-text: #0f0f0f;
  --color-bg: #ffffff;
  --color-link: #424242;
  --color-link-hover: #4d4d4d;
  --bgr-buttonrgba: rgba(0, 0, 0, 0.27);
	--page-padding: 0.5rem;
	--grid-gap: var(--page-padding);
	--color-bg-content: #fbfbfb;
	--color-bg-frame: #7a7364;
	--color-border: #46443e;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
	content: '';
	position: fixed;
	z-index: 1000;
}

.js .loading::before {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	opacity: 0.4;
	background: var(--color-link);
	animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
	to {
		opacity: 1;
		transform: scale3d(0.5,0.5,1);
	}
}

a {
	text-decoration: none;
	color: var(--color-link);
	outline: none;
	cursor: pointer;
}

a:hover {
	text-decoration: underline;
	color: var(--color-link-hover);
	outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
	/* Provide a fallback style for browsers
	 that don't support :focus-visible */
	outline: none;
	background: lightgrey;
}

a:focus:not(:focus-visible) {
	/* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
	background: transparent;
}

a:focus-visible {
	/* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
	outline: 2px solid red;
	background: transparent;
}

.unbutton {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	cursor: pointer;
}

.unbutton:focus {
	outline: none;
}

.type-tiny,
.cdawrap {
	font-size: 13px;
	text-transform: uppercase;
	font-weight: 400;
	font-variation-settings: "wght" 400;
}

.flex-line {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}
.project-catge {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	padding: 1rem;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2000;
}
.project-catge span{
	font-size: 0.7rem;
	font-weight: 500;
	font-variation-settings: "wght" 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 5px 15px;
	border-radius: 30px;
	background: rgba(0,0,0,0.5);
	color: #fff;
	display: inline-block;
	margin-top: 5px;
}
.grid__item-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 1rem;
	background: rgba(0,0,0,0.5);
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 2000;
}
.grid__img:hover .grid__item-overlay, .grid__img:hover .project-catge {
	opacity: 1;
}
 .grid__item-overlay .mos-img img{
	display: none;
}

.content {
	position: relative;
	min-height: 100dvh;
	background: var(--color-bg-content);
	align-content: center;
}

.content--cutoff {
	overflow: hidden;
}

.content--padded {
	padding: var(--page-padding);
}

.content--full {
	display: grid;
	height: 100vh;
	place-items: center;
	grid-template-areas: 'main';
	grid-template-rows: 100%;
	grid-template-columns: 100%;
}

.content__text {
	font-size: 1.7rem;
	max-width: 625px;
	line-height: 1.4;
	margin: 0.5rem 0;
	font-weight: 500;
	font-variation-settings: "wght" 500;
	text-wrap: balance;
	letter-spacing: -0.025em;
}

.grid {
	grid-area: main;
	display: grid;
	width: 100%;
	height: 100%;
	grid-template-columns: repeat(8,1fr);
	grid-template-rows: 1fr 1fr 1fr;
}

.grid--spaced {
	gap: var(--grid-gap);
}

.grid--zoomed {
	gap: 2rem;
	grid-template-columns: repeat(3, 60%) !important;
	grid-template-rows: repeat(3, 50%) !important;
	justify-content: center;
	align-content: center;
	aspect-ratio: 2 / 1;
}

.grid--zoomed .grid__img {
	width: 100%;
	height: 100%;
}

.grid--columns {
  grid-template-columns: repeat(5,1fr);
	grid-template-rows: repeat(2,min-content);
  align-content: center;
}

.grid--single {
  height: auto;
  justify-self: center;
}

.grid--column {
	grid-template-columns: repeat(15, calc((100% - 14 * 10px) / 15));
  gap: 10px;
	grid-template-rows: auto;
}

.grid__img:has(.grid__img-inner) {
	position: relative;
	overflow: hidden;
	display: grid;
	place-items: center;
	max-height: 100%;
	min-width: 100%;
}

.grid__img .grid__img-inner {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: 50% 50%;
	will-change: transform;
}

.ar-wide {
	aspect-ratio: 4/3;
}

.ar-narrow {
	aspect-ratio: 2/3;
}

.ar-rect {
	aspect-ratio: 1;
}

.span-2 {
	grid-column: auto / span 2;
}

.span-3 {
	grid-column: auto / span 3;
}

.grid--small {
	grid-template-columns: repeat(9,1fr);
	grid-auto-rows: 1fr;
}

.grid--tiny {
	height: 60vh;
	grid-template-columns: repeat(14,1fr);
	grid-auto-rows: auto;
}

.grid--wide {
	grid-template-columns: repeat(5,1fr);
	grid-template-rows: repeat(4,1fr);
}

.pos-1 { grid-area: 1 / 1; }
.pos-2 { grid-area: 1 / 3; }
.pos-3 { grid-area: 1 / 4; }
.pos-4 { grid-area: 1 / 5; }
.pos-5 { grid-area: 1 / 7; }
.pos-6 { grid-area: 2 / 1; }
.pos-7 { grid-area: 2 / 3; }
.pos-8 { grid-area: 2 / 4; }
.pos-9 { grid-area: 2 / 6; }
.pos-10 { grid-area: 2 / 7; }
.pos-11 { grid-area: 2 / 8; }
.pos-12 { grid-area: 3 / 1; }
.pos-13 { grid-area: 3 / 2; }
.pos-14 { grid-area: 3 / 4; }
.pos-15 { grid-area: 3 / 5; }
.pos-16 { grid-area: 3 / 7; }
.pos-17 { grid-area: 3 / 8; }
.pos-18 { grid-area: 2 / 5; }

.grid__img {
	background-size: cover;
	background-position: 50% 50%;
	pointer-events: auto;
	will-change: transform;
	transform: translateZ(0.1px);
}

.grid__item-overlay,
.grid__item-overlay a,
.grid__img a {
	pointer-events: auto;
}

.grid__item-link {
	display: inline-block;
	padding: 5px 15px;
	background: var(--bgr-buttonrgba);
	color: var(--color-bg-content);
	border-radius: 0.25rem;
	text-decoration: none;
}

.grid__item-link:hover,
.grid__item-link:focus {
	background: rgba(255,255,255,1);
}

.grid--columns .grid__img {
	height: min-content;
	aspect-ratio: 2 / 3;
}

.content__title {
	grid-area: main;
	position: relative;
	display: flex;
	flex-direction: column;
}

.content__title-main {
	font-size: clamp(2rem, 7vw, 4.5rem);
	line-height: 1;
	margin: 0.5rem 0 0;
	font-weight: 500;
	font-variation-settings: "wght" 500;
	text-wrap: balance;
	letter-spacing: -0.025em;
	color: #ccc;
	mix-blend-mode: difference;
}

.content__title-main + p {
	margin: 0;
	max-width: 150px;
	color: #ccc;
	mix-blend-mode: difference;
}

.center {
	text-align: center;
}

.right {
	text-align: right;
}

.end {
	align-self: end;
}

.acenter {
	align-self: center;
}

.page-footer {
	padding: var(--page-padding);
	position: relative;
	display: grid;
	width: 100%;
	grid-row-gap: 1rem;
	grid-column-gap: 2rem;
	justify-items: start;
	margin-top: 40vh;
	grid-template-columns: auto;
	justify-content: space-between;
}

@media (max-aspect-ratio: 16/9) {
  .grid:not(.grid--zoomed) {
    width: 100%; 
    height: auto; 
    aspect-ratio: 16/9;
  }
}

@media screen and (min-width: 53em) {
	body {
		--page-padding: 1rem;
	}
	.frame {
		grid-template-columns: 20% 1fr 1fr;
		grid-template-rows: min-content 1fr auto;
		grid-row-gap: 15vh;
		align-items: center;
		grid-template-areas: 'logo tags sponsor' '... ... subline' 'title title title' ;
	}
	.frame__links {
		margin-left: 3rem;
	}
	.frame__subline {
		align-self: end;
	}
	.frame__title {
		align-self: end;
	}
	.frame #cdawrap {
		text-align: right;
		max-width: 250px;
		justify-self: end;
	}
	.page-footer {
		grid-template-columns: repeat(3,auto);
	}
}
