/* CSS Document */

/**** Stack Cards ****/
.cards-root{
	padding: 20px;
	display: grid;
	place-items: center;
	background: black;
	overflow: hidden;
}

.cards {
  display: flex;
}

.card {
  background: #17141d;
  /*min-width: 300px;*/
  width: auto;
  min-height: 150px;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: -1rem 0 3rem #000;
  transition: 0.3s;
  --distance: -130px;
  color: white;
}
.card:not(:first-child) {
  margin-left: var(--distance);
}

.card:hover,
.card:focus-within {
  transform: translateY(-1rem);
}

.card:hover ~ .card,
.card:focus-within ~ .card {
  transform: translateX(calc(var(--distance) * -1));
}


/**** Flip Cards ****/


/* .flip-card-container */
.flip-card-container {
  --hue: 150;
  --primary: hsl(var(--hue), 50%, 50%);
  --white-1: hsl(0, 0%, 90%);
  --white-2: hsl(0, 0%, 80%);
  --dark: hsl(var(--hue), 25%, 10%);
  --grey: hsl(0, 0%, 50%);

  width: 260px;
  height: 372px;
  margin: 20px;

  perspective: 1000px;
}

/* .flip-card */
.flip-card {
  width: inherit;
  height: inherit;

  position: relative;
  transform-style: preserve-3d;
  transition: .6s .1s;
}

/* hover and focus-within states */
.flip-card-container:hover .flip-card,
.flip-card-container:focus-within .flip-card {
  transform: rotateY(180deg);
}

/* .card-... */
.flip-card-front,
.flip-card-back {
  width: 100%;
  height: 100%;
  border-radius: 24px;

  background: var(--dark);
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;

  backface-visibility: hidden;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* .card-front */
.flip-card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

/* .card-back */
.flip-card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* figure */
.flip-figure {
  z-index: -1;
}

/* figure, .img-bg */
.flip-figure,
.flip-img-bg {
  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
}

/* img */
.flip-img {
  height: 100%;
	position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  border-radius: 24px;
}

/* figcaption */
.flip-figcaption {
  position: fixed;
  bottom: 0px;
  left: 0;
  right: 0;
	padding: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  /*display: inherit;*/
  justify-content: center;
  align-items: center;
}

.flip-figcaption-back {
  position: fixed;
  width: 100%;
	height: 100%;	
	padding: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  /*display: inherit;*/
  justify-content: center;
  align-items: center;
}

/* .img-bg */
.flip-img-bg {
  background: hsla(var(--hue), 25%, 10%, .5);
}

.flip-card-front .flip-img-bg {
  clip-path: polygon(0 20%, 100% 40%, 100% 100%, 0 100%);
}

.flip-card-front .flip-img-bg::before {
  content: "";

  position: absolute;
  top: 34%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(18deg);

  width: 100%;
  height: 6px;
  border: 1px solid var(--primary);
  border-left-color: transparent;
  border-right-color: transparent;

  transition: .1s;
}

.flip-back-img{	
	filter:	brightness(25%) grayscale(100%);
}

.flip-card-back .flip-img-bg {
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 60%);
}

/* hover state */
.flip-card-container:hover .flip-card-front .flip-img-bg::before {
  width: 6px;
  border-left-color: var(--primary);
  border-right-color: var(--primary);
}

.flip-list {
  margin: 0 auto;
  width: 100%;
  height: 100%;

  list-style: none;
  color: var(--white-1);

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* li */
.flip-list li {
  width: 100%;
  margin-top: 10px;
  padding-bottom: 10px;

  font-size: 16px;
  text-align: center;

  position: relative;
}

.flip-list li:nth-child(2n) {
  color: var(--white-2);
}

.flip-list li:not(:last-child)::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 1px;

  background: currentColor;
  opacity: .2;
}

