.preview-open {
	overflow: hidden;
}

/* Page Loader */
.js .loading::before {
	content: '';
	position: fixed;
	z-index: 100000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--color-bg);
}

.js .loading::after {
	content: '';
	position: fixed;
	z-index: 100000;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	pointer-events: none;
	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;
}

a:hover,
a:focus {
	color: var(--color-link-hover);
	outline: none;
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Icons */
.icon {
	display: block;
	width: 1.5em;
	height: 1.5em;
	margin: 0 auto;
	fill: currentColor;
}

main {
	position: relative;
}

.content {
	position: relative;
}

/* Header */
.codrops-header {
	position: relative;
	z-index: 100;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	align-items: center;
	padding: 2rem;
}

.codrops-header__title {
	font-size: 1em;
	font-weight: bold;
	margin: 0;
	padding: 0;
}

.info {
	margin: 0 0 0 1.25em;
	color: var(--color-info);
}

.github {
	display: block;
	margin: 0 0 0 auto;
}

/* Top Navigation Style */
.codrops-links {
	position: relative;
	display: flex;
	justify-content: center;
	margin: 0 1em 0 0;
	text-align: center;
	white-space: nowrap;
}

.codrops-icon {
	display: inline-block;
	margin: 0.15em;
	padding: 0.25em;
}

.grid {
	width: 100%;
	margin: 0 auto;
	padding-bottom: 10rem;
}

.grid__item {
	display: flex;
	justify-content: center;
	margin: 0 0 10rem 0;
	cursor: pointer;
}

.box {
	position: relative;
	margin: 2rem;
}

.box__title {
	margin: 0;
	line-height: 1;
	position: absolute;
	z-index: 100;
}

.box__title-inner {
    display: block;
    position: relative;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 3rem;
    line-height: 2;
    font-weight: bold;
}

.box__title-inner[data-hover] {
    -webkit-text-stroke: 1px #ee2a7b;
    text-stroke: 1px #ee2a7b;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
    color: transparent;
}
.box__title-inner::before {
	content: attr(data-hover);
	position: absolute;
	top: 0;
	left: 0;
	height: 0;
	overflow: hidden;
	white-space: nowrap;
	-webkit-text-stroke: 0;
	text-stroke: 0;
	-webkit-text-fill-color: #ee2a7b;
	text-fill-color: #ee2a7b;
	color: #ee2a7b;
	transition: all 0.3s;
}

.grid__item:hover .box__title-inner::before {
	height: 100%;
	width: 100%;
}

.box__text {
	margin: 0;
	position: absolute;
	top: -6rem;
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 0.15rem;
	font-size: 1.75rem;
	margin: 0.5rem 1rem;
	color: #285ba9;
}

.box__text-inner {
    position: relative;
    display: block;
    border: 6px solid var(--color-text);
    padding: 0.25rem 1.25rem;
    font-weight: bold;
    border: 6px solid;
}

.box__text-inner--reverse {
	background: var(--color-text);
	color: var(--color-bg);
}

.box__img {
	display: block;
	flex: none;
	margin: 0 auto;
	max-width: 100%;
	transition: filter 0.3s;
	pointer-events: none;
}

.grid__item:hover .box__img:not(.box__img--original) {
	filter: grayscale(0);
}

.box__shadow {
	position: absolute;
	width: 100%;
	height: 100%;
	top: -1rem;
	left: -1rem;
	z-index: -1;
	background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAOklEQVQoU43MSwoAMAgD0eT+h7ZYaOlHo7N+DNHL2HAGgBWcyGcKbqTghTL4oQiG6IUpOqFEC5bI4QD8PAoKd9j4XwAAAABJRU5ErkJggg==);
}

.box__deco {
	font-size: 6rem;
	line-height: 1;
	font-weight: bold;
	position: absolute;
	bottom: -4rem;
	right: -4rem;
	display: none;
}

.box__content {
	position: absolute;
	max-width: 195px;
	font-size: 0.9rem;
	text-align: right;
	display: none;
}

.box__content strong {
	white-space: nowrap;
}

.overlay {
	pointer-events: none;
	width: 100%;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	overflow: hidden;
}

.overlay--open {
	pointer-events: auto;
}

.overlay__reveal {
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: #000;
	position: absolute;
	z-index: 100;
	transform: translate3d(100%,0,0);
}

.overlay__item {
	width: 100%;
	height: 100vh;
	position: absolute;
	top: 0;
	left: 0;
	background: #ececec;
	opacity: 0;
	display: flex;
	flex-direction: column;
    align-items: center;
    padding: 6rem 5vw;
	justify-content: center;
	overflow: auto;
}

.overlay__item .box {
	max-width: 600px;
	max-height: 100%;
	margin: 0;
}

.overlay__item .box__title {
	bottom: 0;
}

.box__img--original {
	max-height: calc(100vh - 10rem);
	filter: none;
}

.overlay__close {
	position: absolute;
	top: 0;
	right: 0;
	background: none;
	border: 0;
	margin: 1rem;
	padding: 1rem;
	opacity: 0;
}

