@charset "utf-8";

/* ------------------------------------------------------------------------------------------------
 左から右
------------------------------------------------------------------------------------------------ */
/*== ボタン共通設定 */
.btneffect {
  /*アニメーションの起点とするためrelativeを指定*/
  position: relative;
  overflow: hidden;
  /*ボタンの形状*/
  text-decoration: none;
  display: inline-block;
  border: 1px solid #555;/* ボーダーの色と太さ */
  padding: 10px 30px;
  text-align: center;
  outline: none;
  /*アニメーションの指定*/   
  transition: ease .2s;
  /* ios 対策 */
  isolation: isolate;
}

/*ボタン内spanの形状*/
.btneffect span {
  position: relative;
  z-index: 3;/*z-indexの数値をあげて文字を背景よりも手前に表示*/
  color: #333;
}

.btneffect:hover span {
  color: #fff;
}

/*== 背景が流れる（右から左） */
.btneffect.bgright:before {
  content: '';
  /*絶対配置で位置を指定*/
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  /*色や形状*/
  background: #333;/*背景色*/
  width: 100%;
  height: 100%;
  /*アニメーション*/
  transition: transform .6s cubic-bezier(0.8, 0, 0.2, 1) 0s;
  transform: scale(0, 1);
  transform-origin: left top;
}

/*hoverした際の形状*/
.btneffect.bgright:hover:before {
  transform-origin: right top;
  transform: scale(1, 1);
}

@media only screen and (max-width: 640px) {
  .btneffect span {
    color: #ffffff;
  }

  .btneffect.bgright::before,
  .btneffect.bgright::after {
    animation: none;
    transform: none;
    transition: unset;
  }
}

/* ipad */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
  .btneffect span {
    color: #ffffff;
  }

  .btneffect.bgright::before,
  .btneffect.bgright::after {
    animation: none;
    transform: none;
    transition: unset;
  }
}

/* ------------------------------------------------------------------------------------------------
  視差効果の設定
------------------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}