.overlay__close:focus {
	outline: none;
}

.overlay__content {
	font-size: 1rem;
	line-height: 1.5;
	max-width: 25rem;
	margin: 1rem 0 0 10vw;
}
.box__shadow.blue {
    background-color: #285ba9;
    background-image: none;
}

.box__shadow.yellow {
    background-color: orange;
    background-image: none;
}

@media screen and (max-width: 1200px){
	.grid {
		display: grid;
		align-items: center;
		padding: 3rem 3rem 3rem 3rem;
		grid-row-gap: 2rem;
		grid-template-columns: repeat(2,calc(100% / 2)) !important;
	}
}

@media screen and (max-width: 991px){
	.box__text {
		font-size: 1.2rem;
	}
	.box__title-inner {
		font-size: 2rem;
		line-height: 3;
	}
	.box__text--bottom {
		bottom: -4rem;
	}
}
@media screen and (max-width: 879px){
	.box__title-inner {
		line-height: 2;
	}
	.box__text {
		top: -5rem;
	}
	.grid__item {
		margin: 0 0 6rem 0;
	}
	
.overlay__item .box {
	max-height: none;
	max-width: 100%;
  }
  .overlay__content {
	max-width: 100%;
	font-size: 0.9rem;
	display: block;
	margin: 13px auto 0 auto;
  }
  .overlay__item .box__shadow {
	display: none;
  }
  .overlay__item .box__title {
	position: relative;
  }
  .overlay__item .box__text {
	position: relative;
	top: 0;
	margin: auto;
  }
}
@media screen and (max-width: 768px){
	.box__text-inner {
		border: 2px solid;
	}
	.box__title-inner {
		line-height: 2;
		font-size: 1.5rem;
	}
}
@media screen and (max-width: 576px){
	.grid {
		grid-template-columns: repeat(1,calc(100% / 1)) !important;
	}
	.grid__item {
		padding: 20px;
	}
	.grid__item {
		margin: 0 0 2rem 0;
	}
}


@media screen and (min-width: 55em) {
	.grid {
		display: grid;
		align-items: center;
		padding: 3rem 3rem 3rem 3rem;
		grid-row-gap: 2rem;
		grid-template-columns: repeat(3,calc(100% / 3));
	}
	.grid__item {
		margin: 0;
	}
	.box {
		margin: 6rem 4.5rem;
	}
	.box__title {
		top: -4rem;
		right: -4.5rem;
		-webkit-writing-mode: vertical-rl;
		writing-mode: vertical-rl;
	}
	.box__title--straight {
		-webkit-writing-mode: horizontal-tb;
		writing-mode: horizontal-tb;
	}
	.box__title--straight .box__title-inner::before {
		width: 0;
		height: auto;
	}
	.box__title--bottom {
		bottom: -5rem;
		top: auto;
	}
	.box__title--left {
		left: -2rem;
		right: auto;
	}
	.box__text--topcloser {
		top: -5rem;
	}
	.box__text--bottom {
		bottom: -5rem;
		top: auto;
	}
	.box__text--bottomcloser {
		bottom: -5rem;
		top: auto;
	}
	.box__text--right {
		right: 0;
		left: auto;
	}
	.box__text-inner--rotated1 {
		transform: rotate(4deg);
	}
	.box__text-inner--rotated2 {
		transform: rotate(-3deg);
	}
	.box__text-inner--rotated3 {
		transform: rotate(-15deg);
	}
	.box__deco {
		display: block;
	}
	.box__deco--left {
		right: auto;
		left: -3rem;
	}
	.box__deco--top {
		top: 0;
		bottom: auto;
	}
	.overlay__item {
		flex-direction: row;
	}
	.overlay__content {
		font-size: 1.2rem;
		margin-top: 0;
	}
	.overlay__item .box__title--bottom {
		bottom: 0;
	}
}

@media screen and (min-width: 80em) {
	.grid {
		grid-template-columns: repeat(3,33.33%);
	}
	.grid__item:nth-child(4n-2) {
		margin-top: -8rem;
		margin-bottom: 8rem;
	}
	.grid__item:nth-child(4n) {
		margin-top: -5rem;
	}
	.box {
		margin: 6rem 4.5rem;
	}
	.box__content {
		display: block;
	}
}

@media screen and (max-width: 55em) {
	.content {
		flex-direction: column;
		height: auto;
		min-height: 0;
	}
	.content--fixed {
		position: relative;
		z-index: 1000;
		display: block;
		padding: 0.85em;
	}
	.codrops-header {
		flex-direction: column;
		align-items: center;
		padding-bottom: 5rem;
	}
	.codrops-header__title {
		font-weight: bold;
		padding-bottom: 0.25em;
		text-align: center;
	}
	.info {
		margin: 0;
	}
	.github {
		display: block;
		margin: 1em auto;
	}
	.codrops-links {
		margin: 0;
	}
}

@media (min-width: 577px) {
  .grid__item:last-child:nth-child(3n-2) {
    grid-column-end: 3;
  }
}